Skip to content

Commit a918d4d

Browse files
doraemonlovewangjiaju.716
andauthored
fix: cookiecutter template remove replace. (#151)
Co-authored-by: wangjiaju.716 <[email protected]>
1 parent ecc27d7 commit a918d4d

File tree

6 files changed

+5
-5
lines changed

6 files changed

+5
-5
lines changed

veadk/cli/cli_deploy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ def deploy(
8686
tmp_dir_name = f"{user_proj_abs_path.name}_{formatted_timestamp()}"
8787

8888
settings = {
89-
"local_dir_name": tmp_dir_name,
90-
"app_name": user_proj_abs_path.name,
89+
"local_dir_name": tmp_dir_name.replace("-", "_"),
90+
"app_name": user_proj_abs_path.name.replace("-", "_"),
9191
"agent_module_name": user_proj_abs_path.name,
9292
"short_term_memory_backend": short_term_memory_backend,
9393
"vefaas_application_name": vefaas_app_name,

veadk/cli/cli_init.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def init(
103103
shutil.rmtree(target_dir_path)
104104

105105
settings = _render_prompts()
106-
settings["local_dir_name"] = local_dir_name
106+
settings["local_dir_name"] = local_dir_name.replace("-", "_")
107107

108108
if not vefaas_template_type:
109109
vefaas_template_type = "template"

veadk/integrations/ve_faas/template/cookiecutter.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"local_dir_name": "veadk_vefaas_proj",
3-
"app_name": "weather-report",
3+
"app_name": "weather_report",
44
"agent_module_name": "weather_agent",
55
"short_term_memory_backend": "local",
66
"vefaas_application_name": "weather-reporter",

veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from {{ cookiecutter.app_name|replace('-', '_') }}.agent import agent # type: ignore
15+
from {{ cookiecutter.app_name }}.agent import agent # type: ignore
1616

1717
from veadk.memory.short_term_memory import ShortTermMemory
1818
from veadk.types import AgentRunConfig

veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/{{ cookiecutter.app_name|replace('-', '_') }}/__init__.py renamed to veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/{{ cookiecutter.app_name }}/__init__.py

File renamed without changes.

veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/{{ cookiecutter.app_name|replace('-', '_') }}/agent.py renamed to veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/{{ cookiecutter.app_name }}/agent.py

File renamed without changes.

0 commit comments

Comments
 (0)