Page MenuHomePhabricator

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

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

Details

Summary

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

BK

Diff Detail

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

Event Timeline

schrockn created this revision.Thu, Jan 30, 11:49 PM
schrockn updated this revision to Diff 9183.Thu, Jan 30, 11:52 PM

upmessage

schrockn updated this revision to Diff 9383.Fri, Feb 7, 9:10 PM

map_to_dagster_type --> useable_as_dagster_type

Harbormaster failed remote builds in B7623: Diff 9384!
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.Fri, Feb 7, 9:28 PM
schrockn updated this revision to Diff 9412.Sat, Feb 8, 12:02 AM
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.

upmessage

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