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

Migrate to JSR schema validator #3206

Merged
merged 30 commits into from
Nov 12, 2024
Merged

Migrate to JSR schema validator #3206

merged 30 commits into from
Nov 12, 2024

Conversation

nellh
Copy link
Contributor

@nellh nellh commented Nov 11, 2024

This disables the legacy BIDS validator, switching to only the schema validator for new validation runs. The schema validator is now the default for all datasets.

The schema validator output is now in a new database model, this is the only new validation runs that will be created after this is deployed.

Existing validation data is still available on the draft.issues and snapshot.issues fields as before. You can get both like this:

query($datasetId: ID!) {
  dataset(id: $datasetId) {
    id
    draft {
      issues {
        code
        reason
        key
      }
      validation {
        id
        codeMessages {
          code
          message
        }
        issues {
          code
          location
          rule
          severity
          subCode
        }
      }
      summary {
        validatorMetadata {
          validator
          version
        }
      }
    }
  }
}

For schema validation this also adds a sort for location or code:

Screenshot From 2024-11-11 13-12-46

Also requires #3003 to be merged.

Copy link

codecov bot commented Nov 11, 2024

Codecov Report

Attention: Patch coverage is 48.56712% with 341 lines in your changes missing coverage. Please review.

Project coverage is 45.42%. Comparing base (defc554) to head (58573a0).
Report is 31 commits behind head on master.

Files with missing lines Patch % Lines
...penneuro-app/src/scripts/validation/validation.tsx 32.81% 86 Missing ⚠️
...-app/src/scripts/validation/validation-results.tsx 32.29% 65 Missing ⚠️
packages/openneuro-server/src/graphql/schema.ts 0.00% 56 Missing ⚠️
...enneuro-app/src/scripts/uploader/upload-issues.tsx 0.00% 36 Missing ⚠️
...enneuro-server/src/graphql/resolvers/validation.ts 29.72% 26 Missing ⚠️
...openneuro-app/src/scripts/workers/schema.worker.ts 0.00% 21 Missing ⚠️
...src/scripts/dataset/components/ValidationBlock.tsx 64.15% 19 Missing ⚠️
...ro-app/src/scripts/validation/validation-panel.tsx 47.82% 12 Missing ⚠️
...o-app/src/scripts/validation/validation-issues.tsx 92.85% 7 Missing ⚠️
...nneuro-app/src/scripts/dataset/draft-container.tsx 0.00% 5 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3206      +/-   ##
==========================================
+ Coverage   44.53%   45.42%   +0.88%     
==========================================
  Files         592      594       +2     
  Lines       38078    37993      -85     
  Branches     1140     1148       +8     
==========================================
+ Hits        16959    17258     +299     
+ Misses      20919    20538     -381     
+ Partials      200      197       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

nellh added 23 commits November 11, 2024 13:35
Use "module": "esnext" and "moduleResolution": "bundler" to allow the integration to load
@nellh nellh force-pushed the bids-validator-jsr branch from 0ec915f to 5caacee Compare November 11, 2024 21:35
@nellh nellh force-pushed the bids-validator-jsr branch from 02e3c68 to 258a56c Compare November 12, 2024 03:25
Vite's asset import glob plugin will mangle this import and we don't need the import meta info in this case
@nellh nellh marked this pull request as ready for review November 12, 2024 22:18
@nellh nellh merged commit 0400403 into master Nov 12, 2024
15 checks passed
@nellh nellh deleted the bids-validator-jsr branch November 12, 2024 22:30
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.

1 participant