From 8df9ac968bde63253eb3e3aaaff9a9a89c1d5318 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Mon, 27 Nov 2023 14:35:57 +0100 Subject: [PATCH 1/2] Test pip no-build-isolation option --- .github/workflows/deploy.yml | 17 ++++++++++++----- .github/workflows/minimal.yml | 3 ++- .github/workflows/notebooks.yml | 5 +++-- .github/workflows/pr-labeled.yml | 12 ------------ .github/workflows/pypicheck.yml | 3 ++- .github/workflows/unittests.yml | 3 ++- .github/workflows/unittests_abinit.yml | 3 ++- .github/workflows/unittests_gpaw.yml | 3 ++- .github/workflows/unittests_old.yml | 3 ++- .github/workflows/unittests_qe.yml | 3 ++- .github/workflows/unittests_siesta.yml | 3 ++- 11 files changed, 31 insertions(+), 27 deletions(-) delete mode 100644 .github/workflows/pr-labeled.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0fc883d0..7aeb631d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,16 +19,23 @@ jobs: id-token: write steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: conda-incubator/setup-miniconda@v2.2.0 with: - python-version: "3.11" - - name: Install dependencies - run: python -m pip install --user --upgrade ase numpy scipy setuptools spglib versioneer wheel + python-version: 3.11 + mamba-version: "*" + channels: conda-forge + miniforge-variant: Mambaforge + channel-priority: strict + auto-update-conda: true + environment-file: .ci_support/environment.yml - name: Convert dependencies run: | cp .ci_support/environment-old.yml environment.yml python .ci_support/release.py; cat pyproject.toml - name: Build - run: python setup.py sdist bdist_wheel + shell: bash -l {0} + run: | + pip install versioneer[toml]==0.29 + python setup.py sdist bdist_wheel - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/minimal.yml b/.github/workflows/minimal.yml index a63e5f40..acb1e78e 100644 --- a/.github/workflows/minimal.yml +++ b/.github/workflows/minimal.yml @@ -25,5 +25,6 @@ jobs: shell: bash -l {0} timeout-minutes: 30 run: | - pip install --no-deps . + pip install versioneer[toml]==0.29 + pip install . --no-deps --no-build-isolation python -m unittest discover tests diff --git a/.github/workflows/notebooks.yml b/.github/workflows/notebooks.yml index e9acc01a..b294bc94 100644 --- a/.github/workflows/notebooks.yml +++ b/.github/workflows/notebooks.yml @@ -16,7 +16,7 @@ jobs: - name: Merge Notebook environment run: | cp .ci_support/environment.yml environment.yml - tail --lines=+4 .ci_support/environment-abinit.yml >> environment.yml + tail --lines=+4 .ci_support/environment-abinit.yml >> environment.yml - name: Setup Mambaforge uses: conda-incubator/setup-miniconda@v2 with: @@ -30,5 +30,6 @@ jobs: - name: Test shell: bash -l {0} run: | - pip install --no-deps . + pip install versioneer[toml]==0.29 + pip install . --no-deps --no-build-isolation ./.ci_support/build_notebooks.sh \ No newline at end of file diff --git a/.github/workflows/pr-labeled.yml b/.github/workflows/pr-labeled.yml deleted file mode 100644 index 4d5e8aa2..00000000 --- a/.github/workflows/pr-labeled.yml +++ /dev/null @@ -1,12 +0,0 @@ -# This runs jobs which pyiron modules should run when a PR is labeled - -name: PR labeled - -on: - pull_request: - types: [labeled] - -jobs: - pyiron: - uses: pyiron/actions/.github/workflows/pr-labeled.yml@main - secrets: inherit \ No newline at end of file diff --git a/.github/workflows/pypicheck.yml b/.github/workflows/pypicheck.yml index eb187749..11876c04 100644 --- a/.github/workflows/pypicheck.yml +++ b/.github/workflows/pypicheck.yml @@ -26,5 +26,6 @@ jobs: - name: Pip check shell: bash -l {0} run: | - pip install --no-deps . + pip install versioneer[toml]==0.29 + pip install . --no-deps --no-build-isolation pip check diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index fb9b31b1..cbc66f7e 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -62,7 +62,8 @@ jobs: shell: bash -l {0} timeout-minutes: 30 run: | - pip install --no-deps . + pip install versioneer[toml]==0.29 + pip install . --no-deps --no-build-isolation coverage run --omit atomistics/_version.py -m unittest discover tests coverage combine - name: Coveralls diff --git a/.github/workflows/unittests_abinit.yml b/.github/workflows/unittests_abinit.yml index 30bd16a2..107d3dfe 100644 --- a/.github/workflows/unittests_abinit.yml +++ b/.github/workflows/unittests_abinit.yml @@ -29,7 +29,8 @@ jobs: shell: bash -l {0} timeout-minutes: 30 run: | - pip install --no-deps . + pip install versioneer[toml]==0.29 + pip install . --no-deps --no-build-isolation python -m unittest tests/test_evcurve_abinit.py env: ABINIT_PP_PATH: '/usr/share/miniconda3/envs/my-env/share/abinit/LDA_FHI' diff --git a/.github/workflows/unittests_gpaw.yml b/.github/workflows/unittests_gpaw.yml index d52292e7..7b42f18c 100644 --- a/.github/workflows/unittests_gpaw.yml +++ b/.github/workflows/unittests_gpaw.yml @@ -29,7 +29,8 @@ jobs: shell: bash -l {0} timeout-minutes: 30 run: | - pip install --no-deps . + pip install versioneer[toml]==0.29 + pip install . --no-deps --no-build-isolation python -m unittest tests/test_evcurve_gpaw.py python -m unittest tests/test_elastic_gpaw.py python -m unittest tests/test_phonons_gpaw.py diff --git a/.github/workflows/unittests_old.yml b/.github/workflows/unittests_old.yml index 7bd6e9fe..434a0c8c 100644 --- a/.github/workflows/unittests_old.yml +++ b/.github/workflows/unittests_old.yml @@ -25,5 +25,6 @@ jobs: shell: bash -l {0} timeout-minutes: 30 run: | - pip install --no-deps . + pip install versioneer[toml]==0.29 + pip install . --no-deps --no-build-isolation python -m unittest discover tests diff --git a/.github/workflows/unittests_qe.yml b/.github/workflows/unittests_qe.yml index c0b9e009..008d115f 100644 --- a/.github/workflows/unittests_qe.yml +++ b/.github/workflows/unittests_qe.yml @@ -29,7 +29,8 @@ jobs: shell: bash -l {0} timeout-minutes: 30 run: | - pip install --no-deps . + pip install versioneer[toml]==0.29 + pip install . --no-deps --no-build-isolation python -m unittest tests/test_evcurve_qe.py env: ASE_ESPRESSO_COMMAND: "mpirun -np 1 pw.x -in PREFIX.pwi > PREFIX.pwo" diff --git a/.github/workflows/unittests_siesta.yml b/.github/workflows/unittests_siesta.yml index 71e3daa8..e6d36f49 100644 --- a/.github/workflows/unittests_siesta.yml +++ b/.github/workflows/unittests_siesta.yml @@ -29,5 +29,6 @@ jobs: shell: bash -l {0} timeout-minutes: 30 run: | - pip install --no-deps . + pip install versioneer[toml]==0.29 + pip install . --no-deps --no-build-isolation python -m unittest tests/test_evcurve_siesta.py \ No newline at end of file From eca3ccfca06d4412e17b8897548e2cbc45843bb1 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Mon, 27 Nov 2023 14:39:31 +0100 Subject: [PATCH 2/2] Update notebooks.yml --- .github/workflows/notebooks.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/notebooks.yml b/.github/workflows/notebooks.yml index b294bc94..977e98bb 100644 --- a/.github/workflows/notebooks.yml +++ b/.github/workflows/notebooks.yml @@ -16,7 +16,7 @@ jobs: - name: Merge Notebook environment run: | cp .ci_support/environment.yml environment.yml - tail --lines=+4 .ci_support/environment-abinit.yml >> environment.yml + tail --lines=+4 .ci_support/environment-notebooks.yml >> environment.yml - name: Setup Mambaforge uses: conda-incubator/setup-miniconda@v2 with: @@ -32,4 +32,4 @@ jobs: run: | pip install versioneer[toml]==0.29 pip install . --no-deps --no-build-isolation - ./.ci_support/build_notebooks.sh \ No newline at end of file + ./.ci_support/build_notebooks.sh