From 7adbd9fd24f4b34de08629f73bf6c49685fda778 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Tue, 28 May 2024 09:06:25 -0400 Subject: [PATCH 1/3] ci: fix test-python test_durations and its caches (#3820) The previous workflow file has several bugs. ## Summary by CodeRabbit - **Chores** - Updated paths and keys for caching test durations in the Python test workflow. - Adjusted pytest command for improved test duration handling. --------- Signed-off-by: Jinzhe Zeng --- .github/workflows/test_python.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test_python.yml b/.github/workflows/test_python.yml index 8b78f4cd0b..0f9fc61acd 100644 --- a/.github/workflows/test_python.yml +++ b/.github/workflows/test_python.yml @@ -42,17 +42,18 @@ jobs: - name: Get durations from cache uses: actions/cache@v4 with: - path: test_durations + path: .test_durations # the key must never match, even when restarting workflows, as that # will cause durations to get out of sync between groups, the # combined durations will be loaded if available - key: test-durations-split-${{ github.run_id }}-${{ github.run_number}}-${{ matrix.python }}-${{ matrix.group }} + key: test2-durations-split-${{ github.run_id }}-${{ github.run_number}}-${{ matrix.python }}-${{ matrix.group }} restore-keys: | - test-durations-combined-${{ matrix.python }}-${{ github.sha }} - test-durations-combined-${{ matrix.python }} - - run: pytest --cov=deepmd source/tests --durations=0 --splits 6 --group ${{ matrix.group }} --store-durations --durations-path=.test_durations_${{ matrix.group }} --splitting-algorithm least_duration + test2-durations-combined-${{ matrix.python }}-${{ github.sha }} + test2-durations-combined-${{ matrix.python }} + - run: pytest --cov=deepmd source/tests --durations=0 --splits 6 --group ${{ matrix.group }} --store-durations --durations-path=.test_durations --splitting-algorithm least_duration env: NUM_WORKERS: 0 + - run: mv .test_durations .test_durations_${{ matrix.group }} - name: Upload partial durations uses: actions/upload-artifact@v4 with: @@ -77,15 +78,15 @@ jobs: # key won't match during the first run for the given commit, but # restore-key will if there's a previous stored durations file, # so cache will both be loaded and stored - key: test-durations-combined-${{ matrix.python }}-${{ github.sha }} - restore-keys: test-durations-combined-${{ matrix.python }} + key: test2-durations-combined-${{ matrix.python }}-${{ github.sha }} + restore-keys: test2-durations-combined-${{ matrix.python }} - name: Download artifacts uses: actions/download-artifact@v4 with: pattern: split-${{ matrix.python }}-* merge-multiple: true - name: Combine test durations - run: jq '. + input' .test_durations_* > .test_durations + run: jq -s add .test_durations_* > .test_durations pass: name: Pass testing Python needs: [testpython, update_durations] From 0bcb84f7e6f922202cdf2e57b086d26e7beb238c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 28 May 2024 22:11:42 +0800 Subject: [PATCH 2/3] [pre-commit.ci] pre-commit autoupdate (#3825) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.4.4 → v0.4.5](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.4...v0.4.5) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0e5671d6c2..fb022030fd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,7 +29,7 @@ repos: exclude: ^source/3rdparty - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.4.4 + rev: v0.4.5 hooks: - id: ruff args: ["--fix"] From 0afe8bf7c7c6b0fdb0f0bfbec14d13db7d3c3405 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Wed, 29 May 2024 09:43:20 -0400 Subject: [PATCH 3/3] fix: fix ipi package (#3835) The original package was yanked. xref: https://github.com/i-pi/i-pi/pull/290 ## Summary by CodeRabbit - **Chores** - Updated the dependency name from `"i-PI"` to `"ipi"` in the project configuration file for consistency. Signed-off-by: Jinzhe Zeng --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7703ce71f9..2f04857daf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -98,7 +98,7 @@ lmp = [ "lammps~=2023.8.2.3.0", ] ipi = [ - "i-PI", + "ipi", ] gui = [ "dpgui",