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

project dataclass - warn on extra kwargs #474

Merged
merged 4 commits into from
Aug 14, 2024
Merged

Conversation

ryanSoley
Copy link
Member

@ryanSoley ryanSoley commented Aug 12, 2024

What

  • overrides the domain Project's dataclass-created __init__
    • warn on unexpected kwargs rather than error to support forwards and backwards compatibility across changes to the rubicon-ml data model
    • from this point forward, any rubicon-ml library version should be able to read projects from disk written by any other rubicon-ml library version (assuming only the data model changes, not the way the library itself reads data)

How to Test

  • python -m pytest tests/unit/domain/test_domain.py

Next Steps

  • repeat the process for the remaining domain-level dataclasses

@ryanSoley ryanSoley requested review from a team as code owners August 12, 2024 17:46
@ryanSoley ryanSoley self-assigned this Aug 12, 2024
@ryanSoley ryanSoley added the enhancement Issues & PRs that capture enhancements to existing features. Issues require associated PRs. label Aug 12, 2024
@ryanSoley ryanSoley merged commit cff5a28 into main Aug 14, 2024
7 checks passed
@ryanSoley ryanSoley deleted the update-project-dataclass branch August 14, 2024 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues & PRs that capture enhancements to existing features. Issues require associated PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants