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

Workflow tests caching #62

Merged
merged 43 commits into from
Jan 11, 2024
Merged

Workflow tests caching #62

merged 43 commits into from
Jan 11, 2024

Conversation

sfmig
Copy link
Contributor

@sfmig sfmig commented Dec 20, 2023

Fixes issue #34

  • removed code smell from if case in parametrised test
  • added mocking home directory in tests
  • data caching: the data is only downloaded once from GIN (in the config_GIN_dict fixture), then copied across for the rest of the test by mocking the pooch.retrieve function.
  • smoketest for entry point

Rebase after #64 is squash-merged

Caching right now relies on the pooch.retrieve() function, which won't download the data if it already exists, and filename and hash match. We could instead / further reduce testing time in CI using Github's cache action

Copy link

codecov bot commented Dec 20, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (017f005) 80.88% compared to head (9c8dfaf) 82.75%.

Files Patch % Lines
tests/cellfinder_core/conftest.py 97.91% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #62      +/-   ##
==========================================
+ Coverage   80.88%   82.75%   +1.87%     
==========================================
  Files          27       27              
  Lines        1522     1577      +55     
==========================================
+ Hits         1231     1305      +74     
+ Misses        291      272      -19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sfmig sfmig linked an issue Dec 22, 2023 that may be closed by this pull request
@sfmig sfmig changed the title Workflow tests improvements Workflow tests caching Jan 9, 2024
@sfmig sfmig marked this pull request as ready for review January 10, 2024 19:24
Copy link
Member

@alessandrofelder alessandrofelder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks - this looks good to me.

I do think caching on GH actions is worth it, as the idea is for the CI tests to run fast (when on small data) and we expect quite a bit of activity on this repo in the immediate future - so it will make our lives easier and more in-flow!

It might also be worth mocking Path.home only on local repos, and not on CI, so we run CI tests closer to a real-life scenario.

I'd suggest doing this in a separate PR tackling #65 though, as this is already a reduction in CI time.

@alessandrofelder alessandrofelder merged commit ffee651 into main Jan 11, 2024
10 checks passed
@alessandrofelder alessandrofelder deleted the smg/workflow-tests-caching branch January 11, 2024 11:41
@adamltyson
Copy link
Member

I do think caching on GH actions is worth it, as the idea is for the CI tests to run fast (when on small data) and we expect quite a bit of activity on this repo in the immediate future - so it will make our lives easier and more in-flow!

We cache data in some of the other repos and it works very well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cellfinder workflow tests further improvements + caching
3 participants