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

[dg] Pull in pydantic.Field(examples=...) into components autodocs #27956

Merged
merged 5 commits into from
Feb 20, 2025

Conversation

benpankow
Copy link
Member

@benpankow benpankow commented Feb 20, 2025

Summary

pydantic.Field has a native way to specify field examples. We can use this to populate example values in components autodocs, rather than the default, not too useful example values of '...', 0 etc.

See https://github.com/dagster-io/dagster/pull/27956/files#diff-737e9f606f52a5e1a9b5bd54cbd5f5591c7276e3bd236def504db612930919a9 for a sample.

How I Tested These Changes

Update unit test.

@benpankow
Copy link
Member Author

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

Copy link

github-actions bot commented Feb 20, 2025

Deploy preview for dagster-docs ready!

Preview available at https://dagster-docs-r202ufbpr-elementl.vercel.app
https://benpankow-components-docs-examples.archive.dagster-docs.io

Direct link to changed pages:

@benpankow benpankow force-pushed the benpankow/components-docs-examples branch from fd238a7 to 9609880 Compare February 20, 2025 21:32
@benpankow benpankow requested a review from neverett as a code owner February 20, 2025 21:34
Copy link
Collaborator

@smackesey smackesey left a comment

Choose a reason for hiding this comment

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

I heartily approve

@benpankow benpankow merged commit e24e13c into master Feb 20, 2025
7 checks passed
@benpankow benpankow deleted the benpankow/components-docs-examples branch February 20, 2025 23:33
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