Skip to content

feat: Add Context type generators from schema #24

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

effigies
Copy link
Contributor

Replaces #2. Still needs tests.

I got distracted on this by some bidsschematools refactorings. As it stands, attempting to import bids_validator.types.context takes some 500-600ms, around 80% of that is spent loading and dereferencing the YAML schema, and another 10% on loading the jsonschema package.

In the long term, I would like to move this into bidsschematools, and generate static types on build, rather than at runtime, but this should let us move ahead.

Copy link

codecov bot commented May 12, 2025

Codecov Report

Attention: Patch coverage is 76.66667% with 21 lines in your changes missing coverage. Please review.

Project coverage is 89.38%. Comparing base (7b8b72a) to head (67bc50f).

Files with missing lines Patch % Lines
src/bids_validator/types/_context.py 69.11% 17 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #24      +/-   ##
==========================================
- Coverage   92.16%   89.38%   -2.79%     
==========================================
  Files           9       13       +4     
  Lines         434      518      +84     
  Branches       64       81      +17     
==========================================
+ Hits          400      463      +63     
- Misses         21       38      +17     
- Partials       13       17       +4     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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