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 initial pydantic model #52

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kaitj
Copy link

@kaitj kaitj commented Nov 1, 2024

An initial pydantic model that tried to mimic the descriptor schema found in niwrap. Tested it locally against some descriptors and those have passed. Still needs a little work to integrate with the core.

Some additional notes:

  • Wrapping the validation with try-except ends up with more helpful error messages (at least when developing).
  • Might be missing some validation logic
  • Briefly discussed writing two base model classes and using Union for oneOf cases (from the descriptor).

@kaitj kaitj requested a review from nx10 November 1, 2024 17:58
@kaitj kaitj self-assigned this Nov 1, 2024
Copy link

codecov bot commented Nov 1, 2024

Codecov Report

Attention: Patch coverage is 0% with 190 lines in your changes missing coverage. Please review.

Project coverage is 63.70%. Comparing base (a2b8e53) to head (f434749).

Files with missing lines Patch % Lines
src/styx/frontend/schema/properties/io.py 0.00% 85 Missing ⚠️
src/styx/frontend/schema/descriptors_schema.py 0.00% 33 Missing ⚠️
src/styx/frontend/schema/properties/containers.py 0.00% 18 Missing ⚠️
src/styx/frontend/schema/properties/tests.py 0.00% 13 Missing ⚠️
src/styx/frontend/schema/properties/groups.py 0.00% 11 Missing ⚠️
src/styx/frontend/schema/properties/__init__.py 0.00% 8 Missing ⚠️
src/styx/frontend/schema/properties/resources.py 0.00% 8 Missing ⚠️
src/styx/frontend/schema/properties/environment.py 0.00% 6 Missing ⚠️
src/styx/frontend/schema/__init__.py 0.00% 4 Missing ⚠️
src/styx/frontend/schema/properties/errors.py 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #52      +/-   ##
==========================================
- Coverage   71.37%   63.70%   -7.67%     
==========================================
  Files          20       30      +10     
  Lines        1579     1769     +190     
==========================================
  Hits         1127     1127              
- Misses        452      642     +190     

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

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