From ccf6244fd06a6bfb07c03260597672473624052d Mon Sep 17 00:00:00 2001 From: DavidHerreros Date: Tue, 25 Jun 2024 10:06:52 +0200 Subject: [PATCH 01/28] Testing cache in github actions --- .github/workflows/testing.yml | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 277ad1a..60a3a38 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -20,31 +20,38 @@ jobs: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} + id: setup_python uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - name: Cache dependencies and test data - id: cache + - name: Cache virtual environment + id: cache_venv uses: actions/cache@v3 with: - path: | - ~/.cache/pip - tests/data - data - key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml', '**/tests/scripts/fetch_test_data.sh') }} - restore-keys: | - ${{ runner.os }}-pip- + path: .venv + key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('**/pyproject.toml') }} + + - name: Cache test data + id: cache_test_data + uses: actions/cache@v3 + with: + path: tests/data + key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('**/tests/scripts/fetch_test_data.sh') }} - name: Install dependencies run: | + python -m venv .venv + source .venv/bin/activate python -m pip install --upgrade pip - pip install . - pip install pytest omegaconf + pip install .[dev] + echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH + echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV - name: Get test data from OSF - if: steps.cache.outputs.cache-hit != 'true' + if: steps.cache_test_data.outputs.cache-hit != 'true' run: | + echo steps.cache_test_data.outputs.cache-hit sh tests/scripts/fetch_test_data.sh - name: Test with pytest From 56fb335648a325ff88bb12fef8ee49fd3f199a79 Mon Sep 17 00:00:00 2001 From: DavidHerreros Date: Tue, 25 Jun 2024 10:27:00 +0200 Subject: [PATCH 02/28] Testing cache in github actions --- .github/workflows/testing.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 60a3a38..2b2368e 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -44,6 +44,7 @@ jobs: python -m venv .venv source .venv/bin/activate python -m pip install --upgrade pip + pip install . pip install .[dev] echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV @@ -51,7 +52,7 @@ jobs: - name: Get test data from OSF if: steps.cache_test_data.outputs.cache-hit != 'true' run: | - echo steps.cache_test_data.outputs.cache-hit + echo $(steps.cache_test_data.outputs.cache-hit) sh tests/scripts/fetch_test_data.sh - name: Test with pytest From db7ab4bb826a756a35cc8123fc5e93e0a7ff2e66 Mon Sep 17 00:00:00 2001 From: DavidHerreros Date: Tue, 25 Jun 2024 10:34:31 +0200 Subject: [PATCH 03/28] Testing cache in github actions --- .github/workflows/testing.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 2b2368e..445f348 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -50,9 +50,9 @@ jobs: echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV - name: Get test data from OSF - if: steps.cache_test_data.outputs.cache-hit != 'true' + # if: steps.cache_test_data.outputs.cache-hit != 'true' run: | - echo $(steps.cache_test_data.outputs.cache-hit) + python -c "print steps.cache_test_data.outputs.cache-hit" sh tests/scripts/fetch_test_data.sh - name: Test with pytest From db7cc3805a330f12f326c44c9c2643ea60406dd0 Mon Sep 17 00:00:00 2001 From: DavidHerreros Date: Tue, 25 Jun 2024 11:12:55 +0200 Subject: [PATCH 04/28] Testing cache in github actions --- .github/workflows/testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 445f348..82c788a 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -52,7 +52,7 @@ jobs: - name: Get test data from OSF # if: steps.cache_test_data.outputs.cache-hit != 'true' run: | - python -c "print steps.cache_test_data.outputs.cache-hit" + python -c "print(steps.cache_test_data.outputs.cache-hit)" sh tests/scripts/fetch_test_data.sh - name: Test with pytest From 96711da218dc213071432c9e01adb1060fa06ce1 Mon Sep 17 00:00:00 2001 From: DavidHerreros Date: Tue, 25 Jun 2024 11:25:18 +0200 Subject: [PATCH 05/28] Testing cache in github actions --- .github/workflows/testing.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 82c788a..0a5d90a 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -50,9 +50,8 @@ jobs: echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV - name: Get test data from OSF - # if: steps.cache_test_data.outputs.cache-hit != 'true' + if: steps.cache_test_data.outputs.cache-hit != 'true' run: | - python -c "print(steps.cache_test_data.outputs.cache-hit)" sh tests/scripts/fetch_test_data.sh - name: Test with pytest From e82adeff015c04c574a37ca2694dc9249f720ea8 Mon Sep 17 00:00:00 2001 From: DavidHerreros Date: Tue, 25 Jun 2024 11:35:49 +0200 Subject: [PATCH 06/28] Testing cache in github actions --- .github/workflows/testing.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 0a5d90a..115e987 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -24,13 +24,7 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - - name: Cache virtual environment - id: cache_venv - uses: actions/cache@v3 - with: - path: .venv - key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('**/pyproject.toml') }} + cache: pip - name: Cache test data id: cache_test_data @@ -40,14 +34,12 @@ jobs: key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('**/tests/scripts/fetch_test_data.sh') }} - name: Install dependencies + uses: syphar/restore-virtualenv@v1 + if: steps.restore-virtualenv.outputs.cache-hit != 'true' run: | - python -m venv .venv - source .venv/bin/activate python -m pip install --upgrade pip pip install . pip install .[dev] - echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH - echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV - name: Get test data from OSF if: steps.cache_test_data.outputs.cache-hit != 'true' From a09c4f818df668263061fd670a15f46200639f92 Mon Sep 17 00:00:00 2001 From: DavidHerreros Date: Tue, 25 Jun 2024 11:36:48 +0200 Subject: [PATCH 07/28] Testing cache in github actions --- .github/workflows/testing.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 115e987..8e63dc1 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -33,8 +33,9 @@ jobs: path: tests/data key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('**/tests/scripts/fetch_test_data.sh') }} + - uses: syphar/restore-virtualenv@v1 + - name: Install dependencies - uses: syphar/restore-virtualenv@v1 if: steps.restore-virtualenv.outputs.cache-hit != 'true' run: | python -m pip install --upgrade pip From bff72ae7403f1d054dc92c85dbc4dfd3ac771038 Mon Sep 17 00:00:00 2001 From: DavidHerreros Date: Tue, 25 Jun 2024 11:40:44 +0200 Subject: [PATCH 08/28] Testing cache in github actions --- .github/workflows/testing.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 8e63dc1..7cb0453 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -34,13 +34,18 @@ jobs: key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('**/tests/scripts/fetch_test_data.sh') }} - uses: syphar/restore-virtualenv@v1 + id: cache-virtualenv + with: + requirement_files: pyproject.toml # this is optional - - name: Install dependencies - if: steps.restore-virtualenv.outputs.cache-hit != 'true' - run: | + - uses: syphar/restore-pip-download-cache@v1 + if: steps.cache-virtualenv.outputs.cache-hit != 'true' + + - run: | python -m pip install --upgrade pip pip install . pip install .[dev] + if: steps.cache-virtualenv.outputs.cache-hit != 'true' - name: Get test data from OSF if: steps.cache_test_data.outputs.cache-hit != 'true' From d3b2c29cb7dc9f51dcf525f0ffad209c08e8836d Mon Sep 17 00:00:00 2001 From: DavidHerreros Date: Tue, 25 Jun 2024 11:43:10 +0200 Subject: [PATCH 09/28] Testing cache in github actions --- .github/workflows/testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 7cb0453..5886471 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -36,7 +36,7 @@ jobs: - uses: syphar/restore-virtualenv@v1 id: cache-virtualenv with: - requirement_files: pyproject.toml # this is optional + requirement_files: "**/pyproject.toml" # this is optional - uses: syphar/restore-pip-download-cache@v1 if: steps.cache-virtualenv.outputs.cache-hit != 'true' From 2ee6705fd741085c100fd1bd8a3c7fa147f5cd6e Mon Sep 17 00:00:00 2001 From: DavidHerreros Date: Tue, 25 Jun 2024 11:43:56 +0200 Subject: [PATCH 10/28] Testing cache in github actions --- .github/workflows/testing.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 5886471..cfc9df3 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -40,6 +40,8 @@ jobs: - uses: syphar/restore-pip-download-cache@v1 if: steps.cache-virtualenv.outputs.cache-hit != 'true' + with: + requirement_files: "**/pyproject.toml" # this is optional - run: | python -m pip install --upgrade pip From b3498b80c0e416760473db169554f2e84cb66fdf Mon Sep 17 00:00:00 2001 From: DavidHerreros Date: Tue, 25 Jun 2024 11:51:42 +0200 Subject: [PATCH 11/28] Testing cache in github actions --- .github/workflows/testing.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index cfc9df3..d2b79be 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -37,11 +37,13 @@ jobs: id: cache-virtualenv with: requirement_files: "**/pyproject.toml" # this is optional + key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('**/pyproject.toml') }} - uses: syphar/restore-pip-download-cache@v1 if: steps.cache-virtualenv.outputs.cache-hit != 'true' with: requirement_files: "**/pyproject.toml" # this is optional + key: download-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('**/pyproject.toml') }} - run: | python -m pip install --upgrade pip From 9a1e22cea8803ad60086389888dc6ca4b2e8a928 Mon Sep 17 00:00:00 2001 From: DavidHerreros Date: Tue, 25 Jun 2024 12:01:23 +0200 Subject: [PATCH 12/28] Testing cache in github actions --- .github/workflows/testing.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index d2b79be..9b56b9f 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -30,7 +30,9 @@ jobs: id: cache_test_data uses: actions/cache@v3 with: - path: tests/data + path: | + tests/data + data key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('**/tests/scripts/fetch_test_data.sh') }} - uses: syphar/restore-virtualenv@v1 @@ -40,7 +42,7 @@ jobs: key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('**/pyproject.toml') }} - uses: syphar/restore-pip-download-cache@v1 - if: steps.cache-virtualenv.outputs.cache-hit != 'true' + if: ${{ steps.cache-virtualenv.outputs.cache-hit != 'true' }} with: requirement_files: "**/pyproject.toml" # this is optional key: download-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('**/pyproject.toml') }} @@ -49,10 +51,10 @@ jobs: python -m pip install --upgrade pip pip install . pip install .[dev] - if: steps.cache-virtualenv.outputs.cache-hit != 'true' + if: ${{ steps.cache-virtualenv.outputs.cache-hit != 'true' }} - name: Get test data from OSF - if: steps.cache_test_data.outputs.cache-hit != 'true' + if: ${{ steps.cache_test_data.outputs.cache-hit != 'true' }} run: | sh tests/scripts/fetch_test_data.sh From aa82bae2e85f79260d85319824c04ea644a2e338 Mon Sep 17 00:00:00 2001 From: DavidHerreros Date: Tue, 25 Jun 2024 12:10:21 +0200 Subject: [PATCH 13/28] Testing cache in github actions --- .github/workflows/testing.yml | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 9b56b9f..624819f 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -20,41 +20,34 @@ jobs: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - id: setup_python uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - cache: pip - - name: Cache test data - id: cache_test_data + - name: Cache dependencies and test data + id: cache uses: actions/cache@v3 with: path: | + .venv tests/data data - key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('**/tests/scripts/fetch_test_data.sh') }} + key: venv-${{ runner.os }}-${{ hashFiles('**/pyproject.toml', '**/tests/scripts/fetch_test_data.sh') }} - - uses: syphar/restore-virtualenv@v1 - id: cache-virtualenv - with: - requirement_files: "**/pyproject.toml" # this is optional - key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('**/pyproject.toml') }} - - - uses: syphar/restore-pip-download-cache@v1 - if: ${{ steps.cache-virtualenv.outputs.cache-hit != 'true' }} - with: - requirement_files: "**/pyproject.toml" # this is optional - key: download-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('**/pyproject.toml') }} + - name: Restore venv + run: | + python -m venv .venv + . .venv/bin/activate - - run: | + - name: Install dependencies + if: ${{ steps.cache.outputs.cache-hit != 'true' }} + run: | python -m pip install --upgrade pip pip install . - pip install .[dev] - if: ${{ steps.cache-virtualenv.outputs.cache-hit != 'true' }} + pip install pytest omegaconf - name: Get test data from OSF - if: ${{ steps.cache_test_data.outputs.cache-hit != 'true' }} + if: ${{ steps.cache.outputs.cache-hit != 'true' }} run: | sh tests/scripts/fetch_test_data.sh From f211fd216444445f1d3c9593da7615e79aa6c5a6 Mon Sep 17 00:00:00 2001 From: DavidHerreros Date: Tue, 25 Jun 2024 12:11:22 +0200 Subject: [PATCH 14/28] Testing cache in github actions --- .github/workflows/testing.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 624819f..39d4607 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -38,6 +38,8 @@ jobs: run: | python -m venv .venv . .venv/bin/activate + echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH + echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV - name: Install dependencies if: ${{ steps.cache.outputs.cache-hit != 'true' }} From 1f65e261bf203ea03156e194bf08befcea82a093 Mon Sep 17 00:00:00 2001 From: DavidHerreros Date: Tue, 25 Jun 2024 12:26:22 +0200 Subject: [PATCH 15/28] Testing cache in github actions --- .github/workflows/testing.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 39d4607..2ef6a3a 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -35,6 +35,7 @@ jobs: key: venv-${{ runner.os }}-${{ hashFiles('**/pyproject.toml', '**/tests/scripts/fetch_test_data.sh') }} - name: Restore venv + if: ${{ steps.cache.outputs.cache-hit == 'true' }} run: | python -m venv .venv . .venv/bin/activate From 49dd9cfeac65c83f18bef64025e42313b0e94f8a Mon Sep 17 00:00:00 2001 From: DavidHerreros Date: Tue, 25 Jun 2024 12:38:55 +0200 Subject: [PATCH 16/28] Testing cache in github actions --- .github/workflows/testing.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 2ef6a3a..c49606a 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -34,17 +34,16 @@ jobs: data key: venv-${{ runner.os }}-${{ hashFiles('**/pyproject.toml', '**/tests/scripts/fetch_test_data.sh') }} - - name: Restore venv - if: ${{ steps.cache.outputs.cache-hit == 'true' }} + - name: Create venv + if: ${{ steps.cache.outputs.cache-hit != 'true' }} run: | python -m venv .venv . .venv/bin/activate - echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH - echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV - name: Install dependencies if: ${{ steps.cache.outputs.cache-hit != 'true' }} run: | + . .venv/bin/activate python -m pip install --upgrade pip pip install . pip install pytest omegaconf @@ -56,5 +55,6 @@ jobs: - name: Test with pytest run: | + . .venv/bin/activate pytest tests/test_map_to_map.py pytest tests/test_distribution_to_distribution.py From 29a77f2d44a16e557d40ca09ea872e90758c25eb Mon Sep 17 00:00:00 2001 From: DavidHerreros <40200657+DavidHerreros@users.noreply.github.com> Date: Tue, 25 Jun 2024 12:48:31 +0200 Subject: [PATCH 17/28] Update testing.yml --- .github/workflows/testing.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index c49606a..cf9708e 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -33,16 +33,12 @@ jobs: tests/data data key: venv-${{ runner.os }}-${{ hashFiles('**/pyproject.toml', '**/tests/scripts/fetch_test_data.sh') }} - - - name: Create venv - if: ${{ steps.cache.outputs.cache-hit != 'true' }} - run: | - python -m venv .venv - . .venv/bin/activate + restore-keys: venv-${{ runner.os }}- - name: Install dependencies if: ${{ steps.cache.outputs.cache-hit != 'true' }} run: | + python -m venv .venv . .venv/bin/activate python -m pip install --upgrade pip pip install . From 05cb1360c33ef3e7683686d2594bf4104ac0e8d3 Mon Sep 17 00:00:00 2001 From: DavidHerreros <40200657+DavidHerreros@users.noreply.github.com> Date: Tue, 25 Jun 2024 13:04:54 +0200 Subject: [PATCH 18/28] Update testing.yml --- .github/workflows/testing.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index cf9708e..178b705 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -29,17 +29,14 @@ jobs: uses: actions/cache@v3 with: path: | - .venv + ${{ env.pythonLocation }} tests/data data - key: venv-${{ runner.os }}-${{ hashFiles('**/pyproject.toml', '**/tests/scripts/fetch_test_data.sh') }} - restore-keys: venv-${{ runner.os }}- + key: venv-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml', '**/tests/scripts/fetch_test_data.sh') }} - name: Install dependencies if: ${{ steps.cache.outputs.cache-hit != 'true' }} run: | - python -m venv .venv - . .venv/bin/activate python -m pip install --upgrade pip pip install . pip install pytest omegaconf From c5367d980912dbe5996e178ee1e02b85a2a845dc Mon Sep 17 00:00:00 2001 From: DavidHerreros <40200657+DavidHerreros@users.noreply.github.com> Date: Tue, 25 Jun 2024 13:09:51 +0200 Subject: [PATCH 19/28] Update testing.yml --- .github/workflows/testing.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 178b705..9cb708a 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -48,6 +48,5 @@ jobs: - name: Test with pytest run: | - . .venv/bin/activate pytest tests/test_map_to_map.py pytest tests/test_distribution_to_distribution.py From f27a8ea486346a0fda053ee5e9f5e9264a4386e9 Mon Sep 17 00:00:00 2001 From: DavidHerreros Date: Tue, 25 Jun 2024 13:19:33 +0200 Subject: [PATCH 20/28] Testing cache in github actions --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 85e73d5..2033307 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ dependencies = [ "pandas", "dataclasses_json", "mrcfile", - "scipy", + "scipy<=1.13.1", "cvxpy", "POT", "aspire", From 93f6739127f121703ae5486519dd643d58fc1767 Mon Sep 17 00:00:00 2001 From: DavidHerreros Date: Tue, 25 Jun 2024 14:11:46 +0200 Subject: [PATCH 21/28] Testing cache in github actions --- .github/workflows/testing.yml | 18 +++++++++++++----- pyproject.toml | 28 ++++++++++++++-------------- 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 9cb708a..0077d42 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -25,24 +25,32 @@ jobs: python-version: ${{ matrix.python-version }} - name: Cache dependencies and test data - id: cache + id: cache_deps uses: actions/cache@v3 with: path: | - ${{ env.pythonLocation }} tests/data data - key: venv-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml', '**/tests/scripts/fetch_test_data.sh') }} + key: venv-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml') }} + + - name: Cache dependencies test data + id: cache_test_data + uses: actions/cache@v3 + with: + path: | + tests/data + data + key: venv-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/tests/scripts/fetch_test_data.sh') }} - name: Install dependencies - if: ${{ steps.cache.outputs.cache-hit != 'true' }} + if: ${{ steps.cache_deps.outputs.cache-hit != 'true' }} run: | python -m pip install --upgrade pip pip install . pip install pytest omegaconf - name: Get test data from OSF - if: ${{ steps.cache.outputs.cache-hit != 'true' }} + if: ${{ steps.cache_test_data.outputs.cache-hit != 'true' }} run: | sh tests/scripts/fetch_test_data.sh diff --git a/pyproject.toml b/pyproject.toml index 2033307..a1c9055 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,28 +38,28 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", ] dependencies = [ - "torch", - "numpy", - "natsort", - "pandas", - "dataclasses_json", - "mrcfile", + "torch<=2.3.1", + "numpy<=2.0.0", + "natsort<=8.4.0", + "pandas<=2.2.2", + "dataclasses_json<=0.6.7", + "mrcfile<=1.5.0", "scipy<=1.13.1", - "cvxpy", - "POT", - "aspire", - "jupyter", - "osfclient", - "seaborn" + "cvxpy<=1.5.2", + "POT<=0.9.3", + "aspire<=0.12.2", + "jupyter<=1.0.0", + "osfclient<=0.0.5", + "seaborn<=0.13.2" ] [project.optional-dependencies] dev = [ - "pytest", + "pytest<=8.2.2", "mypy", "pre-commit", "ruff", - "omegaconf" + "omegaconf<=2.3.0" ] [project.urls] From 041866db63ee39de3beb64f8ccf1650b751b53e8 Mon Sep 17 00:00:00 2001 From: DavidHerreros <40200657+DavidHerreros@users.noreply.github.com> Date: Tue, 25 Jun 2024 15:04:35 +0200 Subject: [PATCH 22/28] Update testing.yml --- .github/workflows/testing.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 0077d42..c126a14 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -43,7 +43,6 @@ jobs: key: venv-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/tests/scripts/fetch_test_data.sh') }} - name: Install dependencies - if: ${{ steps.cache_deps.outputs.cache-hit != 'true' }} run: | python -m pip install --upgrade pip pip install . From 911b8bf9dfa3c9932d3cf501943f751272988752 Mon Sep 17 00:00:00 2001 From: DavidHerreros Date: Tue, 25 Jun 2024 15:07:13 +0200 Subject: [PATCH 23/28] Testing cache in github actions --- .github/workflows/testing.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 0077d42..45538ae 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -24,16 +24,15 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Cache dependencies and test data + - name: Cache dependencies id: cache_deps uses: actions/cache@v3 with: path: | - tests/data - data + ${{ env.pythonLocation }} key: venv-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml') }} - - name: Cache dependencies test data + - name: Cache test data id: cache_test_data uses: actions/cache@v3 with: From efaf09d3986e655423f9b89aa6008847191953ad Mon Sep 17 00:00:00 2001 From: DavidHerreros Date: Tue, 25 Jun 2024 15:19:37 +0200 Subject: [PATCH 24/28] Testing cache in github actions --- .github/workflows/testing.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 7459a59..45538ae 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -42,6 +42,7 @@ jobs: key: venv-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/tests/scripts/fetch_test_data.sh') }} - name: Install dependencies + if: ${{ steps.cache_deps.outputs.cache-hit != 'true' }} run: | python -m pip install --upgrade pip pip install . From c44a328230ba0fcf7ff08335435c8176bd4874e6 Mon Sep 17 00:00:00 2001 From: DavidHerreros Date: Tue, 25 Jun 2024 15:25:20 +0200 Subject: [PATCH 25/28] Testing cache in github actions --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0ea132d..cec4915 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ dependencies = [ "jupyter<=1.0.0", "osfclient<=0.0.5", "seaborn<=0.13.2", - "ipyfilechooser", + "ipyfilechooser<=-0.6.0", ] [project.optional-dependencies] From 790e1638b5bda78b97f2b5aa4ed77ea3109c850e Mon Sep 17 00:00:00 2001 From: DavidHerreros Date: Tue, 25 Jun 2024 15:26:44 +0200 Subject: [PATCH 26/28] Fix typo in package version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index cec4915..ba0facf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ dependencies = [ "jupyter<=1.0.0", "osfclient<=0.0.5", "seaborn<=0.13.2", - "ipyfilechooser<=-0.6.0", + "ipyfilechooser<=0.6.0", ] [project.optional-dependencies] From e7c32b1c2223ad8639c0defadda65bb72ed13860 Mon Sep 17 00:00:00 2001 From: Geoffrey Woollard Date: Tue, 25 Jun 2024 11:23:04 -0400 Subject: [PATCH 27/28] add empty file to run tests --- empty.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 empty.txt diff --git a/empty.txt b/empty.txt new file mode 100644 index 0000000..e69de29 From c9d871abacadc59ec658cd9ef10bac7e6ba258fb Mon Sep 17 00:00:00 2001 From: Geoffrey Woollard Date: Tue, 25 Jun 2024 11:25:33 -0400 Subject: [PATCH 28/28] remove empty since cachine working. 1 min --- empty.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 empty.txt diff --git a/empty.txt b/empty.txt deleted file mode 100644 index e69de29..0000000