You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TL;DR: The deno validator app does not output an error when a required file, such as dataset_description.json, is not present in the dataset.
Since the Deno validator is currently in development, it's very possible that the dev team is aware of this bug and has a plan to address it, so feel free to ignore if this issue is superfluous. I became aware of it because I am developing a similar open source validator tool and used this deno app as a model.
Basically, your validator crawls through the file tree and, whenever it encounters a file, gathers up the relevant rules for that type of file, and checks the rules against it. The issue is that, if a file like dataset_description.json isn't present in the file system, then no file is ever encountered, and no rules are ever checked against it. At first I thought this was intentional, but going back to test the older BIDS validator, I can see that they have a DATASET_DESCRIPTION_MISSING error that is produced when the file is missing.
For what it's worth, my solution to this issue was to maintain a dictionary called rulesRecord with schema locations of rules as keys and booleans as values, and I used this dict to keep track of which rules were ever added to context.filenameRules. Any rules that were detected under rules.files but were never added to context.filenameRules at some point during validation were an indication of an absent element, and depending on that file's requirement level, an issue was produced. the codes and reasons for these issues I stored directly in the rule object for the file itself (for instance, rules.files.common.core.dataset_description has property "code" with value "MISSING_DATASET_DESCRIPTION").
TL;DR: The deno validator app does not output an error when a required file, such as dataset_description.json, is not present in the dataset.
Since the Deno validator is currently in development, it's very possible that the dev team is aware of this bug and has a plan to address it, so feel free to ignore if this issue is superfluous. I became aware of it because I am developing a similar open source validator tool and used this deno app as a model.
Basically, your validator crawls through the file tree and, whenever it encounters a file, gathers up the relevant rules for that type of file, and checks the rules against it. The issue is that, if a file like dataset_description.json isn't present in the file system, then no file is ever encountered, and no rules are ever checked against it. At first I thought this was intentional, but going back to test the older BIDS validator, I can see that they have a DATASET_DESCRIPTION_MISSING error that is produced when the file is missing.
For what it's worth, my solution to this issue was to maintain a dictionary called rulesRecord with schema locations of rules as keys and booleans as values, and I used this dict to keep track of which rules were ever added to context.filenameRules. Any rules that were detected under rules.files but were never added to context.filenameRules at some point during validation were an indication of an absent element, and depending on that file's requirement level, an issue was produced. the codes and reasons for these issues I stored directly in the rule object for the file itself (for instance, rules.files.common.core.dataset_description has property "code" with value "MISSING_DATASET_DESCRIPTION").
our validator app
The text was updated successfully, but these errors were encountered: