-
-
Notifications
You must be signed in to change notification settings - Fork 5
support deps_path
and params_path
in dataclass dependencies
#915
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for excluding dataclass fields marked with FieldTypes.PARAMS_PATH and FieldTypes.DEPS_PATH when converting objects for YAML output, and it updates tests to validate the new behavior.
- Excludes fields with specific metadata when converting dataclass instances to dictionaries.
- Updates DVC, params, and JSON configuration tests to reflect the new exclusion logic.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
zntrack/plugins/dvc_ 8000 plugin/init.py | Added logic to filter out fields using PARAMS_PATH/DEPS_PATH metadata and updated stage creation logic. |
tests/files/zntrack_config/dataclass_w_deps_params_path.json | Updated configuration to match the new exclusion behavior. |
tests/files/test_dataclass_w_deps_params_path.py | Added new tests to verify proper handling of deps_path and params_path in dataclass models. |
tests/files/params_config/dataclass_w_deps_params_path.yaml | Updated params YAML to reflect the changes in dataclass conversion. |
tests/files/dvc_config/dataclass_w_deps_params_path.yaml | Updated DVC YAML to support the new dependency path behavior. |
Comments suppressed due to low confidence (1)
zntrack/plugins/dvc_plugin/init.py:88
- [nitpick] The loop variable 'f' could be renamed to 'field_name' for improved clarity.
for f in exclude_fields:
…ZnTrack into deps_params_path_in_dc
for more information, see https://pre-commit.ci
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #915 +/- ##
==========================================
+ Coverage 88.87% 88.93% +0.05%
==========================================
Files 36 36
Lines 2067 2078 +11
==========================================
+ Hits 1837 1848 +11
Misses 230 230 ☔ View full report in Codecov by Sentry. |
No description provided.