From acbc6e837c5456734acc48b716c8711832419231 Mon Sep 17 00:00:00 2001 From: Matthew Carre Date: Mon, 24 Aug 2026 10:21:33 +0000 Subject: [PATCH 1/2] docs(copier): explicitly lists defaults --- copier.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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" From 7a811f92c2afe1d26b6d4b3f6bbb22140184ad22 Mon Sep 17 00:00:00 2001 From: Matthew Carre Date: Tue, 25 Aug 2026 09:07:10 +0000 Subject: [PATCH 2/2] docs: adds further explanation --- .../templates/example_import_files.txt.jinja | 2 +- .../workflow_definitions/create_notebook_in_image.py.jinja | 4 +++- .../templates/example_import_files.txt | 2 +- .../workflow_definitions/create_notebook_in_image.py | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) 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", )