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

[components] Remove AutomationConditionModel in favor of raw python object #26649

Open
wants to merge 1 commit into
base: 12-20-_components_templating_for_asset_attributes
Choose a base branch
from

Conversation

OwenKephart
Copy link
Contributor

Summary & Motivation

As title -- this pattern generally allows us to avoid creating parallel schemas for all of our library objects.

How I Tested These Changes

Changelog

NOCHANGELOG

Copy link
Contributor Author

OwenKephart commented Dec 20, 2024

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@OwenKephart OwenKephart force-pushed the 12-20-_components_templating_for_asset_attributes branch from 813dc40 to 483060a Compare December 20, 2024 20:35
@OwenKephart OwenKephart force-pushed the 12-20-_components_remove_automationconditionmodel_in_favor_of_raw_python_object branch from aa2a754 to 63116a8 Compare December 20, 2024 20:35
Comment on lines +33 to +35
automation_condition: Optional[Union[str, AutomationCondition]] = RenderingScope(
Field(None), required_scope={"automation_condition"}
)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Technically, this field should actually just be of type Optional[str].

I want to do a followup here where we do something like:

automation_condition: Optional[str] = RenderedField(Optional[AutomationCondition], required_scope={"automation_condition"})

where we can have separate type checking for the rendered value

Copy link
Member

Choose a reason for hiding this comment

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

this would be a great followup.

Leave comment to this effect explaining the next steps.

Copy link
Member

@schrockn schrockn left a comment

Choose a reason for hiding this comment

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

this is so great

@OwenKephart OwenKephart force-pushed the 12-20-_components_templating_for_asset_attributes branch from 483060a to 38baab7 Compare December 20, 2024 20:43
@OwenKephart OwenKephart force-pushed the 12-20-_components_remove_automationconditionmodel_in_favor_of_raw_python_object branch from 63116a8 to cf4029f Compare December 20, 2024 20:43
@OwenKephart OwenKephart force-pushed the 12-20-_components_templating_for_asset_attributes branch from 38baab7 to 67dc5d0 Compare December 20, 2024 20:55
@OwenKephart OwenKephart force-pushed the 12-20-_components_remove_automationconditionmodel_in_favor_of_raw_python_object branch from cf4029f to a5770fd Compare December 20, 2024 20:55
Copy link
Member

@schrockn schrockn left a comment

Choose a reason for hiding this comment

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

crying-yes

@OwenKephart OwenKephart force-pushed the 12-20-_components_templating_for_asset_attributes branch from 67dc5d0 to 3deb344 Compare December 23, 2024 20:48
@OwenKephart OwenKephart force-pushed the 12-20-_components_remove_automationconditionmodel_in_favor_of_raw_python_object branch from a5770fd to 2b0ff0d Compare December 23, 2024 20:48
@OwenKephart OwenKephart force-pushed the 12-20-_components_templating_for_asset_attributes branch from 3deb344 to 7eb1d13 Compare December 23, 2024 22:04
@OwenKephart OwenKephart force-pushed the 12-20-_components_remove_automationconditionmodel_in_favor_of_raw_python_object branch from 2b0ff0d to 5fa066b Compare December 23, 2024 22:05
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.

2 participants