Skip to content

Commit

Permalink
Updated dependencies and fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CaderIdris committed Dec 24, 2023
1 parent 12a8498 commit 66e4f83
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 71 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.9', '3.11']
python-version: ['3.10', '3.11']

steps:
- uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "calidhayte"
version = "2.0.0dev"
requires-python = ">=3.9"
requires-python = ">=3.10"
description = "Calibrate raw measurements against reference measurements using one or more variables"
authors = [
{name="Idris Hayward", email="[email protected]"}
Expand Down Expand Up @@ -72,12 +72,12 @@ no_implicit_reexport = true
legacy_tox_ini = """
[tox]
minversion = 4.0
envlist = py39, py311, flake8, mypy
envlist = py310, py311, flake8, mypy
isolated_build = true
[gh-actions]
python =
3.9: py39
3.9: py310
3.11: py311, mypy, flake8
[testenv]
Expand Down
123 changes: 64 additions & 59 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,64 +1,65 @@
-i https://pypi.org/simple
anyio==4.0.0; python_version >= '3.8'
anyio==4.2.0; python_version >= '3.8'
argon2-cffi==23.1.0; python_version >= '3.7'
argon2-cffi-bindings==21.2.0; python_version >= '3.6'
arrow==1.3.0; python_version >= '3.8'
asttokens==2.4.1
async-lru==2.0.4; python_version >= '3.8'
attrs==23.1.0; python_version >= '3.7'
babel==2.13.1; python_version >= '3.7'
babel==2.14.0; python_version >= '3.7'
beautifulsoup4==4.12.2; python_full_version >= '3.6.0'
black==23.12.1; python_version >= '3.8'
bleach==6.1.0; python_version >= '3.8'
cachetools==5.3.2; python_version >= '3.7'
certifi==2023.7.22; python_version >= '3.6'
certifi==2023.11.17; python_version >= '3.6'
cffi==1.16.0; python_version >= '3.8'
chardet==5.2.0; python_version >= '3.7'
charset-normalizer==3.3.2; python_full_version >= '3.7.0'
click==8.1.7; python_version >= '3.7'
colorama==0.4.6; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6'
comm==0.1.4; python_version >= '3.6'
coverage[toml]==7.3.2; python_version >= '3.8'
comm==0.2.0; python_version >= '3.8'
coverage[toml]==7.3.4; python_version >= '3.8'
debugpy==1.8.0; python_version >= '3.8'
decorator==5.1.1; python_version >= '3.5'
defusedxml==0.7.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
distlib==0.3.7
distlib==0.3.8
executing==2.0.1; python_version >= '3.5'
fastjsonschema==2.18.1
fastjsonschema==2.19.0
filelock==3.13.1; python_version >= '3.8'
flake8==6.1.0; python_full_version >= '3.8.1'
fqdn==1.5.1
idna==3.4; python_version >= '3.5'
idna==3.6; python_version >= '3.5'
iniconfig==2.0.0; python_version >= '3.7'
ipykernel==6.26.0; python_version >= '3.8'
ipython==8.17.2; python_version >= '3.9'
ipython-genutils==0.2.0
ipykernel==6.27.1; python_version >= '3.8'
ipython==8.19.0; python_version >= '3.10'
ipywidgets==8.1.1; python_version >= '3.7'
isoduration==20.11.0
jedi==0.19.1; python_version >= '3.6'
jinja2==3.1.2; python_version >= '3.7'
json5==0.9.14
jsonpointer==2.4
jsonschema[format-nongpl]==4.19.2; python_version >= '3.8'
jsonschema-specifications==2023.7.1; python_version >= '3.8'
jsonschema[format-nongpl]==4.20.0; python_version >= '3.8'
jsonschema-specifications==2023.11.2; python_version >= '3.8'
jupyter==1.0.0
jupyter-client==8.5.0; python_version >= '3.8'
jupyter-client==8.6.0; python_version >= '3.8'
jupyter-console==6.6.3; python_version >= '3.7'
jupyter-core==5.5.0; python_version >= '3.8'
jupyter-events==0.8.0; python_version >= '3.8'
jupyter-lsp==2.2.0; python_version >= '3.8'
jupyter-server==2.9.1; python_version >= '3.8'
jupyter-server-terminals==0.4.4; python_version >= '3.8'
jupyterlab==4.0.7; python_version >= '3.8'
jupyterlab-pygments==0.2.2; python_version >= '3.7'
jupyterlab-server==2.25.0; python_version >= '3.8'
jupyter-core==5.5.1; python_version >= '3.8'
jupyter-events==0.9.0; python_version >= '3.8'
jupyter-lsp==2.2.1; python_version >= '3.8'
jupyter-server==2.12.1; python_version >= '3.8'
jupyter-server-terminals==0.5.0; python_version >= '3.8'
jupyterlab==4.0.9; python_version >= '3.8'
jupyterlab-pygments==0.3.0; python_version >= '3.8'
jupyterlab-server==2.25.2; python_version >= '3.8'
jupyterlab-widgets==3.0.9; python_version >= '3.7'
markupsafe==2.1.3; python_version >= '3.7'
matplotlib-inline==0.1.6; python_version >= '3.5'
mccabe==0.7.0; python_version >= '3.6'
mistune==3.0.2; python_version >= '3.7'
mypy==1.6.1; python_version >= '3.8'
mypy==1.8.0; python_version >= '3.8'
mypy-extensions==1.0.0; python_version >= '3.5'
nbclient==0.8.0; python_full_version >= '3.8.0'
nbconvert==7.10.0; python_version >= '3.8'
nbclient==0.9.0; python_full_version >= '3.8.0'
nbconvert==7.13.1; python_version >= '3.8'
nbformat==5.9.2; python_version >= '3.8'
nest-asyncio==1.5.8; python_version >= '3.5'
notebook==7.0.6; python_version >= '3.8'
Expand All @@ -67,93 +68,97 @@ overrides==7.4.0; python_version >= '3.6'
packaging==23.2; python_version >= '3.7'
pandocfilters==1.5.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
parso==0.8.3; python_version >= '3.6'
pdoc==14.1.0; python_version >= '3.8'
pexpect==4.8.0; sys_platform != 'win32'
platformdirs==3.11.0; python_version >= '3.7'
pathspec==0.12.1; python_version >= '3.8'
pdoc==14.3.0; python_version >= '3.8'
pexpect==4.9.0; sys_platform != 'win32'
platformdirs==4.1.0; python_version >= '3.8'
pluggy==1.3.0; python_version >= '3.8'
prometheus-client==0.18.0; python_version >= '3.8'
prompt-toolkit==3.0.39; python_full_version >= '3.7.0'
psutil==5.9.6; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'
prometheus-client==0.19.0; python_version >= '3.8'
prompt-toolkit==3.0.43; python_full_version >= '3.7.0'
psutil==5.9.7; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'
ptyprocess==0.7.0
pure-eval==0.2.2
pycodestyle==2.11.1; python_version >= '3.8'
pycparser==2.21
pyflakes==3.1.0; python_version >= '3.8'
pygments==2.16.1; python_version >= '3.7'
pygments==2.17.2; python_version >= '3.7'
pyproject-api==1.6.1; python_version >= '3.8'
pytest==7.4.3; python_version >= '3.7'
pytest-cov==4.1.0; python_version >= '3.7'
pytest-html==4.0.2; python_version >= '3.8'
pytest-html==4.1.1; python_version >= '3.8'
pytest-metadata==3.0.0; python_version >= '3.7'
python-dateutil==2.8.2; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
python-json-logger==2.0.7; python_version >= '3.6'
pyyaml==6.0.1; python_version >= '3.6'
pyzmq==25.1.1; python_version >= '3.6'
qtconsole==5.4.4; python_version >= '3.7'
pyzmq==25.1.2; python_version >= '3.6'
qtconsole==5.5.1; python_version >= '3.8'
qtpy==2.4.1; python_version >= '3.7'
referencing==0.30.2; python_version >= '3.8'
referencing==0.32.0; python_version >= '3.8'
requests==2.31.0; python_version >= '3.7'
rfc3339-validator==0.1.4; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
rfc3986-validator==0.1.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
rpds-py==0.10.6; python_version >= '3.8'
rpds-py==0.15.2; python_version >= '3.8'
send2trash==1.8.2; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
six==1.16.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
sniffio==1.3.0; python_version >= '3.7'
soupsieve==2.5; python_version >= '3.8'
stack-data==0.6.3
terminado==0.17.1; python_version >= '3.7'
terminado==0.18.0; python_version >= '3.8'
tinycss2==1.2.1; python_version >= '3.7'
tornado==6.3.3; python_version >= '3.8'
tox==4.11.3; python_version >= '3.8'
traitlets==5.13.0; python_version >= '3.8'
tornado==6.4; python_version >= '3.8'
tox==4.11.4; python_version >= '3.8'
traitlets==5.14.0; python_version >= '3.8'
types-python-dateutil==2.8.19.14
typing-extensions==4.8.0; python_version >= '3.8'
typing-extensions==4.9.0; python_version >= '3.8'
uri-template==1.3.0
urllib3==2.0.7; python_version >= '3.7'
virtualenv==20.24.6; python_version >= '3.7'
wcwidth==0.2.9
urllib3==2.1.0; python_version >= '3.8'
virtualenv==20.25.0; python_version >= '3.7'
wcwidth==0.2.12
webcolors==1.13
webencodings==0.5.1
websocket-client==1.6.4; python_version >= '3.8'
websocket-client==1.7.0; python_version >= '3.8'
widgetsnbextension==4.0.9; python_version >= '3.7'
arviz==0.16.1; python_version >= '3.9'
bambi==0.13.0; python_version >= '3.8'
-e .
cloudpickle==3.0.0; python_version >= '3.8'
cons==0.4.6; python_version >= '3.6'
contourpy==1.1.1; python_version >= '3.8'
contourpy==1.2.0; python_version >= '3.9'
cycler==0.12.1; python_version >= '3.8'
etuples==0.3.9; python_version >= '3.8'
fastprogress==1.0.3; python_version >= '3.6'
fonttools==4.43.1; python_version >= '3.8'
fonttools==4.47.0; python_version >= '3.8'
formulae==0.5.1; python_version >= '3.7'
graphviz==0.20.1; python_version >= '3.7'
h5netcdf==1.2.0; python_version >= '3.9'
h5netcdf==1.3.0; python_version >= '3.9'
h5py==3.10.0; python_version >= '3.8'
joblib==1.3.2; python_version >= '3.7'
kiwisolver==1.4.5; python_version >= '3.7'
llvmlite==0.41.1; python_version >= '3.8'
logical-unification==0.4.6; python_version >= '3.6'
matplotlib==3.8.1; python_version >= '3.9'
matplotlib==3.8.2; python_version >= '3.9'
minikanren==1.0.3; python_version >= '3.6'
multipledispatch==1.0.0
numba==0.58.1; python_version >= '3.8'
numpy==1.25.2; python_version >= '3.9'
pandas==2.1.2; python_version >= '3.9'
numpy==1.26.2; python_version >= '3.9'
pandas==2.1.4; python_version >= '3.9'
pillow==10.1.0; python_version >= '3.8'
pymc==5.9.1; python_version >= '3.9'
progressbar2==4.3.2; python_version >= '3.8'
pygam==0.9.0; python_version < '3.12' and python_full_version >= '3.8.1'
pymc==5.10.3; python_version >= '3.9'
pyparsing==3.1.1; python_full_version >= '3.6.8'
pytensor==2.17.3; python_version < '3.12' and python_version >= '3.9'
pytensor==2.18.4; python_version < '3.12' and python_version >= '3.9'
python-utils==3.8.1; python_version >= '3.9'
pytz==2023.3.post1
scikit-learn==1.3.2; python_version >= '3.8'
scipy==1.11.3; python_version < '3.13' and python_version >= '3.9'
setuptools==68.2.2; python_version >= '3.8'
shap==0.43.0; python_version >= '3.8'
scipy==1.11.4; python_version >= '3.9'
setuptools==69.0.3; python_version >= '3.8'
shap==0.44.0; python_version >= '3.8'
slicer==0.0.7; python_version >= '3.6'
threadpoolctl==3.2.0; python_version >= '3.8'
toolz==0.12.0; python_version >= '3.5'
tqdm==4.66.1; python_version >= '3.7'
tzdata==2023.3; python_version >= '2'
xarray==2023.10.1; python_version >= '3.9'
xarray==2023.12.0; python_version >= '3.9'
xarray-einstats==0.6.0; python_version >= '3.9'
xgboost==2.0.1; python_version >= '3.8'
xgboost==2.0.3; python_version >= '3.8'
9 changes: 3 additions & 6 deletions src/calidhayte/calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2260,10 +2260,7 @@ def linear_gam(
random_search: bool = False,
parameters: dict[
str, Union[scipy.stats.rv_continuous, List[Union[int, str, float]]]
] = {
"max_iter": [100, 500, 1000],
"callbacks": ['deviance', 'diffs']
},
] = {"max_iter": [100, 500, 1000], "callbacks": ["deviance", "diffs"]},
**kwargs,
):
"""
Expand Down Expand Up @@ -2309,8 +2306,8 @@ def expectile_gam(
str, Union[scipy.stats.rv_continuous, List[Union[int, str, float]]]
] = {
"max_iter": [100, 500, 1000],
"callbacks": ['deviance', 'diffs'],
"expectile": uniform(loc=0, scale=1)
"callbacks": ["deviance", "diffs"],
"expectile": uniform(loc=0, scale=1),
},
**kwargs,
):
Expand Down
3 changes: 2 additions & 1 deletion src/calidhayte/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,8 @@ def centered_rmse(self):
"""
Calculate the centered root mean squared error between pred and true
$\\sqrt{\\frac{1}{N}\\sum_{n=1}^{N}[(p_n-\\bar{p}) - (t_n-\\bar{t})]^2}$
$\\sqrt{\\frac{1}{N}\\sum_{n=1}^{N}[(p_n-\\bar{p}) - \
(t_n-\\bar{t})]^2}$
"""
self._sklearn_error_meta(crmse, "Centered Root Mean Squared Error")

Expand Down
2 changes: 1 addition & 1 deletion tests/test_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def test_prepare_datasets(trained_models):
Results.ref_mean,
Results.ref_range,
Results.ref_sd,
Results.unbiased_rmse
Results.unbiased_rmse,
]
for err in errs:
err(results)
Expand Down

0 comments on commit 66e4f83

Please sign in to comment.