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

[dagster-dg] Add separate command to generate JSON schema for code location #27896

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

benpankow
Copy link
Member

@benpankow benpankow commented Feb 18, 2025

Summary

Adds a command to generate a JSON schema for a given code location. Drops the schema in the location referenced by the VS Code extension, so this can be used to update the schema without the other rigamarole involved with that command.

dg code-location generate-component-schema --output-file foo.json

When #27863 lands, I intend to add a --watch flag to this command as well, so you can live-update the schema if the set of components changes.

Test Plan

Brief test, the underlying dagster-components CLI tests correctness.

@benpankow
Copy link
Member Author

benpankow commented Feb 18, 2025

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

@@ -30,12 +31,32 @@ def test_configure_editor(editor: str) -> None:

assert out.exit_code == 0

sample_project_vscode_path = Path.cwd() / ".vscode"
assert (sample_project_vscode_path / "schema.json").exists()
sample_project_dg_path = Path.cwd() / ".dg"
Copy link
Member Author

@benpankow benpankow Feb 18, 2025

Choose a reason for hiding this comment

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

Changed this to .dg folder instead of .vscode, open to other suggestions though. We'll likely want a "place to store dg state/metadata" in code locations at some point for other commands, I'd reckon?

Copy link
Member

@schrockn schrockn left a comment

Choose a reason for hiding this comment

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

Good question is how this fits into a "verb-first" world

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