Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New cached functionality to speed up PR testing #25

Merged
merged 30 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
39882dd
Testing cache in github actions
DavidHerreros Jun 25, 2024
a6ccc8f
Testing cache in github actions
DavidHerreros Jun 25, 2024
d0bf048
Testing cache in github actions
DavidHerreros Jun 25, 2024
bdf744a
Testing cache in github actions
DavidHerreros Jun 25, 2024
3198816
Testing cache in github actions
DavidHerreros Jun 25, 2024
4bb7624
Testing cache in github actions
DavidHerreros Jun 25, 2024
88361da
Testing cache in github actions
DavidHerreros Jun 25, 2024
265ef00
Testing cache in github actions
DavidHerreros Jun 25, 2024
75485bb
Testing cache in github actions
DavidHerreros Jun 25, 2024
2adbdc5
Testing cache in github actions
DavidHerreros Jun 25, 2024
69bc977
Testing cache in github actions
DavidHerreros Jun 25, 2024
61a7b7a
Testing cache in github actions
DavidHerreros Jun 25, 2024
fa2e489
Testing cache in github actions
DavidHerreros Jun 25, 2024
a4c8c78
Testing cache in github actions
DavidHerreros Jun 25, 2024
b4b54ff
Testing cache in github actions
DavidHerreros Jun 25, 2024
1752f87
Testing cache in github actions
DavidHerreros Jun 25, 2024
cde0aa9
Update testing.yml
DavidHerreros Jun 25, 2024
917b129
Update testing.yml
DavidHerreros Jun 25, 2024
11f2d4d
Update testing.yml
DavidHerreros Jun 25, 2024
324ea7c
Testing cache in github actions
DavidHerreros Jun 25, 2024
f370c7d
Testing cache in github actions
DavidHerreros Jun 25, 2024
8871569
Update testing.yml
DavidHerreros Jun 25, 2024
dc91ce7
Testing cache in github actions
DavidHerreros Jun 25, 2024
573838a
Merge remote-tracking branch 'origin/tests' into tests
DavidHerreros Jun 25, 2024
be5d413
Testing cache in github actions
DavidHerreros Jun 25, 2024
bc17e1f
Merge branch 'refs/heads/main' into tests
DavidHerreros Jun 25, 2024
97aa719
Testing cache in github actions
DavidHerreros Jun 25, 2024
ad68b69
Fix typo in package version
DavidHerreros Jun 25, 2024
b23fcff
add empty file to run tests
geoffwoollard Jun 25, 2024
462e41f
remove empty since cachine working. 1 min
geoffwoollard Jun 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,33 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Cache dependencies and test data
id: cache

- name: Cache dependencies
id: cache_deps
uses: actions/cache@v3
with:
path: |
${{ env.pythonLocation }}
key: venv-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml') }}

- name: Cache test data
id: cache_test_data
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-
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 .
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
32 changes: 16 additions & 16 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,29 +38,29 @@ classifiers = [
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
"torch",
"numpy",
"natsort",
"pandas",
"dataclasses_json",
"mrcfile",
"scipy",
"cvxpy",
"POT",
"aspire",
"jupyter",
"osfclient",
"seaborn",
"ipyfilechooser",
"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<=1.5.2",
"POT<=0.9.3",
"aspire<=0.12.2",
"jupyter<=1.0.0",
"osfclient<=0.0.5",
"seaborn<=0.13.2",
"ipyfilechooser<=0.6.0",
]

[project.optional-dependencies]
dev = [
"pytest",
"pytest<=8.2.2",
"mypy",
"pre-commit",
"ruff",
"omegaconf"
"omegaconf<=2.3.0"
]

[project.urls]
Expand Down
Loading