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

Change to short names in config #3499

Merged
merged 12 commits into from
Jan 18, 2024
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

## Breaking changes to the API
* Added logging about not using async mode in `SequentiallRunner` and `ParallelRunner`.
* Changed input format for tools option obtained from --config file from numbers to short names.

## Documentation changes
* Added documentations about `bootstrap_project` and `configure_project`.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/starters/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The configuration file must contain:

Additionally, the configuration file may contain:

* `tools`: The tools to customise your project setup with. Select from comma-separated values, ranges, or 'all/none'. Omitting this from your configuration file will result in the default selection of `none`.
* `tools`: The tools to customise your project setup with. Select from comma-separated values `lint, test, log, docs, data, pyspark, viz` or `all/none`. Omitting this from your configuration file will result in the default selection of `none`.
* `example`: Indicate `yes` or `no` to select whether you would like your project to be populated with example code. Omitting this from your configuration file will result in the default selection of `no`.
DimedS marked this conversation as resolved.
Show resolved Hide resolved

The `output_dir` can be specified as `~` for the home directory or `.` for the current working directory. Here is an example `config.yml`, which assumes that a directory named `~/code` already exists:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/starters/new_project_tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ As an alternative to the interactive project creation workflow, you can also sup
"my project"

"tools":
"2-6"
"lint, test, log, docs, data, pyspark, viz"

"example_pipeline":
"y"
Expand Down
4 changes: 2 additions & 2 deletions features/steps/cli_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def create_config_file_without_starter(context):
context.root_project_dir = context.temp_dir / context.project_name
context.package_name = context.project_name.replace("-", "_")
config = {
"tools": "1-5",
"tools": "lint, test, log, docs, data",
"project_name": context.project_name,
"example_pipeline": "no",
"repo_name": context.project_name,
Expand All @@ -189,7 +189,7 @@ def create_config_file_with_tools(context, tools):
It takes a custom tools list and sets example prompt to `y`.
"""

tools_str = tools if tools != "none" else ""
tools_str = tools
AhdraMeraliQB marked this conversation as resolved.
Show resolved Hide resolved

context.config_file = context.temp_dir / "config.yml"
context.project_name = "project-dummy"
Expand Down
12 changes: 6 additions & 6 deletions features/tools.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Feature: New Kedro project with tools
Then I should get a successful exit code

Scenario: Create a new Kedro project with all tools except 'viz' and 'pyspark'
Given I have prepared a config file with tools "1,2,3,4,5"
Given I have prepared a config file with tools "lint, test, log, docs, data"
When I run a non-interactive kedro new without starter
Then the expected tool directories and files should be created with "1,2,3,4,5"
Then the expected tool directories and files should be created with "lint, test, log, docs, data"
Given I have installed the project dependencies
When I execute the kedro command "run"
Then I should get a successful exit code
Expand All @@ -25,17 +25,17 @@ Feature: New Kedro project with tools
Then I should get a successful exit code

Scenario: Create a new Kedro project with only 'pyspark' tool
Given I have prepared a config file with tools "6"
Given I have prepared a config file with tools "pyspark"
When I run a non-interactive kedro new without starter
Then the expected tool directories and files should be created with "6"
Then the expected tool directories and files should be created with "pyspark"
Given I have installed the project dependencies
When I execute the kedro command "run"
Then I should get a successful exit code

Scenario: Create a new Kedro project with only 'viz' tool
Given I have prepared a config file with tools "7"
Given I have prepared a config file with tools "viz"
When I run a non-interactive kedro new without starter
Then the expected tool directories and files should be created with "7"
Then the expected tool directories and files should be created with "viz"
Given I have installed the project dependencies
When I execute the kedro command "run"
Then I should get a successful exit code
Loading