NeurodataWithoutBorders / nwbinspector

Tool to help inspect NWB files for compliance with NWB Best Practices
https://nwbinspector.readthedocs.io/
Other
17 stars 10 forks source link

Simplify testing suite #509

Closed CodyCBakerPhD closed 2 months ago

CodyCBakerPhD commented 2 months ago

While working on #507 noticed some needlessly complicated setup to a very particular corner of the testing suite

Replacing it all with a simple environment variable

codecov-commenter commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 84.90%. Comparing base (c7861f4) to head (b5aa045). Report is 2 commits behind head on dev.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/NeurodataWithoutBorders/nwbinspector/pull/509/graphs/tree.svg?width=650&height=150&src=pr&token=772QROR5F0&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NeurodataWithoutBorders)](https://app.codecov.io/gh/NeurodataWithoutBorders/nwbinspector/pull/509?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NeurodataWithoutBorders) ```diff @@ Coverage Diff @@ ## dev #509 +/- ## ========================================== + Coverage 79.53% 84.90% +5.37% ========================================== Files 48 48 Lines 1412 1398 -14 ========================================== + Hits 1123 1187 +64 + Misses 289 211 -78 ``` | [Files with missing lines](https://app.codecov.io/gh/NeurodataWithoutBorders/nwbinspector/pull/509?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NeurodataWithoutBorders) | Coverage Δ | | |---|---|---| | [src/nwbinspector/testing/\_\_init\_\_.py](https://app.codecov.io/gh/NeurodataWithoutBorders/nwbinspector/pull/509?src=pr&el=tree&filepath=src%2Fnwbinspector%2Ftesting%2F__init__.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NeurodataWithoutBorders#diff-c3JjL253Ymluc3BlY3Rvci90ZXN0aW5nL19faW5pdF9fLnB5) | `100.00% <ø> (ø)` | | | [src/nwbinspector/testing/\_testing.py](https://app.codecov.io/gh/NeurodataWithoutBorders/nwbinspector/pull/509?src=pr&el=tree&filepath=src%2Fnwbinspector%2Ftesting%2F_testing.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NeurodataWithoutBorders#diff-c3JjL253Ymluc3BlY3Rvci90ZXN0aW5nL190ZXN0aW5nLnB5) | `80.95% <ø> (-0.87%)` | :arrow_down: | ... and [4 files with indirect coverage changes](https://app.codecov.io/gh/NeurodataWithoutBorders/nwbinspector/pull/509/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NeurodataWithoutBorders)
CodyCBakerPhD commented 2 months ago

My only question is what is the case where the testing files get changed / need to be reuploaded to DANDI? Will that be done manually now since the update-testing-files.yml workflow was removed?

While we once had aspirations for it to be all automated, the reality is that process will continue as it always has - manually

Manually create a specific (usually old) environment and run some code that only works in that specific old environment in order to create the 'bad' example file for testing

But even that should really just be for new 'bad' examples - the previous ones can just be downloaded from DANDI and shouldn't really ever need to be replaced for any reason I know of

stephprince commented 2 months ago

But even that should really just be for new 'bad' examples - the previous ones can just be downloaded from DANDI and shouldn't really ever need to be replaced for any reason I know of

Ok sounds good. Follow up question - since the nwbinspector test file dandiset is on the staging server (which from my understanding is not guaranteed to continue existing?), is there a backup of these files somewhere? I saw the dandiset said some files were from user submissions so I assume not all of them can be auto-generated from the package.

CodyCBakerPhD commented 2 months ago

DANDI team would/should provide a big heads up on clearing any staging content or putting any such policy into place

At that point, if it happens, I'd recommend moving it to the main archive and publishing official persistent releases