Skip to content

Commit

Permalink
Merge pull request #37 from svhoy/add-calibration-algos-functions
Browse files Browse the repository at this point in the history
Add calibration algos functions
  • Loading branch information
svhoy authored Jul 18, 2024
2 parents 58af79c + 94475ab commit 1d2f08a
Show file tree
Hide file tree
Showing 11 changed files with 1,053 additions and 2,633 deletions.
24 changes: 9 additions & 15 deletions .github/workflows/django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,18 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: |
python -m pip install poetry
- name: Config Poetry & Install dependencies
run: |
poetry config virtualenvs.create true
poetry config virtualenvs.in-project true
- name: Define a cache for the virtual environment based on the dependencies lock file
uses: actions/cache@v3
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Set virtual environment
run: echo "VIRTUAL_ENV=${Python_ROOT_DIR}" >> $GITHUB_ENV
- name: Install uv
run: pip install uv
- name: Install dependencies
run: |
poetry install --no-interaction --no-root
run: uv pip install -r requirements.txt
- name: Analysing the code with pylint
run: |
poetry run pylint --load-plugins pylint_django --django-settings-module=config.settings **/*.py
pylint $(git ls-files '*.py')
black:
runs-on: windows-2022
Expand Down
184 changes: 94 additions & 90 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ __pycache__
db.sqlite3
media

# Backup files #
*.bak
# Backup files #
*.bak

# If you are using PyCharm #
# If you are using PyCharm #
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
Expand Down Expand Up @@ -45,92 +45,96 @@ out/
# JIRA plugin
atlassian-ide-plugin.xml

# Python #
*.py[cod]
*$py.class

# Distribution / packaging
.Python build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
.pytest_cache/
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery
celerybeat-schedule.*

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# mkdocs documentation
/site

# mypy
.mypy_cache/

# Sublime Text #
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
*.sublime-workspace
*.sublime-project

# sftp configuration file
sftp-config.json

# Package control specific files Package
Control.last-run
Control.ca-list
Control.ca-bundle
Control.system-ca-bundle
GitHub.sublime-settings

# Visual Studio Code #

.vscode/*
# Python #
*.py[cod]
*$py.class

# Distribution / packaging
.Python build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
.pytest_cache/
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery
celerybeat-schedule.*

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# mkdocs documentation
/site

# mypy
.mypy_cache/

# Sublime Text #
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
*.sublime-workspace
*.sublime-project

# sftp configuration file
sftp-config.json

# Package control specific files Package
Control.last-run
Control.ca-list
Control.ca-bundle
Control.system-ca-bundle
GitHub.sublime-settings

# Visual Studio Code #

.vscode/*
.history

*.json
*.json

.idea/*
juypter/*.pdf
juypter/*.tex
1 change: 0 additions & 1 deletion apps/sit_ble_devices/serializers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from numpy import source
from rest_framework import serializers

from .models import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ async def start_calibration_calc(self):
if self.measurement_type == "adstwr":
delay = optimizer.optimize(
fit_function=self.objective_gauss_newton_ads_function,
df_function=self.df_gauss_newton_ads_function,
initial_guess=np.array([1000e-9]),
max_iterations=self.iterations,
method="lm",
Expand Down
Loading

0 comments on commit 1d2f08a

Please sign in to comment.