Skip to content

bids validation: unclear purpose of an O(N^2) code #1070

@yarikoptic

Description

@yarikoptic

Looking at https://github.com/dandi/dandi-cli/blob/HEAD/dandi/upload.py#L430, the O complexity doesn't matter much besides if I do smth like _bids_discover_and_validate(glob('openneuro/*')) it could eventually cost some CPU cycles, but overall goal is not clear to me there: are we trying to identify "root" BIDS datasets, or what?

whatever we find the reason to be for that code, if warranted, should provide a comment in the code on the purpose. But may be we could just avoid that O(N^2) looping through all possible combinations of bids datasets paths.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions