You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[components] Enforce that all component schemas are of type ResolvableModel (#27677)
## Summary & Motivation
Doing this has a few benefits. The first is that we force people to use ResolvableModel as the base class for their component schemas, which means we're able to inject additional stuff into that class in the future.
The second is that we can create a default `load()` method, which pretty significantly reduces boilerplate for these component types.
## How I Tested These Changes
## Changelog
NOCHANGELOG
Copy file name to clipboardExpand all lines: python_modules/libraries/dagster-components/dagster_components/lib/sling_replication_collection/component.py
Copy file name to clipboardExpand all lines: python_modules/libraries/dagster-components/dagster_components_tests/integration_tests/components/definitions/other_local_component_sample/__init__.py
Copy file name to clipboardExpand all lines: python_modules/libraries/dagster-dg/dagster_dg/templates/COMPONENT_TYPE/COMPONENT_TYPE_NAME_PLACEHOLDER.py.jinja
+2-9
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,8 @@ class {{ component_type_class_name }}(Component):
17
17
COMPONENT DESCRIPTION HERE.
18
18
"""
19
19
20
+
def __init__(self): ...
21
+
20
22
@classmethod
21
23
def get_schema(cls):
22
24
return {{ component_type_class_name }}Params
@@ -25,15 +27,6 @@ class {{ component_type_class_name }}(Component):
0 commit comments