-
Notifications
You must be signed in to change notification settings - Fork 109
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
WIP add entities to context and validate them. #1456
WIP add entities to context and validate them. #1456
Conversation
|
… them. Fix the test for top_level files to use std SEP and get files name from context.file not suffix
Since it's a lot more data driven, we should just aim for whatever is clearest for implementation over mirroring the specification structure.
We might need to just make some new error keys for this part. Since we already decided to move away from numerical keys, we might just want to decide on the format allowed for keys and enforce it as part of the Issue constructor. For OpenNeuro, I think we want to stick to the types we have for this already as much as we can but OpenNeuro doesn't rely on the numerical code except for configuration (easy to update).
I'm trying out some prototype chaining for the contexts so the leafs can just chain up to things like this. Maybe we should add a shorthand to the context object for the top level though since that seems pretty useful. |
Prettier and merge fixes for bids-standard#1456
Apply all needed prettier fixes
Latest commits change issue management to be an object and use module exports/imports then have an addIssue function to update it. This gets around having to return and destructure arrays of issues, and keeps issues organized by their code automatically. I used a simplified version of the existing issue types for ease of construction, but if they need to match the old type in any way can change them. Still just treating the code as any old string in issue creation. |
I think we shouldn't change the Issue interface if possible since we have several tools that depend on it. Deprecating the numeric code should be fine but the other parts I'd like to keep. |
Issue manager refactor
Issues with branch that I can think of right now:
File organization, right now the code that checks the schema.rules.datatypes against the context entities is in schema/applyRules.ts, they should go in their own file. Should they live in the schema directory as opposed to validation? Should there be a directory or filename structure that matches what part of the spec is being checked.Issues - I have a place holder issue in applyRules.ts. I don't have a clear idea of how we want to mange issue creation and error codes. This part of the spec doesn't have error codes associated with it like schema.rules.checks does.Required top level files - will probably need to be its own check, since current checks are applied against each context separately.Need to validate datatype derived from match and compare it to the datatype directory in the actual path if one is present.