-
Notifications
You must be signed in to change notification settings - Fork 107
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
feat(schema): Load subject data #1977
Conversation
The implementation here is really suboptimal. I don't know if we have a way of creating a baseline |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1977 +/- ##
==========================================
+ Coverage 85.68% 87.43% +1.75%
==========================================
Files 91 130 +39
Lines 3792 6232 +2440
Branches 1220 1510 +290
==========================================
+ Hits 3249 5449 +2200
- Misses 457 692 +235
- Partials 86 91 +5 ☔ View full report in Codecov by Sentry. |
Apparently Javascript doesn't allow you to do array equality with |
I believe that a single reference to the dsContext is used in normal validation. Its instantiated here and then passed to the context generator: 'll look at if it has the information needed to populate the subjects at creation time. If not we can add a check to the file context to only run load subjects if its undefined. I also need to remember why and when the default dsContext is used. |
Added a commit to leave |
Looking good. A heads up the subjects listed in summary aren't dependent on the dsContext. Every context's filename gets checked for a sub entity and that is added as a subject to the summary: I think its trying to capture a case in which a malformed dataset has more subjects files in it than it has proper sub- directories. Another unlikely case is that subjects with completely empty subject dirs won't be counted in the summary. I can see this potentially as a point of confusion, but also don't think it will matter 99.9% of the time. We can change it in a future PR if need be. |
I think if there are no files in a subject dir, it won't make it into the fileTree, but I'm okay with a deviation between these if it does. |
This fixes the implementation of:
rules.checks.dataset.SubjectFolders
rules.checks.dataset.ParticipantIDMismatch
rules.checks.dataset.PhenotypeSubjectsMissing
These started failing with bids-standard/bids-specification#1833, which activated previously disabled checks.
@rwblair
Closes #1978.