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

Fixture for Augur tests #406

Merged
merged 3 commits into from
Oct 22, 2023
Merged

Fixture for Augur tests #406

merged 3 commits into from
Oct 22, 2023

Conversation

Lilly-May
Copy link
Collaborator

PR Checklist

Description of changes

Implements a fixture for the Augur tests as requested in issue #380.
Instead of loading the pre-calculated dataset sc_sim.h5ad that was stored in the tests/tools folder, the tests now use a fixture to load the sc_sim_augur dataset via the pertpy dataloader.
This only affects the tests for Augur and not the user directly.

Technical details

To ensure all tests still run (the results they expect are based on the pre-calculated sc_sim.h5ad dataset with 200 cells), the sc_sim_augur dataset (comprising 600 cells) is subsampled so that it contains the exact same 200 cells as the sc_sim.h5ad one (some brute-force testing might have been involved in finding the right random state for the subsampling...). That way, no changes in the actual tests were necessary, the fixture was simply added and used in all tests.

Performance-wise, there is no big difference (tested on my personal computer):

  • Duration of all Augur tests before using a fixture: 15sec 313ms
  • Duration of all Augur tests now (with fixture and dataset via dataloader): 13sec 677ms

@github-actions github-actions bot added bug Something isn't working enhancement New feature or request labels Oct 21, 2023
@Lilly-May Lilly-May removed the bug Something isn't working label Oct 21, 2023
@codecov
Copy link

codecov bot commented Oct 21, 2023

Codecov Report

Merging #406 (3e0cbb0) into main (ea69f90) will not change coverage.
Report is 3 commits behind head on main.
The diff coverage is n/a.

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #406   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files         40      40           
  Lines       4877    4885    +8     
=====================================
- Misses      4877    4885    +8     

see 8 files with indirect coverage changes

Copy link
Member

@Zethson Zethson left a comment

Choose a reason for hiding this comment

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

Great, thank you very much!

@Zethson Zethson merged commit e2ff0f8 into main Oct 22, 2023
@Lilly-May Lilly-May deleted the feature/augur_fixture branch October 22, 2023 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants