Page MenuHomePhabricator

(type-system-changes-10) dagster_type --> usable_as_dagster_type; introduce make_python_type_usable_as_dagster_type

Authored by schrockn on Jan 30 2020, 11:49 PM.



Our long national nightmare of dagster type naming is about to
come to end -- or at least a temporary cessation. There will, at last,
be peace in our time.

The goal of this rename is to "downgrade" the @dagster_type decorator
from our core workhouse type creation function to a more explicit, less
foregrounded equivalent, @usable_as_dagster_type.

This name indicates that this python class can be passed to
anywhere that would expect a dagster type, such as an argument
to an InputDefinition or an OutputDefinition

Additionally we expose make_python_type_usable_as_dagster_type to
allow the user to make *existing* classes usable and correspond
to a dagster type. This would be used, as an example, to import
a class from a library you do not control, and make it usable
in dagster type contexts.

Test Plan


Diff Detail

R1 dagster
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

map_to_dagster_type --> useable_as_dagster_type

schrockn retitled this revision from (type-system-changes-10) dagster_type --> map_to_dagster_type to (type-system-changes-10) dagster_type --> useable_as_dagster_type.Feb 7 2020, 9:28 PM
schrockn retitled this revision from (type-system-changes-10) dagster_type --> useable_as_dagster_type to (type-system-changes-10) dagster_type --> usable_as_dagster_type; introduce make_python_type_usable_as_dagster_type.
schrockn edited the summary of this revision. (Show Details)
schrockn edited the test plan for this revision. (Show Details)
schrockn added reviewers: alangenfeld, max.


This revision is now accepted and ready to land.Feb 8 2020, 1:50 AM