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

Adds fixture to download atlases for test_validation.py #498

Merged
merged 2 commits into from
Feb 12, 2025

Conversation

IgorTatarnikov
Copy link
Member

@IgorTatarnikov IgorTatarnikov commented Feb 11, 2025

Before submitting a pull request (PR), please read the contributing guide.

Please fill out as much of this template as you can, but if you have any problems or questions, just leave a comment and we will help out :)

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
Tests were failing as test_validation.py tried to modify a directory that didn't exist.

https://github.com/brainglobe/brainglobe-atlasapi/actions/runs/13244823116/job/36975288009?pr=497

This failure seems to be related to the CI cache miss.

What does this PR do?
Ensures atlases are downloaded prior to test_validation.py running.

How has this PR been tested?

All tests pass locally and on CI.

Is this a breaking change?

No

Does this PR require an update to the documentation?

No

Checklist:

  • The code has been tested locally
  • The code has been formatted with pre-commit

@IgorTatarnikov IgorTatarnikov marked this pull request as ready for review February 11, 2025 12:56
@IgorTatarnikov IgorTatarnikov requested a review from a team February 11, 2025 12:56
Copy link
Member

@niksirbi niksirbi left a comment

Choose a reason for hiding this comment

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

Looks good Igor.

There's one thing I'm not sure about (because I don't know the working of atlasapi very well):
Here you are checking if 3 atlases of specific version exist, but upon download (BrainGlobeAtlas instantiation), you don't actually enforce the downloading of the specific versions you checked. I assume the latest version will be fetched instead. Will there be a problem if the specific versions you check are no longer the latest ones?

@IgorTatarnikov
Copy link
Member Author

IgorTatarnikov commented Feb 12, 2025

Thanks!

The code in test_validation.py also looks for specific atlas versions when looking in the directory tree, see: https://github.com/brainglobe/brainglobe-atlasapi/blob/4b5fa6479a0cf209a15f853cf48be6fa33f9bb6e/tests/atlasgen/test_validation.py#L32C1-L44C35.

I think that's something we should discuss at some point, do we run tests on specific versions or the latest? And enforce that as standard across the test suite.

@IgorTatarnikov IgorTatarnikov merged commit ce7acdc into main Feb 12, 2025
13 of 14 checks passed
@IgorTatarnikov IgorTatarnikov deleted the setup-validation-atlases branch February 12, 2025 11:06
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.

2 participants