diff --git a/.circleci/config.yml b/.circleci/config.yml index 985891d7..7c7bc4f2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,15 +1,15 @@ version: 2.1 -shared: &shared +analysis: &analysis steps: - checkout - run: name: Install chemcoord - command: pip3 install --editable . + command: pip3 install . - run: name: Install infrastructure - command: pip3 install pytest pytest-cov mypy ruff + command: pip3 install -r tests/static_analysis_requirements.txt - run: name: Check trailing whitespace command: git diff-tree --check $(git hash-object -t tree /dev/null) HEAD -- '(exclude)docs/make.bat' @@ -18,7 +18,21 @@ shared: &shared command: ruff format --diff - run: name: Ruff check - command: ruff check . || true + command: ruff check + - run: + name: Type checking + command: mypy src/ tests/ + + +run_tests: &run_tests + steps: + - checkout + - run: + name: Install chemcoord + command: pip3 install . + - run: + name: Install infrastructure + command: pip3 install pytest pytest-cov - run: name: Running tests command: python3 -m pytest -Werror --cov=./src/chemcoord tests/ @@ -32,26 +46,44 @@ workflows: jobs: - py39 - py310 + - py310_analysis - py311 + - py311_analysis - py312 + - py313 jobs: py39: - <<: *shared + <<: *run_tests docker: - image: cimg/python:3.9 py310: - <<: *shared + <<: *run_tests + docker: + - image: cimg/python:3.10 + + py310_analysis: + <<: *analysis docker: - image: cimg/python:3.10 py311: - <<: *shared + <<: *run_tests + docker: + - image: cimg/python:3.11 + + py311_analysis: + <<: *analysis docker: - image: cimg/python:3.11 py312: - <<: *shared + <<: *run_tests + docker: + - image: cimg/python:3.12 + + py313: + <<: *run_tests docker: - image: cimg/python:3.12 \ No newline at end of file diff --git a/README.rst b/README.rst index 5fa2dcd3..dabb759b 100644 --- a/README.rst +++ b/README.rst @@ -65,7 +65,7 @@ Features Installation guide ------------------ -A working python 3 installation is required (3.9 <= version <= 3.12 are tested). +A working python 3 installation is required (3.9 <= version <= 3.13 are tested). It is highly recommended to use this module in combination with `Ipython `__ and `jupyter `__. diff --git a/docs/source/installation.rst b/docs/source/installation.rst index ded69bc3..7d2e74b2 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -1,6 +1,6 @@ Installation guide ================== -A working python 3 installation is required (3.9 <= version <= 3.12 are tested). +A working python 3 installation is required (3.9 <= version <= 3.13 are tested). It is highly recommended to use this module in combination with `Ipython `_ and `jupyter `_. diff --git a/mypy.ini b/mypy.ini index d9dd5331..5c080c44 100644 --- a/mypy.ini +++ b/mypy.ini @@ -10,6 +10,10 @@ disallow_untyped_defs = False check_untyped_defs = False +[mypy-setup] + disallow_untyped_defs = False + check_untyped_defs = False + [mypy-tests.*] disallow_untyped_defs = False check_untyped_defs = False @@ -20,6 +24,9 @@ [mypy-numba.*] ignore_missing_imports = True +[mypy-ConfigParser.*] + ignore_missing_imports = True + [mypy-setuptools.*] ignore_missing_imports = True @@ -33,4 +40,7 @@ ignore_missing_imports = True [mypy-chemcoord.*] + ignore_missing_imports = True + +[mypy-ruamel.*] ignore_missing_imports = True \ No newline at end of file diff --git a/setup.py b/setup.py index 7ddbd2f3..efd77f77 100644 --- a/setup.py +++ b/setup.py @@ -74,7 +74,7 @@ def setup_package(): packages=find_packages("src"), package_dir={"": "src"}, install_requires=INSTALL_REQUIRES, - python_requires=">=3.9,<3.13", + python_requires=">=3.8,<3.14", ) diff --git a/src/chemcoord/configuration.py b/src/chemcoord/configuration.py index 07d23a81..3f210c75 100644 --- a/src/chemcoord/configuration.py +++ b/src/chemcoord/configuration.py @@ -1,9 +1,5 @@ # -*- coding: utf-8 -*- -try: - import configparser -except ImportError: - # Due to PY27 compatibility - import ConfigParser as configparser +import configparser import os from warnings import warn diff --git a/tests/static_analysis_requirements.txt b/tests/static_analysis_requirements.txt new file mode 100644 index 00000000..ec398195 --- /dev/null +++ b/tests/static_analysis_requirements.txt @@ -0,0 +1,10 @@ +# the additional (!) requirements for performing tests and static analysis of the code +# the dependencies of `chemcoord` itself are given in the setup.py +ruff +pylint +mypy +pytest +pytest-cov +types-simplejson +pandas-stubs +ase-stubs