Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions copier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ package_name:
package_short_description:
type: str
default: Short description of package
validator: >-
{% if (package_short_description | regex_replace ('"', '\\\\"')|regex_replace ("'", "\\\\'")%}
package_short_description must not contain unescaped double or single quotes.
{% endif %}
keyword1:
type: str
default: keyword1
Expand Down Expand Up @@ -42,10 +38,6 @@ full_name:
type: str
default: Jane Smith
help: Enter your full name.
# validator: >-
# {% if '"' in full_name %}
# full_name must not contain unescaped double quotes. Use \\" for double quotes.
# {% endif %}
email:
type: str
default: yourname@esciencecenter.nl
Expand Down
4 changes: 2 additions & 2 deletions template/CITATION.cff.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ cff-version: "1.2.0"
title: "{{ package_name }}"
authors:
-
family-names: {{ full_name.split(' ')[-1] }}
given-names: {{ full_name.split(' ')[0] }}
family-names: {{ full_name.replace('\"', '\\\"').split(' ')[-1] }}
given-names: {{ full_name.replace('\"', '\\\"').split(' ')[0] }}
orcid: "https://orcid.org/0000-0000-0000-0000"
date-released: 20??-MM-DD
doi: <insert your DOI here>
Expand Down
2 changes: 1 addition & 1 deletion template/README.md.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

## How to use {{ package_name }}

{{ package_short_description }}
{{ package_short_description|replace('\"', '\\\"') }}

The project setup is documented in [project_setup.md](project_setup.md). Feel free to remove this document (and/or the link to this document) if you don't need it.

Expand Down
4 changes: 2 additions & 2 deletions template/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta"

[project]
authors = [
{ name = "{{ full_name }}", email = "{{ email }}" }
{ name = "{{ full_name|replace('\"', '\\\"') }}", email = "{{ email }}" }
]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
Expand All @@ -31,7 +31,7 @@ classifiers = [
"Programming Language :: Python :: 3.12",
]
dependencies = []
description = "{{ package_short_description }}"
description = "{{ package_short_description|replace('\"', '\\\"') }}"
keywords = [
"{{ keyword1 }}",
"{{ keyword2 }}",
Expand Down
2 changes: 1 addition & 1 deletion template/src/{{package_name}}/__init__.py.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import logging

logging.getLogger(__name__).addHandler(logging.NullHandler())

__author__ = "{{ full_name }}"
__author__ = "{{ full_name|replace('\"', '\\\"') }}"
__email__ = "{{ email }}"
__version__ = "{{ version }}"