-
Notifications
You must be signed in to change notification settings - Fork 32
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
Pregenerate class files in the repo #556
Conversation
Looks great. Let's also adjust the tutorials, since generating the classes is no longer necessary |
@bendichter I think I got most of them. There's one that is kind of necessary in the "Reading NWB Data in MATLAB" tutorial since that does cover what happens if you read a file that does not have an embedded schema. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #556 +/- ##
=======================================
Coverage 87.11% 87.11%
=======================================
Files 104 104
Lines 4617 4617
=======================================
Hits 4022 4022
Misses 595 595 ☔ View full report in Codecov by Sentry. |
…ss-files' into 555-pregenerate-class-files
@@ -385,7 +388,7 @@ | |||
%% Read | |||
% We can then read the file back in using MatNWB and inspect its contents. | |||
|
|||
read_nwbfile = nwbRead('intro_tutorial.nwb') | |||
read_nwbfile = nwbRead('intro_tutorial.nwb', 'ignorecache') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why ignore cache here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The environment is already generated (we generated it in the section above) so we don't need to re-generate the cache. Furthermore, this preserves tests that probably run this tutorial.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To clarify, since we do need to switch between schema versions in the tutorials, we generate the cache locally in a working directory so we can easily clean it up later, ensuring that the test environment is empty before we run the next test (which could be using any environment). As a result, I believe all tests and tutorials should be using ignorecache
and its variants, otherwise you will end up with strange class reference errors.
…o 555-pregenerate-class-files
Motivation
Fixes #555
How to test the behavior?
cloning the repo should not require
generateCore
when accessing classes.Checklist
fix #XX
whereXX
is the issue number?