Skip to content
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

Add summary generation to schema-prototype #1481

Merged
merged 13 commits into from
Jul 8, 2022

Conversation

rwblair
Copy link
Member

@rwblair rwblair commented Jun 29, 2022

Summary generated is an object literal being exported in src/summary/summary. May be better served as a class. file counts, modalities, and participant metadata seem to be working. Task name is reliant on parsing json files. Right now summaryUpdate code is trying to access the json field in the current context to see if they have a TaskName field.

Also have a some error: AssertionError: Test case is leaking async ops. to figure out.

bids-validator/src/summary/summary.ts Outdated Show resolved Hide resolved
bids-validator/src/validators/bids.ts Outdated Show resolved Hide resolved
@rwblair rwblair changed the title [WIP] Add summary generation to schema-prototype Add summary generation to schema-prototype Jul 1, 2022
@@ -79,7 +93,7 @@ export async function _readFileTree(
const tree = new FileTreeDeno(relativePath, name, parent, rootPath)

for await (const dirEntry of Deno.readDir(join(rootPath, relativePath))) {
if (dirEntry.isFile) {
if (dirEntry.isFile || dirEntry.isSymlink) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running locally on an annexed dataset I had to add this to see any files. What kinds of problems could having this cause?

@rwblair
Copy link
Member Author

rwblair commented Jul 1, 2022

@nellh Testing on ds000003 the deno summary matches current summary with the exception of size and datatypes. Current validator will attempt to use filename suffix as a datatype in some cases. For ds003 this means inplaneT2 and events gets listed as a datatype. Can you think of anywhere that would rely on events being in the datatypes?

Deno correctly calculates the size where as current valdiator outputs 0. May have something to do with this: https://github.com/bids-standard/bids-validator/pull/1481/files#r912104701

Anything I should add or update?

@nellh
Copy link
Member

nellh commented Jul 1, 2022

@nellh Testing on ds000003 the deno summary matches current summary with the exception of size and datatypes. Current validator will attempt to use filename suffix as a datatype in some cases. For ds003 this means inplaneT2 and events gets listed as a datatype. Can you think of anywhere that would rely on events being in the datatypes?

At least on the OpenNeuro side, nothing depends on events being listed and I think we should stick to the more spec accurate output here.

bids-validator/src/files/deno.ts Outdated Show resolved Hide resolved
bids-validator/src/summary/summary.ts Outdated Show resolved Hide resolved
bids-validator/src/summary/summary.ts Outdated Show resolved Hide resolved
… class instead of singleton. Add additional filenames test
@rwblair rwblair merged commit f4ec159 into bids-standard:schema-prototyping Jul 8, 2022
@rwblair rwblair deleted the schema/summary branch August 7, 2024 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants