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

RCAL-695 generalize attribute assignment and creation #284

Merged
merged 6 commits into from
Nov 20, 2023

Conversation

perrygreenfield
Copy link
Collaborator

Resolves RCAL-695

Closes #54

This PR addresses allows new node attributes to be created using dot notation so long as the attribute is consistent with the schema (e.g., an explicit property or matches a patternProperty).

It also enables validation of the created attribute's value, as well as validating object instances assigned to existing attributes.

Checklist

@codecov
Copy link

codecov bot commented Oct 18, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (14beded) 96.98% compared to head (384de89) 97.04%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #284      +/-   ##
==========================================
+ Coverage   96.98%   97.04%   +0.06%     
==========================================
  Files          29       28       -1     
  Lines        2485     2504      +19     
==========================================
+ Hits         2410     2430      +20     
+ Misses         75       74       -1     

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

@PaulHuwe
Copy link
Collaborator

Can you add a PLWishMaster link to passed RCAL regression tests with this?

@braingram
Copy link
Collaborator

Copy link
Collaborator

@PaulHuwe PaulHuwe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@WilliamJamieson WilliamJamieson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A follow on question to the requested change. Can this be done directly on a DataModel object itself rather than the node object(s) it wraps?

tests/test_models.py Outdated Show resolved Hide resolved
@perrygreenfield perrygreenfield merged commit 3056adc into spacetelescope:main Nov 20, 2023
16 checks passed
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.

Object nodes should allow new attributes to be set with dot notation if present in schema
4 participants