Skip to content

Commit

Permalink
Shorten the longest path (#1783)
Browse files Browse the repository at this point in the history
* shorten the longest path by reducing the sdm folder name and the __root_folder name

* shorten the longest path by reducing the sdm folder name and the __root_folder name
  • Loading branch information
jrobinAV committed Sep 12, 2024
1 parent 86d75f0 commit 6ebfbb5
Show file tree
Hide file tree
Showing 40 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion taipy/templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Want to be part of the *Taipy* community? Check out our
- `taipy/`:
- `templates/`: Contains templates, each in a dedicated sub-folder with the following structure:
- `<template-name>/`: Internal package for Taipy data backup mechanism.
- `{{cookiecutter.__root_folder_name}}/`: The root folder of the application created using this template.
- `{{cookiecutter.__root_folder}}/`: The root folder of the application created using this template.
- `hooks/`: Contains hooks to be executed before and after the application is created.
- `cookiecutter.json`: The configuration file for the template.
- `LICENSE`: The Apache 2.0 License.
Expand Down
2 changes: 1 addition & 1 deletion taipy/templates/default/cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"Does the application use Rest API?": "No",
"Do you want to initialize a new Git repository?": "No",

"__root_folder_name": "{{ cookiecutter['Application root folder name'] | replace(' ','-') }}",
"__root_folder": "{{ cookiecutter['Application root folder name'] | replace(' ','-') }}",
"__main_file": "{{ cookiecutter['Application main Python file'][:-3] if cookiecutter['Application main Python file'].endswith('.py') else cookiecutter['Application main Python file'] }}",
"__application_title": "{{ cookiecutter['Application title'] }}",
"__pages": "{{ cookiecutter['Page names in multi-page application?'] }}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"Does the application use TOML Config?": "No",
"Do you want to initialize a new Git repository?": "No",

"__root_folder_name": "{{ cookiecutter['Application root folder name'] | replace(' ','-') }}",
"__root_folder": "{{ cookiecutter['Application root folder name'] | replace(' ','-') }}",
"__main_file": "{{ cookiecutter['Application main Python file'][:-3] if cookiecutter['Application main Python file'].endswith('.py') else cookiecutter['Application main Python file'] }}",
"__application_title": "{{ cookiecutter['Application title'] }}",
"__use_toml_config": "{{ cookiecutter['Does the application use TOML Config?'] }}",
Expand Down
6 changes: 3 additions & 3 deletions tests/templates/test_scenario_mgt_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

def test_scenario_management_with_toml_config(tmpdir):
cookiecutter(
template="taipy/templates/scenario-management",
template="taipy/templates/sdm",
output_dir=tmpdir,
no_input=True,
extra_context={
Expand Down Expand Up @@ -50,7 +50,7 @@ def test_scenario_management_with_toml_config(tmpdir):

def test_scenario_management_without_toml_config(tmpdir):
cookiecutter(
template="taipy/templates/scenario-management",
template="taipy/templates/sdm",
output_dir=tmpdir,
no_input=True,
extra_context={
Expand Down Expand Up @@ -81,7 +81,7 @@ def test_scenario_management_without_toml_config(tmpdir):

def test_with_git(tmpdir):
cookiecutter(
template="taipy/templates/scenario-management",
template="taipy/templates/sdm",
output_dir=str(tmpdir),
no_input=True,
extra_context={
Expand Down

0 comments on commit 6ebfbb5

Please sign in to comment.