From c528dcdacc4706c5615775298ff3f2342f0b3c3d Mon Sep 17 00:00:00 2001 From: Guillaume Fraux Date: Fri, 15 May 2026 17:21:55 +0200 Subject: [PATCH 1/3] Build wheels for PyTorch 2.12 --- .github/workflows/build-wheels.yml | 5 +++-- .github/workflows/torch-tests.yml | 8 ++++---- featomic-torch/CHANGELOG.md | 2 +- featomic-torch/tests/utils/mod.rs | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 6e9ac9cbd..4dc2c1c2b 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -99,7 +99,7 @@ jobs: name: ${{ matrix.name }} (torch v${{ matrix.torch-version }}) strategy: matrix: - torch-version: ['2.3', '2.4', '2.5', '2.6', '2.7', '2.8', '2.9', '2.10', '2.11'] + torch-version: ['2.3', '2.4', '2.5', '2.6', '2.7', '2.8', '2.9', '2.10', '2.11', '2.12'] arch: ['arm64', 'x86_64'] os: ['ubuntu-24.04', 'ubuntu-24.04-arm', 'macos-15', 'windows-2022'] exclude: @@ -139,7 +139,8 @@ jobs: - {torch-version: '2.8', cibw-python: 'cp312-*'} - {torch-version: '2.9', cibw-python: 'cp312-*'} - {torch-version: '2.10', cibw-python: 'cp313-*'} - - {torch-version: '2.11', cibw-python: 'cp313-*'} + - {torch-version: '2.11', cibw-python: 'cp314-*'} + - {torch-version: '2.12', cibw-python: 'cp314-*'} steps: - uses: actions/checkout@v6 with: diff --git a/.github/workflows/torch-tests.yml b/.github/workflows/torch-tests.yml index b38037806..e71b3b0e0 100644 --- a/.github/workflows/torch-tests.yml +++ b/.github/workflows/torch-tests.yml @@ -24,7 +24,7 @@ jobs: cargo-test-flags: --release - os: ubuntu-24.04 - torch-version: "2.11" + torch-version: "2.12" python-version: "3.13" cargo-test-flags: --release do-valgrind: true @@ -33,18 +33,18 @@ jobs: - os: ubuntu-24.04 container: ubuntu:22.04 extra-name: ", cmake 3.22" - torch-version: "2.11" + torch-version: "2.12" python-version: "3.13" cargo-test-flags: "" cxx-flags: -fsanitize=undefined -fsanitize=address -fno-omit-frame-pointer -g - os: macos-15 - torch-version: "2.11" + torch-version: "2.12" python-version: "3.13" cargo-test-flags: --release - os: windows-2022 - torch-version: "2.11" + torch-version: "2.12" python-version: "3.13" cargo-test-flags: --release diff --git a/featomic-torch/CHANGELOG.md b/featomic-torch/CHANGELOG.md index 432e6b783..cf56ea307 100644 --- a/featomic-torch/CHANGELOG.md +++ b/featomic-torch/CHANGELOG.md @@ -19,7 +19,7 @@ a changelog](https://keepachangelog.com/en/1.1.0/) format. This project follows ### Changed -- Added support for torch v2.11 +- Added support for torch v2.11 and v2.12 ## [Version 0.7.3](https://github.com/metatensor/featomic/releases/tag/featomic-torch-v0.7.3) - 2026-02-03 diff --git a/featomic-torch/tests/utils/mod.rs b/featomic-torch/tests/utils/mod.rs index c947314cd..6ef2c4ed5 100644 --- a/featomic-torch/tests/utils/mod.rs +++ b/featomic-torch/tests/utils/mod.rs @@ -84,7 +84,7 @@ pub fn setup_pytorch(build_dir: PathBuf) -> PathBuf { .expect("failed to run python"); assert!(status.success(), "failed to run `python -m pip install --upgrade pip`"); - let torch_version = std::env::var("FEATOMIC_TORCH_TEST_VERSION").unwrap_or("2.11.*".into()); + let torch_version = std::env::var("FEATOMIC_TORCH_TEST_VERSION").unwrap_or("2.12.*".into()); let status = Command::new(&python) .arg("-m") .arg("pip") From d529fdc09073ac20d1f21331342c371c063ce133 Mon Sep 17 00:00:00 2001 From: Guillaume Fraux Date: Sun, 17 May 2026 20:36:00 +0200 Subject: [PATCH 2/3] Use pathlib for path manipulation in setup.py --- python/featomic/setup.py | 41 ++++++++------- .../featomic_torch/build-backend/backend.py | 9 ++-- python/featomic_torch/setup.py | 51 ++++++++++--------- 3 files changed, 51 insertions(+), 50 deletions(-) diff --git a/python/featomic/setup.py b/python/featomic/setup.py index 1ed63aa3f..6d3ce23f5 100644 --- a/python/featomic/setup.py +++ b/python/featomic/setup.py @@ -1,5 +1,6 @@ import glob import os +import pathlib import subprocess import sys @@ -11,8 +12,8 @@ from setuptools.command.sdist import sdist -ROOT = os.path.realpath(os.path.dirname(__file__)) -FEATOMIC_SRC = os.path.realpath(os.path.join(ROOT, "..", "..", "featomic")) +ROOT = pathlib.Path(__file__).parent.resolve() +FEATOMIC_SRC = (ROOT / ".." / ".." / "featomic").resolve() FEATOMIC_BUILD_TYPE = os.environ.get("FEATOMIC_BUILD_TYPE", "release") if FEATOMIC_BUILD_TYPE not in ["debug", "release"]: @@ -21,9 +22,7 @@ "expected 'debug' or 'release'" ) -# The code for featomic-torch needs to live in `featomic_torch` directory until -# https://github.com/pypa/pip/issues/13093 is fixed. -FEATOMIC_TORCH_SRC = os.path.realpath(os.path.join(ROOT, "..", "featomic_torch")) +FEATOMIC_TORCH_SRC = (ROOT / ".." / "featomic_torch").resolve() class universal_wheel(bdist_wheel): @@ -47,8 +46,8 @@ def run(self): import metatensor source_dir = FEATOMIC_SRC - build_dir = os.path.join(ROOT, "build", "cmake-build") - install_dir = os.path.join(os.path.realpath(self.build_lib), "featomic") + build_dir = ROOT / "build" / "cmake-build" + install_dir = pathlib.Path(self.build_lib).resolve() / "featomic" try: os.mkdir(build_dir) @@ -154,8 +153,8 @@ def run(self): def generate_cxx_tar(): - script = os.path.join(ROOT, "..", "..", "scripts", "package-featomic.sh") - assert os.path.exists(script) + script = ROOT / ".." / ".." / "scripts" / "package-featomic.sh" + assert script.exists() try: output = subprocess.run( @@ -184,7 +183,7 @@ def generate_cxx_tar(): def get_rust_version(): # read version from Cargo.toml - with open(os.path.join(FEATOMIC_SRC, "Cargo.toml")) as fd: + with open(FEATOMIC_SRC / "Cargo.toml") as fd: for line in fd: if line.startswith("version"): _, version = line.split(" = ") @@ -204,15 +203,15 @@ def git_version_info(): """ TAG_PREFIX = "featomic-v" - if os.path.exists("git_version_info"): + if (ROOT / "git_version_info").exists(): # we are building from a sdist, without git available, but the git # version was recorded in the `git_version_info` file - with open("git_version_info") as fd: + with open(ROOT / "git_version_info") as fd: n_commits = int(fd.readline().strip()) git_hash = fd.readline().strip() else: - script = os.path.join(ROOT, "..", "..", "scripts", "git-version-info.py") - assert os.path.exists(script) + script = ROOT / ".." / ".." / "scripts" / "git-version-info.py" + assert script.exists() output = subprocess.run( [sys.executable, script, TAG_PREFIX], @@ -268,10 +267,10 @@ def create_version_number(version): if __name__ == "__main__": - if not os.path.exists(FEATOMIC_SRC): + if not FEATOMIC_SRC.exists(): # we are building from a sdist, which should include featomic Rust # sources as a tarball - tarballs = glob.glob(os.path.join(ROOT, "featomic-*.tar.gz")) + tarballs = glob.glob("featomic-*.tar.gz", root_dir=ROOT) if not len(tarballs) == 1: raise RuntimeError( @@ -280,25 +279,25 @@ def create_version_number(version): "scripts/package-featomic.sh" ) - FEATOMIC_SRC = os.path.realpath(tarballs[0]) + FEATOMIC_SRC = pathlib.Path(tarballs[0]).resolve() subprocess.run( ["cmake", "-E", "tar", "xf", FEATOMIC_SRC], cwd=ROOT, check=True, ) - FEATOMIC_SRC = ".".join(FEATOMIC_SRC.split(".")[:-2]) + FEATOMIC_SRC = pathlib.Path(".".join(str(FEATOMIC_SRC).split(".")[:-2])) - with open(os.path.join(ROOT, "AUTHORS")) as fd: + with open(ROOT / "AUTHORS") as fd: authors = fd.read().splitlines() extras_require = {} # when packaging a sdist for release, we should never use local dependencies FEATOMIC_NO_LOCAL_DEPS = os.environ.get("FEATOMIC_NO_LOCAL_DEPS", "0") == "1" - if not FEATOMIC_NO_LOCAL_DEPS and os.path.exists(FEATOMIC_TORCH_SRC): + if not FEATOMIC_NO_LOCAL_DEPS and FEATOMIC_TORCH_SRC.exists(): # we are building from a git checkout - extras_require["torch"] = f"featomic-torch @ file://{FEATOMIC_TORCH_SRC}" + extras_require["torch"] = f"featomic-torch @ {FEATOMIC_TORCH_SRC.as_uri()}" else: # we are building from a sdist/installing from a wheel extras_require["torch"] = "featomic-torch" diff --git a/python/featomic_torch/build-backend/backend.py b/python/featomic_torch/build-backend/backend.py index 3a43ca794..067ebabcc 100644 --- a/python/featomic_torch/build-backend/backend.py +++ b/python/featomic_torch/build-backend/backend.py @@ -2,12 +2,13 @@ # dependencies to featomic, using the local version if it exists, and otherwise # falling back to the one on PyPI. import os +import pathlib from setuptools import build_meta -ROOT = os.path.realpath(os.path.join(os.path.dirname(__file__), "..")) -FEATOMIC_SRC = os.path.realpath(os.path.join(ROOT, "..", "featomic")) +ROOT = pathlib.Path(__file__).parent.parent.resolve() +FEATOMIC_SRC = (ROOT / ".." / "featomic").resolve() FORCED_FEATOMIC_VERSION = os.environ.get("FEATOMIC_TORCH_BUILD_WITH_FEATOMIC_VERSION") FEATOMIC_NO_LOCAL_DEPS = os.environ.get("FEATOMIC_NO_LOCAL_DEPS", "0") == "1" @@ -17,9 +18,9 @@ # from a sdist on a non-released version FEATOMIC_DEP = f"featomic =={FORCED_FEATOMIC_VERSION}" -elif not FEATOMIC_NO_LOCAL_DEPS and os.path.exists(FEATOMIC_SRC): +elif not FEATOMIC_NO_LOCAL_DEPS and FEATOMIC_SRC.exists(): # we are building from a git checkout - FEATOMIC_DEP = f"featomic @ file://{FEATOMIC_SRC}" + FEATOMIC_DEP = f"featomic @ {FEATOMIC_SRC.as_uri()}" else: # we are building from a sdist FEATOMIC_DEP = "featomic >=0.6.6rc1,<0.7" diff --git a/python/featomic_torch/setup.py b/python/featomic_torch/setup.py index 5c4c754c9..3fc484efb 100644 --- a/python/featomic_torch/setup.py +++ b/python/featomic_torch/setup.py @@ -1,5 +1,6 @@ import glob import os +import pathlib import subprocess import sys @@ -11,10 +12,10 @@ from setuptools.command.sdist import sdist -ROOT = os.path.realpath(os.path.dirname(__file__)) +ROOT = pathlib.Path(__file__).parent.resolve() -FEATOMIC_PYTHON_SRC = os.path.realpath(os.path.join(ROOT, "..", "featomic")) -FEATOMIC_TORCH_SRC = os.path.realpath(os.path.join(ROOT, "..", "..", "featomic-torch")) +FEATOMIC_PYTHON_SRC = (ROOT / ".." / "featomic").resolve() +FEATOMIC_TORCH_SRC = (ROOT / ".." / ".." / "featomic-torch").resolve() class universal_wheel(bdist_wheel): @@ -42,10 +43,10 @@ def run(self): import featomic source_dir = FEATOMIC_TORCH_SRC - build_dir = os.path.join(ROOT, "build", "cmake-build") - install_dir = os.path.join(os.path.realpath(self.build_lib), "featomic/torch") + build_dir = ROOT / "build" / "cmake-build" + install_dir = pathlib.Path(self.build_lib).resolve() / "featomic" / "torch" - os.makedirs(build_dir, exist_ok=True) + build_dir.mkdir(parents=True, exist_ok=True) # Tell CMake where to find featomic & torch cmake_prefix_path = [ @@ -60,9 +61,7 @@ def run(self): # compile the code. This allows having multiple version of this shared library # inside the wheel; and dynamically pick the right one. torch_major, torch_minor, *_ = torch.__version__.split(".") - cmake_install_prefix = os.path.join( - install_dir, f"torch-{torch_major}.{torch_minor}" - ) + cmake_install_prefix = install_dir / f"torch-{torch_major}.{torch_minor}" cmake_options = [ "-DCMAKE_BUILD_TYPE=Release", @@ -121,7 +120,7 @@ def run(self): check=True, ) - with open(os.path.join(install_dir, "_build_versions.py"), "w") as fd: + with open(install_dir / "_build_versions.py", "w") as fd: fd.write("# Autogenerated file, do not edit\n\n\n") # Store the version of featomic used to build featomic_torch, to give a # nice error message to the user when trying to load the package @@ -170,8 +169,8 @@ def run(self): def generate_cxx_tar(): - script = os.path.join(ROOT, "..", "..", "scripts", "package-featomic-torch.sh") - assert os.path.exists(script) + script = ROOT / ".." / ".." / "scripts" / "package-featomic-torch.sh" + assert script.exists() try: output = subprocess.run( @@ -205,15 +204,15 @@ def git_version_info(): """ TAG_PREFIX = "featomic-torch-v" - if os.path.exists("git_version_info"): + if (ROOT / "git_version_info").exists(): # we are building from a sdist, without git available, but the git # version was recorded in the `git_version_info` file - with open("git_version_info") as fd: + with open(ROOT / "git_version_info") as fd: n_commits = int(fd.readline().strip()) git_hash = fd.readline().strip() else: - script = os.path.join(ROOT, "..", "..", "scripts", "git-version-info.py") - assert os.path.exists(script) + script = ROOT / ".." / ".." / "scripts" / "git-version-info.py" + assert script.exists() output = subprocess.run( [sys.executable, script, TAG_PREFIX], @@ -301,10 +300,10 @@ def create_version_number(version): # End of Windows/MKL/PIP hack - if not os.path.exists(FEATOMIC_TORCH_SRC): + if not FEATOMIC_TORCH_SRC.exists(): # we are building from a sdist, which should include featomic-torch # sources as a tarball - tarballs = glob.glob(os.path.join(ROOT, "featomic-torch-cxx-*.tar.gz")) + tarballs = glob.glob("featomic-torch-cxx-*.tar.gz", root_dir=ROOT) if not len(tarballs) == 1: raise RuntimeError( @@ -312,24 +311,26 @@ def create_version_number(version): "featomic-torch C++ sources" ) - FEATOMIC_TORCH_SRC = os.path.realpath(tarballs[0]) + FEATOMIC_TORCH_SRC = pathlib.Path(tarballs[0]).resolve() subprocess.run( ["cmake", "-E", "tar", "xf", FEATOMIC_TORCH_SRC], cwd=ROOT, check=True, ) - FEATOMIC_TORCH_SRC = ".".join(FEATOMIC_TORCH_SRC.split(".")[:-2]) + FEATOMIC_TORCH_SRC = pathlib.Path( + ".".join(str(FEATOMIC_TORCH_SRC).split(".")[:-2]) + ) - with open(os.path.join(FEATOMIC_TORCH_SRC, "VERSION")) as fd: + with open(FEATOMIC_TORCH_SRC / "VERSION") as fd: version = create_version_number(fd.read().strip()) - with open(os.path.join(ROOT, "AUTHORS")) as fd: + with open(ROOT / "AUTHORS") as fd: authors = fd.read().splitlines() if authors[0].startswith(".."): # handle "raw" symlink files (on Windows or from full repo tarball) - with open(os.path.join(ROOT, authors[0])) as fd: + with open(ROOT / authors[0]) as fd: authors = fd.read().splitlines() try: @@ -351,9 +352,9 @@ def create_version_number(version): # when packaging a sdist for release, we should never use local dependencies FEATOMIC_NO_LOCAL_DEPS = os.environ.get("FEATOMIC_NO_LOCAL_DEPS", "0") == "1" - if not FEATOMIC_NO_LOCAL_DEPS and os.path.exists(FEATOMIC_PYTHON_SRC): + if not FEATOMIC_NO_LOCAL_DEPS and FEATOMIC_PYTHON_SRC.exists(): # we are building from a git checkout - install_requires.append(f"featomic @ file://{FEATOMIC_PYTHON_SRC}") + install_requires.append(f"featomic @ {FEATOMIC_PYTHON_SRC.as_uri()}") else: # we are building from a sdist/installing from a wheel install_requires.append("featomic >=0.6.6rc1,<0.7") From 562b11aeca4b5948fbb9c253a64e13ab822f7f0e Mon Sep 17 00:00:00 2001 From: Guillaume Fraux Date: Fri, 15 May 2026 11:06:25 +0200 Subject: [PATCH 3/3] Release featomic v0.6.6 and featomic-torch v0.7.4 --- docs/requirements.txt | 6 +++--- featomic-torch/CHANGELOG.md | 3 +++ featomic-torch/CMakeLists.txt | 10 +++++----- featomic-torch/VERSION | 2 +- featomic-torch/tests/cmake-project/CMakeLists.txt | 2 +- featomic/CHANGELOG.md | 6 ++++++ featomic/CMakeLists.txt | 4 ++-- featomic/Cargo.toml | 6 +++--- featomic/tests/cmake-project/CMakeLists.txt | 2 +- python/featomic/build-backend/backend.py | 2 +- python/featomic/pyproject.toml | 4 ++-- python/featomic_torch/build-backend/backend.py | 6 +++--- python/featomic_torch/setup.py | 6 +++--- tox.ini | 8 ++++---- 14 files changed, 38 insertions(+), 29 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 0d94182a9..3ecc5dbdc 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -10,9 +10,9 @@ myst-parser # markdown => rst translation, used in extensions/featomic_json_ # dependencies for the tutorials --extra-index-url https://download.pytorch.org/whl/cpu -metatensor-operations >=0.5.0-rc2,<0.6 -metatensor-torch >=0.9.0-rc6,<0.10 -metatomic-torch >= 0.1.12-rc2,<0.2 +metatensor-operations >=0.5.0,<0.6 +metatensor-torch >=0.9.0,<0.10 +metatomic-torch >= 0.1.12,<0.2 torch chemfiles matplotlib diff --git a/featomic-torch/CHANGELOG.md b/featomic-torch/CHANGELOG.md index cf56ea307..c592ea4a3 100644 --- a/featomic-torch/CHANGELOG.md +++ b/featomic-torch/CHANGELOG.md @@ -17,9 +17,12 @@ a changelog](https://keepachangelog.com/en/1.1.0/) format. This project follows ### Removed --> +## [Version 0.7.4](https://github.com/metatensor/featomic/releases/tag/featomic-torch-v0.7.4) - 2026-05-15 + ### Changed - Added support for torch v2.11 and v2.12 +- The code is now compatible with metatensor-torch v0.9.0 ## [Version 0.7.3](https://github.com/metatensor/featomic/releases/tag/featomic-torch-v0.7.3) - 2026-02-03 diff --git a/featomic-torch/CMakeLists.txt b/featomic-torch/CMakeLists.txt index f4a6dc7b2..1140f8e3b 100644 --- a/featomic-torch/CMakeLists.txt +++ b/featomic-torch/CMakeLists.txt @@ -81,7 +81,7 @@ function(check_compatible_versions _dependency_ _actual_ _requested_) endfunction() -set(REQUIRED_FEATOMIC_VERSION "0.6.6-rc1") +set(REQUIRED_FEATOMIC_VERSION "0.6.6") if (NOT "$ENV{FEATOMIC_NO_LOCAL_DEPS}" STREQUAL "1") # If building a dev version, we also need to update the # REQUIRED_FEATOMIC_VERSION in the same way we update the @@ -122,7 +122,7 @@ find_package(Torch 2.3 REQUIRED) # # When updating METATENSOR_TORCH_FETCH_VERSION, you will also have to update the # SHA256 sum of the file in `FetchContent_Declare`. -set(METATENSOR_TORCH_FETCH_VERSION "0.9.0-rc6") +set(METATENSOR_TORCH_FETCH_VERSION "0.9.0") set(REQUIRED_METATENSOR_TORCH_VERSION "0.9") if (FEATOMIC_FETCH_METATENSOR_TORCH) message(STATUS "Fetching metatensor-torch from github") @@ -132,7 +132,7 @@ if (FEATOMIC_FETCH_METATENSOR_TORCH) FetchContent_Declare( metatensor_torch URL ${URL_ROOT}/metatensor-torch-v${METATENSOR_TORCH_FETCH_VERSION}/metatensor-torch-cxx-${METATENSOR_TORCH_FETCH_VERSION}.tar.gz - URL_HASH SHA256=73afb6795a04e6e31a993d11e35183d3aa3e97b2d30e14b1a4a04c45263a13bc + URL_HASH SHA256=4e31c235447b6bc14c7703c640e2f35409813c2f159a32b8d23386ad4a5abd57 ) FetchContent_MakeAvailable(metatensor_torch) @@ -150,7 +150,7 @@ endif() # # When updating METATOMIC_TORCH_FETCH_VERSION, you will also have to update the # SHA256 sum of the file in `FetchContent_Declare`. -set(METATOMIC_TORCH_FETCH_VERSION "0.1.12-rc2") +set(METATOMIC_TORCH_FETCH_VERSION "0.1.12") set(REQUIRED_METATOMIC_TORCH_VERSION "0.1") if (FEATOMIC_FETCH_METATENSOR_TORCH) message(STATUS "Fetching metatomic-torch from github") @@ -160,7 +160,7 @@ if (FEATOMIC_FETCH_METATENSOR_TORCH) FetchContent_Declare( metatomic_torch URL ${URL_ROOT}/metatomic-torch-v${METATOMIC_TORCH_FETCH_VERSION}/metatomic-torch-cxx-${METATOMIC_TORCH_FETCH_VERSION}.tar.gz - URL_HASH SHA256=38a0de4d9320487405b13ed208013895b829ab74cf9bb774e88c5b628368fc49 + URL_HASH SHA256=d9e587c7ce3d9d6338ed5f6da119e2a3b29698381886f36a53603523c0499542 ) FetchContent_MakeAvailable(metatomic_torch) diff --git a/featomic-torch/VERSION b/featomic-torch/VERSION index 3d492e073..0a1ffad4b 100644 --- a/featomic-torch/VERSION +++ b/featomic-torch/VERSION @@ -1 +1 @@ -0.7.4-rc2 +0.7.4 diff --git a/featomic-torch/tests/cmake-project/CMakeLists.txt b/featomic-torch/tests/cmake-project/CMakeLists.txt index c46edbfb0..c1ec2ab86 100644 --- a/featomic-torch/tests/cmake-project/CMakeLists.txt +++ b/featomic-torch/tests/cmake-project/CMakeLists.txt @@ -6,7 +6,7 @@ project(featomic-torch-test-cmake-project CXX) # We need to update the REQUIRED_FEATOMIC_VERSION in the same way we update the # featomic version for dev builds include(../../cmake/dev-versions.cmake) -set(REQUIRED_FEATOMIC_TORCH_VERSION "0.7.4-rc2") +set(REQUIRED_FEATOMIC_TORCH_VERSION "0.7.4") create_development_version("${REQUIRED_FEATOMIC_TORCH_VERSION}" FEATOMIC_TORCH_FULL_VERSION "featomic-torch-v") string(REGEX REPLACE "([0-9]*)\\.([0-9]*).*" "\\1.\\2" REQUIRED_FEATOMIC_TORCH_VERSION ${FEATOMIC_TORCH_FULL_VERSION}) find_package(featomic_torch ${REQUIRED_FEATOMIC_TORCH_VERSION} REQUIRED) diff --git a/featomic/CHANGELOG.md b/featomic/CHANGELOG.md index 45668ac95..5b00562cc 100644 --- a/featomic/CHANGELOG.md +++ b/featomic/CHANGELOG.md @@ -17,6 +17,12 @@ a changelog](https://keepachangelog.com/en/1.1.0/) format. This project follows ### Removed --> +## [Version 0.6.6](https://github.com/metatensor/featomic/releases/tag/featomic-v0.6.6) - 2026-05-15 + +### Changed + +- The code is now compatible with metatensor v0.2.0 + ## [Version 0.6.5](https://github.com/metatensor/featomic/releases/tag/featomic-v0.6.5) - 2026-03-31 ### Fixed diff --git a/featomic/CMakeLists.txt b/featomic/CMakeLists.txt index a161bf219..62ffa2a09 100644 --- a/featomic/CMakeLists.txt +++ b/featomic/CMakeLists.txt @@ -246,7 +246,7 @@ endif() # # When updating METATENSOR_FETCH_VERSION, you will also have to update the # SHA256 sum of the file in `FetchContent_Declare`. -set(METATENSOR_FETCH_VERSION "0.2.0-rc4") +set(METATENSOR_FETCH_VERSION "0.2.0") set(METATENSOR_REQUIRED_VERSION "0.2") if (FEATOMIC_FETCH_METATENSOR) message(STATUS "Fetching metatensor-core from github") @@ -256,7 +256,7 @@ if (FEATOMIC_FETCH_METATENSOR) FetchContent_Declare( metatensor URL ${URL_ROOT}/metatensor-core-v${METATENSOR_FETCH_VERSION}/metatensor-core-cxx-${METATENSOR_FETCH_VERSION}.tar.gz - URL_HASH SHA256=192b8a416cf83e9fbfd0e45c5d4b8d9787e715463b767982e55dc69af309fb34 + URL_HASH SHA256=809a799b1c8d58b7ede3868d6ebe4123924ba31e4637481f9ca5c8a0ed14be17 ) FetchContent_MakeAvailable(metatensor) diff --git a/featomic/Cargo.toml b/featomic/Cargo.toml index 52361ad48..1459a559d 100644 --- a/featomic/Cargo.toml +++ b/featomic/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "featomic" -version = "0.6.6-rc1" +version = "0.6.6" authors = ["Guillaume Fraux "] edition = "2021" rust-version = "1.74" @@ -25,7 +25,7 @@ metatensor-static = ["metatensor/static"] all-features = true [dependencies] -metatensor = { version = "0.3.0-rc2", features = ["rayon"]} +metatensor = { version = "0.3.0", features = ["rayon"]} ndarray = {version = "0.17", features = ["rayon", "serde", "approx"]} num-traits = "0.2" @@ -59,7 +59,7 @@ toml_writer = "=1.0.2" [build-dependencies] cbindgen = { version = "0.29", default-features = false } fs_extra = "1" -metatensor = { version = "0.3.0-rc2" } +metatensor = { version = "0.3.0" } # the last versions that supports Rust 1.74 tempfile = "=3.24.0" diff --git a/featomic/tests/cmake-project/CMakeLists.txt b/featomic/tests/cmake-project/CMakeLists.txt index bbc3c8fbd..b9216174c 100644 --- a/featomic/tests/cmake-project/CMakeLists.txt +++ b/featomic/tests/cmake-project/CMakeLists.txt @@ -5,7 +5,7 @@ project(featomic-test-cmake-project C CXX) # We need to update the REQUIRED_FEATOMIC_VERSION in the same way we update the # featomic version for dev builds include(../../cmake/dev-versions.cmake) -set(REQUIRED_FEATOMIC_VERSION "0.6.6-rc1") +set(REQUIRED_FEATOMIC_VERSION "0.6.6") create_development_version("${REQUIRED_FEATOMIC_VERSION}" FEATOMIC_FULL_VERSION "featomic-v") string(REGEX REPLACE "([0-9]*)\\.([0-9]*).*" "\\1.\\2" REQUIRED_FEATOMIC_VERSION ${FEATOMIC_FULL_VERSION}) find_package(featomic ${REQUIRED_FEATOMIC_VERSION} REQUIRED) diff --git a/python/featomic/build-backend/backend.py b/python/featomic/build-backend/backend.py index e94dd2667..9c8a5d2f5 100644 --- a/python/featomic/build-backend/backend.py +++ b/python/featomic/build-backend/backend.py @@ -11,5 +11,5 @@ def get_requires_for_build_wheel(config_settings=None): defaults = build_meta.get_requires_for_build_wheel(config_settings) return defaults + [ "cmake", - "metatensor-core >=0.2.0rc4,<0.3", + "metatensor-core >=0.2.0,<0.3", ] diff --git a/python/featomic/pyproject.toml b/python/featomic/pyproject.toml index daca96528..d83039d44 100644 --- a/python/featomic/pyproject.toml +++ b/python/featomic/pyproject.toml @@ -25,8 +25,8 @@ classifiers = [ ] dependencies = [ - "metatensor-core >=0.2.0rc4,<0.3", - "metatensor-operations >=0.5.0rc2,<0.6", + "metatensor-core >=0.2.0,<0.3", + "metatensor-operations >=0.5.0,<0.6", "wigners", ] diff --git a/python/featomic_torch/build-backend/backend.py b/python/featomic_torch/build-backend/backend.py index 067ebabcc..9b502951b 100644 --- a/python/featomic_torch/build-backend/backend.py +++ b/python/featomic_torch/build-backend/backend.py @@ -23,7 +23,7 @@ FEATOMIC_DEP = f"featomic @ {FEATOMIC_SRC.as_uri()}" else: # we are building from a sdist - FEATOMIC_DEP = "featomic >=0.6.6rc1,<0.7" + FEATOMIC_DEP = "featomic >=0.6.6,<0.7" FORCED_TORCH_VERSION = os.environ.get("FEATOMIC_TORCH_BUILD_WITH_TORCH_VERSION") if FORCED_TORCH_VERSION is not None: @@ -43,7 +43,7 @@ def get_requires_for_build_wheel(config_settings=None): return defaults + [ "cmake", TORCH_DEP, - "metatensor-torch >=0.9.0rc6,<0.10", - "metatomic-torch >=0.1.12rc2,<0.2", + "metatensor-torch >=0.9.0,<0.10", + "metatomic-torch >=0.1.12,<0.2", FEATOMIC_DEP, ] diff --git a/python/featomic_torch/setup.py b/python/featomic_torch/setup.py index 3fc484efb..a39bf64d6 100644 --- a/python/featomic_torch/setup.py +++ b/python/featomic_torch/setup.py @@ -346,8 +346,8 @@ def create_version_number(version): install_requires = [ f"torch {torch_version}", - "metatensor-torch >=0.9.0-rc6,<0.10", - "metatomic-torch >=0.1.12-rc2,<0.2", + "metatensor-torch >=0.9.0,<0.10", + "metatomic-torch >=0.1.12,<0.2", ] # when packaging a sdist for release, we should never use local dependencies @@ -357,7 +357,7 @@ def create_version_number(version): install_requires.append(f"featomic @ {FEATOMIC_PYTHON_SRC.as_uri()}") else: # we are building from a sdist/installing from a wheel - install_requires.append("featomic >=0.6.6rc1,<0.7") + install_requires.append("featomic >=0.6.6,<0.7") setup( version=version, diff --git a/tox.ini b/tox.ini index 3c37d939a..2fdbb0735 100644 --- a/tox.ini +++ b/tox.ini @@ -21,11 +21,11 @@ lint-folders = "{toxinidir}/python" "{toxinidir}/setup.py" # we need to manually install dependencies for featomic, since tox will install # the fresh wheel with `--no-deps` after building it. metatensor-core-requirement = - metatensor-core >=0.2.0rc4,<0.3 + metatensor-core >=0.2.0,<0.3 metatensor-torch-requirement = - metatensor-torch >=0.9.0rc6,<0.10 - metatomic-torch >=0.1.12rc2,<0.2 + metatensor-torch >=0.9.0,<0.10 + metatomic-torch >=0.1.12,<0.2 build-single-wheel = --no-deps --no-build-isolation --check-build-dependencies warning_options = @@ -72,7 +72,7 @@ deps = {[testenv]metatensor-core-requirement} ase chemfiles - metatensor-operations >=0.5.0rc2,<0.6 + metatensor-operations >=0.5.0,<0.6 pytest pytest-cov scipy