Skip to content

Commit

Permalink
Testing cache in github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidHerreros committed Jun 25, 2024
1 parent 324ea7c commit f370c7d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 19 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 14 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit f370c7d

Please sign in to comment.