-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[dg] Make init command work with a dirname arg (BUILD-893) (BUILD-919) #29121
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
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
2a73b54
to
3ed5e46
Compare
Deploy preview for dagster-docs ready! Preview available at https://dagster-docs-klce2t26w-elementl.vercel.app Direct link to changed pages: |
dg init | ||
Scaffold a new project in a new directory `<project_name>`. Prompts for `<project_name>`. | ||
dg init . | ||
Scaffold a new project in the CWD. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assume project name is taken from the name of the last component of the CWD?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, will add to the description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent.
Do docs in the same PR to simplify pick process or in follow up?
3ed5e46
to
63b613b
Compare
Prefer follow-up |
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is much better
#29121) Change the `dg init` command in a few ways: - a `DIRNAME` argument is added - `--workspace-name` option is removed, replaced by `--workspace` flag - `DIRNAME` may be set to `.` to create (either workspace or project) in the current directory - default workspace prompt is now (`.`) Examples: - `dg init`: creates a project, prompts for project name - `dg init .`: scaffold a new project in the CWD - `dg init helloworld`: scaffold a new project in new dir `helloworld` - `dg init -workspace dagster-workspace`: scaffold a new workspace in new dir `dagster-workspace`, prompt for project name - `dg init --workspace .`: scaffold a new workspace in the CWD, prompt for project anme - `dg init --workspace --project-name helloworld .`: scaffold a new workspace in the CWD, create project named helloworld Modified init unit tests. The arguments/options of the `dg init` command have changed. You may pass `.` as an argument to initialize a project/workspace in the CWD. See `dg init --help` for more details. --------- Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Summary & Motivation
Change the
dg init
command in a few ways:DIRNAME
argument is added--workspace-name
option is removed, replaced by--workspace
flagDIRNAME
may be set to.
to create (either workspace or project) in the current directory.
)Examples:
dg init
: creates a project, prompts for project namedg init .
: scaffold a new project in the CWDdg init helloworld
: scaffold a new project in new dirhelloworld
dg init -workspace dagster-workspace
: scaffold a new workspace in new dirdagster-workspace
, prompt for project namedg init --workspace .
: scaffold a new workspace in the CWD, prompt for project anmedg init --workspace --project-name helloworld .
: scaffold a new workspace in the CWD, create project named helloworldHow I Tested These Changes
Modified init unit tests.
Changelog
The arguments/options of the
dg init
command have changed. You may pass.
as an argument to initialize a project/workspace in the CWD. Seedg init --help
for more details.