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
15 changes: 13 additions & 2 deletions copier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ custom_install:
retrofitting existing project: retrofit
custom: custom

contains_code:
help: The repo contains some code that should be tested.
type: bool
default: >-
{% if custom_install != 'notebook' %}
true
{% else %}
false
{% endif %}
when: false # Automatically determined, not asked to the user.

project_name:
type: str
help: What is the name of your project?
Expand Down Expand Up @@ -119,7 +130,7 @@ mypy_type_checking:
create_example_module:
help: Do you want to create some example module code?
type: bool
default: yes
default: "{{ contains_code }}"
choices:
yes: true
no: false
Expand Down Expand Up @@ -153,7 +164,7 @@ include_dev_guide:
include_benchmarks:
help: Do you want to enable benchmarking?
type: bool
default: yes
default: "{{ contains_code }}"
choices:
yes: true
no: false
Expand Down
2 changes: 2 additions & 0 deletions python-project-template/.pre-commit-config.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ repos:
args:
["docs/pre_executed/"]
{%- endif %}
{%- if contains_code %}
# Run unit tests, verify that they pass. Note that coverage is run against
# the ./src directory here because that is what will be committed. In the
# github workflow script, the coverage is run against the installed package
Expand All @@ -165,3 +166,4 @@ repos:
language: system
pass_filenames: false
always_run: true
{%- endif %}
Loading