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

New custom constructor API #188

Closed
4 tasks done
brentyi opened this issue Oct 26, 2024 · 1 comment
Closed
4 tasks done

New custom constructor API #188

brentyi opened this issue Oct 26, 2024 · 1 comment

Comments

@brentyi
Copy link
Owner

brentyi commented Oct 26, 2024

The current API for defining custom constructors, exposed as arguments to tyro.conf.arg() and tyro.conf.subcommand(), is overly limiting.

This may take a while, but we can make this much more flexible. Roadmap:

  • Define a PrimitiveConstructorSpec, which defines the behavior of types that can be instantiated from a single command-line argument.
  • Define a StructConstructorSpec, which defines the behavior of types that can be broken down into multiple arguments.
  • Add registry logic for both.
  • Move support for built-in types to the new API.

Relevant issues: #23, #177, #185, #186

@brentyi
Copy link
Owner Author

brentyi commented Dec 4, 2024

done via #189 #191 #194 #201!

@brentyi brentyi closed this as completed Dec 4, 2024
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

No branches or pull requests

1 participant