diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 13206f5..fc8bf8b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,7 +7,7 @@ jobs: strategy: matrix: os: ["ubuntu-latest"] - python-version: ["3.11","3.12"] + python-version: ["3.12","3.13","3.14"] name: test robocrys (${{ matrix.os }}/py${{ matrix.python-version }}) runs-on: ${{ matrix.os }} steps: @@ -23,9 +23,15 @@ jobs: - name: Install dependencies shell: bash -l {0} run: | - conda install --quiet --yes -c conda-forge openbabel pip ruamel.yaml + conda install --quiet --yes -c conda-forge pip ruamel.yaml python${{ matrix.python-version }} -m pip install -e .[strict,tests,cli] + - name: Install openbabel (py<3.13) + if: ${{ matrix.python-version < '3.13' }} + shell: bash -l {0} + run: | + conda install --quiet --yes -c conda-forge openbabel + - name: Test shell: bash -l {0} run: python${{ matrix.python-version }} -m pytest -n auto --cov=robocrys --cov-report=xml --cov-config=.coveragerc tests/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bea9183..4b2547d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,25 +7,25 @@ ci: repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.3 + rev: v0.15.12 hooks: - id: ruff args: [--fix, --unsafe-fixes] - repo: https://github.com/psf/black - rev: 24.2.0 + rev: 26.3.1 hooks: - id: black - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v6.0.0 hooks: - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/PyCQA/autoflake - rev: v2.3.0 + rev: v2.3.3 hooks: - id: autoflake args: @@ -36,7 +36,7 @@ repos: - --ignore-init-module-imports - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.15.0 + rev: v1.20.2 hooks: - id: mypy files: ^robocrys/ diff --git a/README.md b/README.md index 39bbee9..b3225d0 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ Robocrystallographer can be installed using pip: pip install robocrys ``` -Robocrystallographer requires Python 3.7+. The +Robocrystallographer requires Python 3.11+. The [OpenBabel](http://openbabel.org/wiki/Python) package is required to determine molecule names. This is an optional requirement but its use is recommended for best diff --git a/pyproject.toml b/pyproject.toml index 06de53d..4f1d2a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,26 +71,26 @@ dev = ["tqdm", "pybel", "pebble", "maggma"] tests = ["pytest", "pytest-cov", "pytest-xdist"] cli = ["mp_api"] lint = [ - "coverage==7.13.1", + "coverage==7.13.5", "codacy-coverage==1.3.11", "pycodestyle==2.14.0", "mypy==1.19.1", "pydocstyle==6.1.1", "flake8==7.3.0", - "pylint==4.0.4", - "black==26.1.0", + "pylint==4.0.5", + "black==26.3.1", ] strict = [ "spglib==2.7.0", - "numpy==2.4.1,", - "scipy==1.17.0", - "pymatgen==2025.10.7", + "numpy==2.4.4,", + "scipy==1.17.1", + "pymatgen==2026.3.23", "inflect==7.5.0", "networkx==3.6.1", - "matminer==0.10.0", - "monty==2025.3.3", + "matminer==0.10.1", + "monty==2026.2.18", "pubchempy==1.0.5", - "pybtex==0.25.1", + "pybtex==0.26.1", ] [project.scripts] diff --git a/robocrys/cli.py b/robocrys/cli.py index 031b7bb..eb35559 100644 --- a/robocrys/cli.py +++ b/robocrys/cli.py @@ -9,7 +9,7 @@ from pymatgen.core.structure import Structure try: - from mp_api.client import MPRestError # type:ignore[import-untyped] + from mp_api.client import MPRestError # type: ignore[import-untyped] except ImportError: MPRestError = None diff --git a/robocrys/condense/fingerprint.py b/robocrys/condense/fingerprint.py index 3a13b53..56475bb 100644 --- a/robocrys/condense/fingerprint.py +++ b/robocrys/condense/fingerprint.py @@ -3,10 +3,10 @@ from collections.abc import Iterable import numpy as np -from matminer.featurizers.site import ( # type:ignore[import-untyped] +from matminer.featurizers.site import ( # type: ignore[import-untyped] CrystalNNFingerprint, ) -from matminer.featurizers.structure import ( # type:ignore[import-untyped] +from matminer.featurizers.structure import ( # type: ignore[import-untyped] SiteStatsFingerprint, ) from pymatgen.core.structure import IStructure diff --git a/robocrys/condense/mineral.py b/robocrys/condense/mineral.py index efa0181..487278e 100644 --- a/robocrys/condense/mineral.py +++ b/robocrys/condense/mineral.py @@ -17,7 +17,6 @@ get_structure_fingerprint, ) - if TYPE_CHECKING: from typing import Any import pandas as pd diff --git a/robocrys/condense/molecule.py b/robocrys/condense/molecule.py index d017b5f..73890bc 100644 --- a/robocrys/condense/molecule.py +++ b/robocrys/condense/molecule.py @@ -9,7 +9,7 @@ from monty.serialization import loadfn from importlib.resources import files as import_resource_file -from pubchempy import BadRequestError, get_compounds # type:ignore[import-untyped] +from pubchempy import BadRequestError, get_compounds # type: ignore[import-untyped] from pymatgen.analysis.graphs import MoleculeGraph from pymatgen.io.babel import BabelMolAdaptor diff --git a/robocrys/describe/describer.py b/robocrys/describe/describer.py index ed3be28..641da63 100644 --- a/robocrys/describe/describer.py +++ b/robocrys/describe/describer.py @@ -174,7 +174,7 @@ def get_mineral_description(self) -> str: if mineral_name := get_mineral_name(self._da.mineral): # replace latex-like characters with unicode latex_reps = { - "$\\mu$": "\u03BC", + "$\\mu$": "\u03bc", "\\'{c}": "\u0107", } if self.fmt in {"html", "unicode"} and any(