brisvag / blik

Python tool for visualising and interacting with cryo-ET and subtomogram averaging data.
https://brisvag.github.io/blik/
GNU General Public License v3.0
23 stars 8 forks source link

Test refactor #61

Closed alisterburt closed 3 years ago

alisterburt commented 3 years ago

This PR is a proposal for an architecture for dealing with testing of larger data files that we don't want to keep in the repo

I set up another repo in gutsche-lab for test data (still tried not to go overboard on file size) https://github.com/gutsche-lab/peepingtom-test-data

When testing locally, I symlinked the data folder from that repo into the test_data/external directory - this defines an interface for dealing with external data. For the CI, cloning of the test data repo and symlinking would have to be added. Maybe this creates problems/complicates things if we ever want to test on non-linux systems? In that case, direct download would be the solution?

Curious to hear your thoughts? I had a browse online and it seems like there isn't a one size fits all solution to this problem

I added two tests for reading relion3.0 and 3.1 star files based on the data from that repo - I also adjusted the euler2matrix function to make it not fail in the case of only one rotation matrix coming through. These will fail on CI because the data isn't available.

brisvag commented 3 years ago

Pytest has a temporary directory feature, we should use that. Why did you want to use symlinking?

alisterburt commented 3 years ago

after discussion - will move all tests back into main peepingtom module to facilitate development