diff --git a/.github/workflows/ase-tests.yml b/.github/workflows/ase-tests.yml index fb2d6173..3b1b6406 100644 --- a/.github/workflows/ase-tests.yml +++ b/.github/workflows/ase-tests.yml @@ -41,6 +41,19 @@ jobs: python -m pip install --upgrade pip python -m pip install tox coverage + + - name: install metatensor from labels-values-array-clean branch + run: | + pip install setuptools cmake packaging wheel + git clone --depth 1 --branch labels-values-array-clean https://github.com/HaoZeke/metatensor.git ${{ runner.temp }}/metatensor-v020 + METATENSOR_NO_LOCAL_DEPS=1 pip install --no-build-isolation ${{ runner.temp }}/metatensor-v020/python/metatensor_core + METATENSOR_NO_LOCAL_DEPS=1 pip install --no-build-isolation ${{ runner.temp }}/metatensor-v020/python/metatensor_operations + METATENSOR_NO_LOCAL_DEPS=1 pip install --no-build-isolation ${{ runner.temp }}/metatensor-v020/python/metatensor_learn + pip install torch + METATENSOR_NO_LOCAL_DEPS=1 pip install --no-build-isolation ${{ runner.temp }}/metatensor-v020/python/metatensor_torch + env: + PIP_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu + - name: run tests run: tox -e ase-tests env: diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 75a96242..76ec3771 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -3,7 +3,8 @@ name: Build Python wheels on: push: tags: ["*"] - pull_request: + # Disabled for test/metatensor-v0.2.0: packaging requires released metatensor + # pull_request: paths: # build wheels in PR if this file changed - '.github/workflows/build-wheels.yml' diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 939d6636..326d9295 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -32,6 +32,19 @@ jobs: python -m pip install tox sudo apt install doxygen + + - name: install metatensor from labels-values-array-clean branch + run: | + pip install setuptools cmake packaging wheel + git clone --depth 1 --branch labels-values-array-clean https://github.com/HaoZeke/metatensor.git ${{ runner.temp }}/metatensor-v020 + METATENSOR_NO_LOCAL_DEPS=1 pip install --no-build-isolation ${{ runner.temp }}/metatensor-v020/python/metatensor_core + METATENSOR_NO_LOCAL_DEPS=1 pip install --no-build-isolation ${{ runner.temp }}/metatensor-v020/python/metatensor_operations + METATENSOR_NO_LOCAL_DEPS=1 pip install --no-build-isolation ${{ runner.temp }}/metatensor-v020/python/metatensor_learn + pip install torch + METATENSOR_NO_LOCAL_DEPS=1 pip install --no-build-isolation ${{ runner.temp }}/metatensor-v020/python/metatensor_torch + env: + PIP_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu + - name: build documentation env: # Use the CPU only version of torch when building/running the code diff --git a/.github/workflows/torch-tests.yml b/.github/workflows/torch-tests.yml index 0f1a9fc8..5fb6cdbf 100644 --- a/.github/workflows/torch-tests.yml +++ b/.github/workflows/torch-tests.yml @@ -68,6 +68,19 @@ jobs: python -m pip install --upgrade pip python -m pip install tox coverage + + - name: install metatensor from labels-values-array-clean branch + run: | + pip install setuptools cmake packaging wheel + git clone --depth 1 --branch labels-values-array-clean https://github.com/HaoZeke/metatensor.git ${{ runner.temp }}/metatensor-v020 + METATENSOR_NO_LOCAL_DEPS=1 pip install --no-build-isolation ${{ runner.temp }}/metatensor-v020/python/metatensor_core + METATENSOR_NO_LOCAL_DEPS=1 pip install --no-build-isolation ${{ runner.temp }}/metatensor-v020/python/metatensor_operations + METATENSOR_NO_LOCAL_DEPS=1 pip install --no-build-isolation ${{ runner.temp }}/metatensor-v020/python/metatensor_learn + pip install torch + METATENSOR_NO_LOCAL_DEPS=1 pip install --no-build-isolation ${{ runner.temp }}/metatensor-v020/python/metatensor_torch + env: + PIP_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu + - name: run tests run: tox -e lint,torch-tests,torch-tests-cxx,torch-install-tests-cxx,docs-tests env: diff --git a/.github/workflows/torchsim-tests.yml b/.github/workflows/torchsim-tests.yml index c794ab20..3c64dcb5 100644 --- a/.github/workflows/torchsim-tests.yml +++ b/.github/workflows/torchsim-tests.yml @@ -41,6 +41,19 @@ jobs: python -m pip install --upgrade pip python -m pip install tox coverage + + - name: install metatensor from labels-values-array-clean branch + run: | + pip install setuptools cmake packaging wheel + git clone --depth 1 --branch labels-values-array-clean https://github.com/HaoZeke/metatensor.git ${{ runner.temp }}/metatensor-v020 + METATENSOR_NO_LOCAL_DEPS=1 pip install --no-build-isolation ${{ runner.temp }}/metatensor-v020/python/metatensor_core + METATENSOR_NO_LOCAL_DEPS=1 pip install --no-build-isolation ${{ runner.temp }}/metatensor-v020/python/metatensor_operations + METATENSOR_NO_LOCAL_DEPS=1 pip install --no-build-isolation ${{ runner.temp }}/metatensor-v020/python/metatensor_learn + pip install torch + METATENSOR_NO_LOCAL_DEPS=1 pip install --no-build-isolation ${{ runner.temp }}/metatensor-v020/python/metatensor_torch + env: + PIP_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu + - name: run tests run: tox -e torchsim-tests env: diff --git a/tox.ini b/tox.ini index 2071f5a4..c7e49685 100644 --- a/tox.ini +++ b/tox.ini @@ -16,11 +16,14 @@ envlist = [testenv] passenv = * +sitepackages = true setenv = # Do not use the user PYTHONPATH, tox is handling everything PYTHONPATH= # store code coverage in a per-env file, so different envs don't override each other COVERAGE_FILE={env_dir}/.coverage + # Prevent metatensor setup.py from using file:// local deps (conflicts with git URLs) + METATENSOR_NO_LOCAL_DEPS=1 package = skip lint_folders = "{toxinidir}/python" "{toxinidir}/setup.py" @@ -40,8 +43,8 @@ testing_deps = pytest-cov metatensor_deps = - metatensor-torch >=0.8.0,<0.9 - metatensor-operations >=0.4.0,<0.5 + metatensor-torch >=0.8.0 + metatensor-operations >=0.4.0 ################################################################################