diff --git a/copier.yml b/copier.yml index be5f470..8890144 100644 --- a/copier.yml +++ b/copier.yml @@ -12,11 +12,13 @@ repo_name: help: | What is the name for your new repo? Generally, use the package name with underscores replaced by dashes. + (default = your project name with '-' rather than '_') default: "{{ project_name | replace('_', '-') }}" validator: >- {% if not (repo_name | regex_search('^[a-zA-Z0-9](?:[a-zA-Z0-9_.-]*[a-zA-Z0-9])?$')) %} {{ repo_name }} is not a valid repo name {% endif %} + description: type: str help: Please provide a description of your project @@ -24,7 +26,7 @@ description: github_org: type: str - help: What is your github organisation? + help: What is your github organisation? (default = DiamondLightSource) default: DiamondLightSource author_name: @@ -35,6 +37,6 @@ author_name: author_email: type: str help: What is your email address? - placeholder: email@diamond.ac.uk + placeholder: your.name@diamond.ac.uk _subdirectory: "src/copier_template" diff --git a/src/copier_template/src/{{ project_name }}/templates/example_import_files.txt.jinja b/src/copier_template/src/{{ project_name }}/templates/example_import_files.txt.jinja index 4dd7e8a..94af4c6 100644 --- a/src/copier_template/src/{{ project_name }}/templates/example_import_files.txt.jinja +++ b/src/copier_template/src/{{ project_name }}/templates/example_import_files.txt.jinja @@ -28,7 +28,7 @@ spec: archive: none: {} script: - image: ghcr.io/diamondlightsource/{% endraw %}{{repo_name}}{% raw %}-mounted-image:latest + image: ghcr.io/diamondlightsource/{% endraw %}{{repo_name}}{% raw %}-mounted-in-image:latest source: |- import os import sys diff --git a/src/copier_template/src/{{ project_name }}/workflow_definitions/create_notebook_in_image.py.jinja b/src/copier_template/src/{{ project_name }}/workflow_definitions/create_notebook_in_image.py.jinja index e862091..b34d8cc 100644 --- a/src/copier_template/src/{{ project_name }}/workflow_definitions/create_notebook_in_image.py.jinja +++ b/src/copier_template/src/{{ project_name }}/workflow_definitions/create_notebook_in_image.py.jinja @@ -16,9 +16,11 @@ from hera.workflows.archive import NoneArchiveStrategy # Sets the default image, unless specified otherwise, to this. # This image has access to the /workflow_definitions/mounted_files folder # and was created with the included dockerfile. +# furthermore, this image will only be created on a push to main +# if locally testing, use "ghcr.io/diamondlightsource/python-interface-to-workflows-mounted-in-image:latest" global_config.set_class_defaults( # pyright: ignore Script, - image="ghcr.io/diamondlightsource/{% endraw %}{{repo_name}}{% raw %}-mounted-image:latest", + image="ghcr.io/diamondlightsource/{% endraw %}{{repo_name}}{% raw %}-mounted-in-image:latest", ) diff --git a/src/python_interface_to_workflows/templates/example_import_files.txt b/src/python_interface_to_workflows/templates/example_import_files.txt index 028c475..fb4a313 100644 --- a/src/python_interface_to_workflows/templates/example_import_files.txt +++ b/src/python_interface_to_workflows/templates/example_import_files.txt @@ -27,7 +27,7 @@ spec: archive: none: {} script: - image: ghcr.io/diamondlightsource/python-interface-to-workflows-mounted-image:latest + image: ghcr.io/diamondlightsource/python-interface-to-workflows-mounted-in-image:latest source: |- import os import sys diff --git a/src/python_interface_to_workflows/workflow_definitions/create_notebook_in_image.py b/src/python_interface_to_workflows/workflow_definitions/create_notebook_in_image.py index 9562091..3c66111 100644 --- a/src/python_interface_to_workflows/workflow_definitions/create_notebook_in_image.py +++ b/src/python_interface_to_workflows/workflow_definitions/create_notebook_in_image.py @@ -17,7 +17,7 @@ # and was created with the included dockerfile. global_config.set_class_defaults( # pyright: ignore Script, - image="ghcr.io/diamondlightsource/python-interface-to-workflows-mounted-image:latest", + image="ghcr.io/diamondlightsource/python-interface-to-workflows-mounted-in-image:latest", )