handled CI/CD and .toml files
This commit is contained in:
parent
20b0467f89
commit
d08852716c
6 changed files with 37 additions and 89 deletions
|
|
@ -11,59 +11,41 @@ include:
|
|||
file: acc_py_devtools/templates/gitlab-ci/python.yml
|
||||
|
||||
variables:
|
||||
project_name: caimira
|
||||
PY_VERSION: "3.11"
|
||||
|
||||
|
||||
# ###################################################################################################
|
||||
# Test code - CAiMIRA (model) and CERN CAiMIRA (CERN's UI)
|
||||
|
||||
# A full installation of CAiMIRA, tested with pytest.
|
||||
test_install:
|
||||
extends: .acc_py_full_test
|
||||
.py_full_test:
|
||||
image: registry.cern.ch/docker.io/library/python:${PY_VERSION}
|
||||
stage: test
|
||||
before_script:
|
||||
- pip install -e ${caimira_root}[test]
|
||||
- pip install -e ${cern_caimira_root}[test]
|
||||
script:
|
||||
- cd ${caimira_root}
|
||||
- python -m pytest
|
||||
- cd ../${cern_caimira_root}
|
||||
- python -m pytest
|
||||
|
||||
|
||||
# A full installation of CAiMIRA, tested with pytest.
|
||||
caimira_full_test:
|
||||
extends: .py_full_test
|
||||
variables:
|
||||
project_root: ./caimira
|
||||
project_name: caimira
|
||||
caimira_root: ./caimira
|
||||
cern_caimira_root: ./cern_caimira
|
||||
|
||||
|
||||
# A development installation of CAiMIRA tested with pytest.
|
||||
test_dev:
|
||||
extends: .acc_py_dev_test
|
||||
variables:
|
||||
project_root: ./caimira
|
||||
project_name: caimira
|
||||
|
||||
|
||||
# A development installation of CAiMIRA tested with pytest.
|
||||
test_dev-39:
|
||||
caimira_full_test-39:
|
||||
extends: .py_full_test
|
||||
variables:
|
||||
PY_VERSION: "3.9"
|
||||
project_root: ./caimira
|
||||
project_name: caimira
|
||||
extends: .acc_py_dev_test
|
||||
caimira_root: ./caimira
|
||||
cern_caimira_root: ./cern_caimira
|
||||
|
||||
# A full installation of CERN CAiMIRA, tested with pytest.
|
||||
test_install_cern_caimira:
|
||||
extends: .acc_py_full_test
|
||||
variables:
|
||||
project_root: ./_cern_caimira
|
||||
project_name: cern_caimira
|
||||
|
||||
|
||||
# A development installation of CERN CAiMIRA tested with pytest.
|
||||
test_dev_cern_caimira:
|
||||
extends: .acc_py_dev_test
|
||||
variables:
|
||||
project_root: ./_cern_caimira
|
||||
project_name: cern_caimira
|
||||
|
||||
|
||||
# A development installation of CERN CAiMIRA tested with pytest.
|
||||
test_dev-39_cern_caimira:
|
||||
variables:
|
||||
PY_VERSION: "3.9"
|
||||
project_root: ./_cern_caimira
|
||||
project_name: cern_caimira
|
||||
extends: .acc_py_dev_test
|
||||
|
||||
# ###################################################################################################
|
||||
# Test OpenShift config
|
||||
|
|
|
|||
|
|
@ -18,27 +18,21 @@ classifiers = [
|
|||
]
|
||||
requires-python = ">=3.9"
|
||||
dependencies = [
|
||||
"ipykernel",
|
||||
"ipympl>=0.9.0",
|
||||
"ipywidgets<8.0",
|
||||
"Jinja2",
|
||||
"loky",
|
||||
"matplotlib",
|
||||
"memoization",
|
||||
"mistune",
|
||||
"numpy",
|
||||
"pandas",
|
||||
"psutil",
|
||||
"pyinstrument",
|
||||
"pyjwt",
|
||||
"python-dateutil",
|
||||
"requests",
|
||||
"retry",
|
||||
"ruptures",
|
||||
"scipy",
|
||||
"scikit-learn",
|
||||
"tabulate",
|
||||
"timezonefinder",
|
||||
"tornado",
|
||||
"types-retry",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
|
|
@ -51,7 +45,8 @@ test = [
|
|||
"numpy-stubs @ git+https://github.com/numpy/numpy-stubs.git",
|
||||
"types-dataclasses",
|
||||
"types-python-dateutil",
|
||||
"types-requests"
|
||||
"types-requests",
|
||||
"types-retry",
|
||||
]
|
||||
doc = [
|
||||
"sphinx",
|
||||
|
|
@ -71,40 +66,7 @@ addopts = "--mypy"
|
|||
[tool.mypy]
|
||||
no_warn_no_return = true
|
||||
exclude = "caimira/profiler.py"
|
||||
ignore_missing_imports = true # TODO what to do here?
|
||||
|
||||
[tool.mypy-loky]
|
||||
ignore_missing_imports = true
|
||||
|
||||
[tool.mypy-ipympl]
|
||||
ignore_missing_imports = true
|
||||
|
||||
[tool.mypy-ipywidgets]
|
||||
ignore_missing_imports = true
|
||||
|
||||
[tool.mypy-matplotlib]
|
||||
ignore_missing_imports = true
|
||||
|
||||
[tool.mypy-mistune]
|
||||
ignore_missing_imports = true
|
||||
|
||||
[tool.mypy-qrcode]
|
||||
ignore_missing_imports = true
|
||||
|
||||
[tool.mypy-scipy]
|
||||
ignore_missing_imports = true
|
||||
|
||||
[tool.mypy-timezonefinder]
|
||||
ignore_missing_imports = true
|
||||
|
||||
[tool.mypy-pandas]
|
||||
ignore_missing_imports = true
|
||||
|
||||
[tool.mypy-pstats]
|
||||
follow_imports = "skip"
|
||||
|
||||
[tool.mypy-tabulate]
|
||||
ignore_missing_imports = true
|
||||
|
||||
[tool.mypy-ruptures]
|
||||
[[tool.mypy.overrides]]
|
||||
module = ["pandas", "ruptures", "scipy.*", "setuptools", "sklearn.*", "tabulate"]
|
||||
ignore_missing_imports = true
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import typing
|
||||
|
||||
import numpy as np
|
||||
from sklearn.neighbors import KernelDensity # type: ignore
|
||||
from sklearn.neighbors import KernelDensity
|
||||
|
||||
from caimira.calculator.models import models
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# import pandas as pd
|
||||
# from tabulate import tabulate
|
||||
import pandas as pd
|
||||
from tabulate import tabulate
|
||||
|
||||
'''
|
||||
Script file to generate the vaccine effectiveness values.
|
||||
|
|
|
|||
|
|
@ -70,7 +70,11 @@ addopts = "--mypy"
|
|||
|
||||
[tool.mypy]
|
||||
no_warn_no_return = true
|
||||
ignore_missing_imports = true # TODO what to do here?
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = ["caimira.*", "ipympl.*", "loky", "ipywidgets", "setuptools", "pandas"]
|
||||
ignore_missing_imports = true
|
||||
|
||||
|
||||
[tool.mypy-loky]
|
||||
ignore_missing_imports = true
|
||||
|
|
|
|||
0
cern_caimira/src/cern_caimira/__init__.py
Normal file
0
cern_caimira/src/cern_caimira/__init__.py
Normal file
Loading…
Reference in a new issue