Skip to content

Improve pydantic model and dataclass usage#142

Merged
superstar54 merged 2 commits intoscinode:mainfrom
superstar54:improve_pydantic_model_usage
Jan 22, 2026
Merged

Improve pydantic model and dataclass usage#142
superstar54 merged 2 commits intoscinode:mainfrom
superstar54:improve_pydantic_model_usage

Conversation

@superstar54
Copy link
Collaborator

Previously, Pydantic Models or dataclasses are annotation-only. But this is counterintuitive!

In this PR allows users to use pydantic model as inputs, and outputs direclty. No need to provide plain dict.

Previously, Pydantic Models or dataclasses are annotation-only. But this is counterintuitive!

In this PR allows users to use pydantic model as inputs, and outputs direclty. No need to provide plain dict.
@codecov
Copy link

codecov bot commented Jan 22, 2026

Codecov Report

❌ Patch coverage is 88.65979% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.18%. Comparing base (92a41de) to head (27906fd).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/node_graph/utils/struct_utils.py 83.52% 14 Missing ⚠️
src/node_graph/socket_spec.py 53.84% 6 Missing ⚠️
src/node_graph/socket.py 80.00% 1 Missing ⚠️
tests/test_graph_task.py 96.15% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #142      +/-   ##
==========================================
+ Coverage   90.16%   90.18%   +0.01%     
==========================================
  Files          79       81       +2     
  Lines        8430     8617     +187     
==========================================
+ Hits         7601     7771     +170     
- Misses        829      846      +17     

☔ 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.

@superstar54 superstar54 force-pushed the improve_pydantic_model_usage branch from 4b7a366 to 90fd09c Compare January 22, 2026 13:29
@superstar54 superstar54 force-pushed the improve_pydantic_model_usage branch from 90fd09c to 27906fd Compare January 22, 2026 13:40
@superstar54 superstar54 changed the title Improve pydantic model usage Improve pydantic model and dataclass usage Jan 22, 2026
@superstar54 superstar54 merged commit c7d32f4 into scinode:main Jan 22, 2026
7 of 8 checks passed
@superstar54 superstar54 deleted the improve_pydantic_model_usage branch January 22, 2026 13:43
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