diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9325242e7..480760751 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: "3.13" + python-version: "3.14" - name: install tests dependencies run: python -m pip install tox diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b2087b794..16bef9555 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -16,7 +16,7 @@ jobs: - name: setup Python uses: actions/setup-python@v6 with: - python-version: "3.13" + python-version: "3.14" - name: install tests dependencies run: python -m pip install tox diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8961c6481..040f0d472 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,7 +14,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: "3.13" + python-version: "3.14" - name: install tests dependencies run: python -m pip install tox diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 220cb8f9f..64b213b6f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: - name: setup Python uses: actions/setup-python@v6 with: - python-version: "3.13" + python-version: "3.14" - run: python -m pip install tox - name: Build package run: tox -e build diff --git a/.github/workflows/tests-dev.yml b/.github/workflows/tests-dev.yml index 8ce0ba4a8..957823739 100644 --- a/.github/workflows/tests-dev.yml +++ b/.github/workflows/tests-dev.yml @@ -11,8 +11,8 @@ jobs: strategy: matrix: python-version: - - "3.10" - - "3.13" + - "3.11" + - "3.14" steps: - uses: actions/checkout@v6 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c4ee2836a..ad511624f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,8 +16,8 @@ jobs: - macos-latest - windows-latest python-version: - - "3.10" - - "3.13" + - "3.11" + - "3.14" steps: - uses: actions/checkout@v6 diff --git a/CHANGELOG b/CHANGELOG index f6acf712e..8786d6aa9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -13,6 +13,11 @@ The rules for CHANGELOG file: Unreleased ---------- +- Fix PCovC scaling (#270) +- Refactor of reconstruction measures(#275) +- Code cleanup of Base classes (#264) +- Update ``sklearn`` dependency to `>=1.8.0` (#278) +- Bump minimal Python version to 3.11 (#278) 0.3.2 (2025/07/15) ------------------ diff --git a/README.rst b/README.rst index 2f39ddddf..ffb031324 100644 --- a/README.rst +++ b/README.rst @@ -34,7 +34,7 @@ You can then ``import skmatter`` and use scikit-matter in your projects! Tests ----- -We are testing our code for Python 3.10 and 3.13 on the latest versions of Ubuntu, +We are testing our code for Python 3.11 and 3.14 on the latest versions of Ubuntu, macOS and Windows. .. marker-issues diff --git a/docs/requirements.txt b/docs/requirements.txt index c16d3583f..7051d76cb 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -2,4 +2,3 @@ sphinx sphinx-gallery sphinx-toggleprompt pydata-sphinx-theme -tomli diff --git a/docs/src/conf.py b/docs/src/conf.py index 48e617faf..732b4cdcc 100644 --- a/docs/src/conf.py +++ b/docs/src/conf.py @@ -10,12 +10,11 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. +import tomllib import os import sys from datetime import datetime -import tomli # Replace by tomllib from std library once docs are build with Python 3.11 - import skmatter @@ -28,7 +27,7 @@ master_doc = "index" with open(os.path.join(ROOT, "pyproject.toml"), "rb") as fp: - project_dict = tomli.load(fp)["project"] + project_dict = tomllib.load(fp)["project"] project = project_dict["name"] author = ", ".join(a["name"] for a in project_dict["authors"]) diff --git a/pyproject.toml b/pyproject.toml index 02d259a44..28cb577ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ authors = [ {name = "Michele Ceriotti"} ] readme = "README.rst" -requires-python = ">=3.10" +requires-python = ">=3.11" license = {text = "BSD-3-Clause"} classifiers = [ "Development Status :: 4 - Beta", @@ -32,14 +32,14 @@ classifiers = [ "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Topic :: Scientific/Engineering", ] dependencies = [ - "scikit-learn >= 1.7, < 1.8", + "scikit-learn >= 1.8, < 1.9", "scipy >= 1.15", # explicit to adhere to scikit-learn dependencies ] dynamic = ["version"] diff --git a/src/skmatter/metrics/_prediction_rigidities.py b/src/skmatter/metrics/_prediction_rigidities.py index 19446ccc3..15365059c 100644 --- a/src/skmatter/metrics/_prediction_rigidities.py +++ b/src/skmatter/metrics/_prediction_rigidities.py @@ -74,7 +74,7 @@ def local_prediction_rigidity(X_train, X_test, alpha): for ai in range(atom_count): Xi = X_test[ai].reshape(1, -1) / sfactor - LPR_np[ai] = 1 / (Xi @ Xinv @ Xi.T) + LPR_np[ai] = 1 / (Xi @ Xinv @ Xi.T).item() # separately store LPR by test struc LPR = [] @@ -180,11 +180,11 @@ def componentwise_prediction_rigidity(X_train, X_test, alpha, comp_dims): for ai in range(atom_count): Xic = np.multiply(X_test[ai].reshape(1, -1) / sfactor, mask) - LCPR_np[ai, ci] = 1 / (Xic @ Xinv @ Xic.T) + LCPR_np[ai, ci] = 1 / (Xic @ Xinv @ Xic.T).item() for si in range(len(X_struc_test)): XAc = np.multiply(X_struc_test[si].reshape(1, -1), mask) - CPR[si, ci] = 1 / (XAc @ Xinv @ XAc.T) + CPR[si, ci] = 1 / (XAc @ Xinv @ XAc.T).item() # separately store LCPR by test struc LCPR = []