From 675828a8a658fc5676dcf35ea075c9e9ca67ddff Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Tue, 6 Jun 2023 17:40:52 +0800 Subject: [PATCH 01/15] Refine gitlab ci. --- .gitlab-ci.yml | 8 +++++--- .gitlab-ci.yml.jinja | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 234600a7..95d76608 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,8 +5,9 @@ lint: image: python:3.11 interruptible: true only: - - merge_requests - /^v(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)$/ + - main + - merge_requests script: - env | sort - make dev-lint @@ -21,8 +22,9 @@ test: image: python:3.11 interruptible: true only: - - merge_requests - /^v(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)$/ + - main + - merge_requests script: - env | sort - make dev-tests @@ -52,8 +54,8 @@ pages: changes: - docs/**/* refs: - - master - /^v(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)$/ + - main script: - make dev-docs - make docs diff --git a/.gitlab-ci.yml.jinja b/.gitlab-ci.yml.jinja index 9f812d03..9de0422a 100644 --- a/.gitlab-ci.yml.jinja +++ b/.gitlab-ci.yml.jinja @@ -5,8 +5,9 @@ lint: image: {{ ci_image }} interruptible: true only: - - merge_requests - /^v(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)$/ + - main + - merge_requests script: - env | sort - make dev-lint @@ -21,8 +22,9 @@ test: image: {{ ci_image }} interruptible: true only: - - merge_requests - /^v(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)$/ + - main + - merge_requests script: - env | sort - make dev-tests @@ -52,8 +54,8 @@ pages: changes: - docs/**/* refs: - - master - /^v(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)$/ + - main script: - make dev-docs - make docs From 523f71e7100480dcf205718303cd4503a951ae0e Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Wed, 7 Jun 2023 17:15:04 +0800 Subject: [PATCH 02/15] Fix docs path for gitlab pages. --- .gitignore | 1 + .gitignore.jinja | 1 + Makefile | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index cecba5bb..116fe13c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ .DS_Store .copier-answers.yml Pipfile +public # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/.gitignore.jinja b/.gitignore.jinja index d9a1adf1..b1b96cb2 100644 --- a/.gitignore.jinja +++ b/.gitignore.jinja @@ -5,6 +5,7 @@ .copier-answers.yml {%- endif %} Pipfile +public # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/Makefile b/Makefile index 7095a97e..6dd060c0 100644 --- a/Makefile +++ b/Makefile @@ -72,7 +72,7 @@ upload: ${PIPRUN} python -m twine upload dist/* docs: - ${PIPRUN} python -m sphinx.cmd.build docs docs/_build + ${PIPRUN} python -m sphinx.cmd.build docs public docs-autobuild: - ${PIPRUN} python -m sphinx_autobuild docs docs/_build + ${PIPRUN} python -m sphinx_autobuild docs public From 1d03b69e11195ab0379db28beaac03c5b12df786 Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Thu, 8 Jun 2023 10:33:04 +0800 Subject: [PATCH 03/15] Use parallel. --- .gitlab-ci.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 95d76608..a048eeb7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,12 +2,19 @@ stages: - lint_test - build_release lint: - image: python:3.11 + image: python:$PYTHON_VERSION interruptible: true only: - /^v(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)$/ - main - merge_requests + parallel: + matrix: + - PYTHON_VERSION: + - 3.8 + - 3.9 + - 3.1 + - 3.11 script: - env | sort - make dev-lint @@ -19,12 +26,19 @@ test: coverage_report: coverage_format: cobertura path: coverage.xml - image: python:3.11 + image: python:$PYTHON_VERSION interruptible: true only: - /^v(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)$/ - main - merge_requests + parallel: + matrix: + - PYTHON_VERSION: + - 3.8 + - 3.9 + - 3.1 + - 3.11 script: - env | sort - make dev-tests From dced9608e9bd2a46f3fd15916f0ac6a918142d2b Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Thu, 8 Jun 2023 10:41:40 +0800 Subject: [PATCH 04/15] Try fix. --- .gitlab-ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a048eeb7..08288ed0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,10 +11,10 @@ lint: parallel: matrix: - PYTHON_VERSION: - - 3.8 - - 3.9 - - 3.1 - - 3.11 + - 3.8 + - 3.9 + - 3.1 + - 3.11 script: - env | sort - make dev-lint @@ -35,10 +35,10 @@ test: parallel: matrix: - PYTHON_VERSION: - - 3.8 - - 3.9 - - 3.1 - - 3.11 + - 3.8 + - 3.9 + - 3.1 + - 3.11 script: - env | sort - make dev-tests From b6d4cce97cbe737a51b80017befadffd2a3b2dfd Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Thu, 8 Jun 2023 10:43:41 +0800 Subject: [PATCH 05/15] Try. --- .gitlab-ci.yml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 08288ed0..1813b3a4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,11 +10,13 @@ lint: - merge_requests parallel: matrix: - - PYTHON_VERSION: - - 3.8 - - 3.9 - - 3.1 - - 3.11 + - PLATFORM: + - linux + PYTHON_VERSION: + - 3.8 + - 3.9 + - 3.1 + - 3.11 script: - env | sort - make dev-lint @@ -34,11 +36,13 @@ test: - merge_requests parallel: matrix: - - PYTHON_VERSION: - - 3.8 - - 3.9 - - 3.1 - - 3.11 + - PLATFORM: + - linux + PYTHON_VERSION: + - 3.8 + - 3.9 + - 3.1 + - 3.11 script: - env | sort - make dev-tests From f1c60a759177762bca2c0084b3a65ee3fcf51b77 Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Thu, 8 Jun 2023 10:45:36 +0800 Subject: [PATCH 06/15] Fix. --- .gitlab-ci.yml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1813b3a4..a32d9071 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,9 +10,7 @@ lint: - merge_requests parallel: matrix: - - PLATFORM: - - linux - PYTHON_VERSION: + - PYTHON_VERSION: - 3.8 - 3.9 - 3.1 @@ -28,21 +26,12 @@ test: coverage_report: coverage_format: cobertura path: coverage.xml - image: python:$PYTHON_VERSION + image: python:3.11 interruptible: true only: - /^v(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)$/ - main - merge_requests - parallel: - matrix: - - PLATFORM: - - linux - PYTHON_VERSION: - - 3.8 - - 3.9 - - 3.1 - - 3.11 script: - env | sort - make dev-tests From 1349b3d401885759020f8b959e99abecb2d37e80 Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Thu, 8 Jun 2023 10:48:29 +0800 Subject: [PATCH 07/15] Try. --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a32d9071..716575c9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,10 +11,10 @@ lint: parallel: matrix: - PYTHON_VERSION: - - 3.8 - - 3.9 - - 3.1 - - 3.11 + - '3.8' + - '3.9' + - '3.10' + - '3.11' script: - env | sort - make dev-lint From dc6f9819853ecc770b4f653725c04370ad7378e6 Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Thu, 8 Jun 2023 10:53:59 +0800 Subject: [PATCH 08/15] Use parallel for test. --- .gitlab-ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 716575c9..308c6df6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,12 +26,19 @@ test: coverage_report: coverage_format: cobertura path: coverage.xml - image: python:3.11 + image: python:$PYTHON_VERSION interruptible: true only: - /^v(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)$/ - main - merge_requests + parallel: + matrix: + - PYTHON_VERSION: + - '3.8' + - '3.9' + - '3.10' + - '3.11' script: - env | sort - make dev-tests From 0fb09547707b4c0cae40d752b2f232083c8a821b Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Thu, 8 Jun 2023 11:09:36 +0800 Subject: [PATCH 09/15] Support minimal and maximal python version. --- .gitlab-ci.yml.jinja | 14 ++++++++++++++ .vscode/settings.json | 2 ++ copier.yaml | 19 +++++++++++++++++++ 3 files changed, 35 insertions(+) diff --git a/.gitlab-ci.yml.jinja b/.gitlab-ci.yml.jinja index 9de0422a..38ee539d 100644 --- a/.gitlab-ci.yml.jinja +++ b/.gitlab-ci.yml.jinja @@ -8,6 +8,13 @@ lint: - /^v(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)$/ - main - merge_requests + parallel: + matrix: + - PYTHON_VERSION: + - '3.8' + - '3.9' + - '3.10' + - '3.11' script: - env | sort - make dev-lint @@ -25,6 +32,13 @@ test: - /^v(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)$/ - main - merge_requests + parallel: + matrix: + - PYTHON_VERSION: + - '3.8' + - '3.9' + - '3.10' + - '3.11' script: - env | sort - make dev-tests diff --git a/.vscode/settings.json b/.vscode/settings.json index a56522a8..c1a6b166 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -74,6 +74,8 @@ "module_name", "ci_image", "test_coverage_threshold", + "minimal_python_version", + "maximal_python_version", "stages", "lint", "test", diff --git a/copier.yaml b/copier.yaml index 2e94210e..d34f28cc 100644 --- a/copier.yaml +++ b/copier.yaml @@ -49,3 +49,22 @@ test_coverage_threshold: default: 100 help: 'Threshold for test coverage:' type: int +minimal_python_version: + choices: + - '3.8' + - '3.9' + - '3.10' + - '3.11' + default: 3.8 + help: 'Minimal Python Version to support:' + type: str +maximal_python_version: + choices: + - '3.8' + - '3.9' + - '3.10' + - '3.11' + default: 3.11 + help: 'Maximal Python Version to support:' + type: str + validator: '{% if minimal_python_version | float > maximal_python_version | float %}{% endif %}' From 3e614da37db7658ef490ff85be668bf13aa2a79d Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Thu, 8 Jun 2023 11:13:56 +0800 Subject: [PATCH 10/15] Tmp. --- .gitlab-ci.yml | 4 ++-- Makefile.jinja | 4 ++-- copier.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 308c6df6..de58ec9e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ stages: - lint_test - build_release lint: - image: python:$PYTHON_VERSION + image: python:3.11 interruptible: true only: - /^v(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)$/ @@ -26,7 +26,7 @@ test: coverage_report: coverage_format: cobertura path: coverage.xml - image: python:$PYTHON_VERSION + image: python:3.11 interruptible: true only: - /^v(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)$/ diff --git a/Makefile.jinja b/Makefile.jinja index fb548267..8e42e8b7 100644 --- a/Makefile.jinja +++ b/Makefile.jinja @@ -74,7 +74,7 @@ upload: ${PIPRUN} python -m twine upload dist/* docs: - ${PIPRUN} python -m sphinx.cmd.build docs docs/_build + ${PIPRUN} python -m sphinx.cmd.build docs public docs-autobuild: - ${PIPRUN} python -m sphinx_autobuild docs docs/_build + ${PIPRUN} python -m sphinx_autobuild docs public diff --git a/copier.yaml b/copier.yaml index d34f28cc..2d3b7363 100644 --- a/copier.yaml +++ b/copier.yaml @@ -67,4 +67,4 @@ maximal_python_version: default: 3.11 help: 'Maximal Python Version to support:' type: str - validator: '{% if minimal_python_version | float > maximal_python_version | float %}{% endif %}' + validator: '{% if minimal_python_version | float > maximal_python_version | float %} Maximal Python Version must be newer than Minimal Python Version.{% endif %}' From 9c650a948c2c70228409a00d06260b8b13374caa Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Thu, 8 Jun 2023 11:17:02 +0800 Subject: [PATCH 11/15] tmp. --- .gitlab-ci.yml | 4 +-- .gitlab-ci.yml.jinja | 25 ++++++++++++++++--- .vscode/settings.json | 6 +++++ copier.yaml | 45 +++++++++++++++++++++++++--------- includes/version_compare.jinja | 7 ++++++ 5 files changed, 69 insertions(+), 18 deletions(-) create mode 100644 includes/version_compare.jinja diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index de58ec9e..308c6df6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ stages: - lint_test - build_release lint: - image: python:3.11 + image: python:$PYTHON_VERSION interruptible: true only: - /^v(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)$/ @@ -26,7 +26,7 @@ test: coverage_report: coverage_format: cobertura path: coverage.xml - image: python:3.11 + image: python:$PYTHON_VERSION interruptible: true only: - /^v(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)$/ diff --git a/.gitlab-ci.yml.jinja b/.gitlab-ci.yml.jinja index 38ee539d..ddcbf273 100644 --- a/.gitlab-ci.yml.jinja +++ b/.gitlab-ci.yml.jinja @@ -1,8 +1,9 @@ +{% from pathjoin("includes", "version_compare.jinja") import version_between -%} stages: - lint_test - build_release lint: - image: {{ ci_image }} + image: python:$PYTHON_VERSION interruptible: true only: - /^v(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)$/ @@ -11,10 +12,18 @@ lint: parallel: matrix: - PYTHON_VERSION: +{%- if version_between("3.8", minimal_python_version, maximal_python_version) | bool %} - '3.8' +{%- endif %} +{%- if version_between("3.9", minimal_python_version, maximal_python_version) | bool %} - '3.9' +{%- endif %} +{%- if version_between("3.10", minimal_python_version, maximal_python_version) | bool %} - '3.10' +{%- endif %} +{%- if version_between("3.11", minimal_python_version, maximal_python_version) | bool %} - '3.11' +{%- endif %} script: - env | sort - make dev-lint @@ -26,7 +35,7 @@ test: coverage_report: coverage_format: cobertura path: coverage.xml - image: {{ ci_image }} + image: python:$PYTHON_VERSION interruptible: true only: - /^v(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)$/ @@ -35,17 +44,25 @@ test: parallel: matrix: - PYTHON_VERSION: +{%- if version_between("3.8", minimal_python_version, maximal_python_version) | bool %} - '3.8' +{%- endif %} +{%- if version_between("3.9", minimal_python_version, maximal_python_version) | bool %} - '3.9' +{%- endif %} +{%- if version_between("3.10", minimal_python_version, maximal_python_version) | bool %} - '3.10' +{%- endif %} +{%- if version_between("3.11", minimal_python_version, maximal_python_version) | bool %} - '3.11' +{%- endif %} script: - env | sort - make dev-tests - make tests stage: lint_test package: - image: {{ ci_image }} + image: python:{{ default_python_version }} interruptible: true only: - /^v(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)$/ @@ -62,7 +79,7 @@ pages: except: refs: - schedules - image: {{ ci_image }} + image: python:{{ default_python_version }} interruptible: true only: changes: diff --git a/.vscode/settings.json b/.vscode/settings.json index c1a6b166..1bf8ecb4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -21,6 +21,7 @@ "huxuan", "isort", "mypy", + "pathjoin", "pipenv", "pydantic", "setuptools", @@ -76,6 +77,10 @@ "test_coverage_threshold", "minimal_python_version", "maximal_python_version", + "3.8", + "3.9", + "3.10", + "3.11", "stages", "lint", "test", @@ -86,6 +91,7 @@ "vscode-yaml-sort.sortOnSave": 2, "vscode-yaml-sort.useArrayProcessor": false, "vscode-yaml-sort.useBlockProcessor": false, + "vscode-yaml-sort.useCustomSortRecursively": true, "vscode-yaml-sort.useHelmProcessor": false, "vscode-yaml-sort.useLeadingDashes": false } diff --git a/copier.yaml b/copier.yaml index 2d3b7363..37808eb9 100644 --- a/copier.yaml +++ b/copier.yaml @@ -7,6 +7,7 @@ _exclude: - copier.yaml - copier.yml - docs/modules/serious_scaffold.settings.rst + - includes - src/serious_scaffold - ~* project_name: @@ -41,30 +42,50 @@ module_name: default: '{{ package_name|lower|replace("-", "_") }}' help: 'Module name:' type: str -ci_image: - default: python:3.11 - help: 'Container image to run CI:' - type: str test_coverage_threshold: default: 100 - help: 'Threshold for test coverage:' + help: 'Threshold for test coverage (0-100):' type: int + validator: '{% if (test_coverage_threshold < 0) or (test_coverage_threshold > 100) %} Invalid threshold. {% endif %}' minimal_python_version: choices: - '3.8' - '3.9' - '3.10' - '3.11' - default: 3.8 + default: '3.8' help: 'Minimal Python Version to support:' type: str maximal_python_version: choices: - - '3.8' - - '3.9' - - '3.10' - - '3.11' - default: 3.11 + '3.8': + validator: '{% from pathjoin("includes", "version_compare.jinja") import version_lt -%}{{ "Invalid" if version_lt("3.8", minimal_python_version) | bool }}' + value: '3.8' + '3.9': + validator: '{% from pathjoin("includes", "version_compare.jinja") import version_lt -%}{{ "Invalid" if version_lt("3.9", minimal_python_version) | bool }}' + value: '3.9' + '3.10': + validator: '{% from pathjoin("includes", "version_compare.jinja") import version_lt -%}{{ "Invalid" if version_lt("3.10", minimal_python_version) | bool }}' + value: '3.10' + '3.11': + value: '3.11' + default: '3.11' help: 'Maximal Python Version to support:' type: str - validator: '{% if minimal_python_version | float > maximal_python_version | float %} Maximal Python Version must be newer than Minimal Python Version.{% endif %}' +default_python_version: + choices: + '3.8': + validator: '{% from pathjoin("includes", "version_compare.jinja") import version_between %}{{ "Invalid" if not version_between("3.8", minimal_python_version, maximal_python_version) | bool }}' + value: '3.8' + '3.9': + validator: '{% from pathjoin("includes", "version_compare.jinja") import version_between %}{{ "Invalid" if not version_between("3.9", minimal_python_version, maximal_python_version) | bool }}' + value: '3.9' + '3.10': + validator: '{% from pathjoin("includes", "version_compare.jinja") import version_between %}{{ "Invalid" if not version_between("3.10", minimal_python_version, maximal_python_version) | bool }}' + value: '3.10' + '3.11': + validator: '{% from pathjoin("includes", "version_compare.jinja") import version_between %}{{ "Invalid" if not version_between("3.11", minimal_python_version, maximal_python_version) | bool }}' + value: '3.11' + default: '{{ maximal_python_version }}' + help: 'Default Python Version (e.g. for daily development, docs generation):' + type: str diff --git a/includes/version_compare.jinja b/includes/version_compare.jinja new file mode 100644 index 00000000..86f508a6 --- /dev/null +++ b/includes/version_compare.jinja @@ -0,0 +1,7 @@ +{% macro version_lt(version1, version2) -%} +{{ version1.split(".") | map("int") | list < version2.split(".") | map("int") | list }} +{%- endmacro %} + +{% macro version_between(version, version_min, version_max) -%} +{{ (version.split(".") | map("int") | list >= version_min.split(".") | map("int") | list) and (version.split(".") | map("int") | list <= version_max.split(".") | map("int") | list) }} +{%- endmacro %} From af53573e71c7d4b3a32c1658ba51944d78af3d1b Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Thu, 8 Jun 2023 17:53:10 +0800 Subject: [PATCH 12/15] Final? --- .github/workflows/ci.yml.jinja | 25 +++++++++++++++++++++++++ .gitlab-ci.yml | 9 +++------ .gitlab-ci.yml.jinja | 9 +++------ .vscode/settings.json | 4 +++- copier.yaml | 9 +-------- pyproject.toml.jinja | 9 +++++++++ 6 files changed, 44 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml.jinja b/.github/workflows/ci.yml.jinja index e1c14028..6b2f0d32 100644 --- a/.github/workflows/ci.yml.jinja +++ b/.github/workflows/ci.yml.jinja @@ -1,3 +1,4 @@ +{% from pathjoin("includes", "version_compare.jinja") import version_between -%} jobs: {%- if project_name == "Serious Scaffold Python" %} consistency: @@ -20,10 +21,18 @@ jobs: strategy: matrix: python-version: +{%- if version_between("3.8", minimal_python_version, maximal_python_version) | bool %} - '3.8' +{%- endif %} +{%- if version_between("3.9", minimal_python_version, maximal_python_version) | bool %} - '3.9' +{%- endif %} +{%- if version_between("3.10", minimal_python_version, maximal_python_version) | bool %} - '3.10' +{%- endif %} +{%- if version_between("3.11", minimal_python_version, maximal_python_version) | bool %} - '3.11' +{%- endif %} {%- endif %} lint: runs-on: ubuntu-latest @@ -39,10 +48,18 @@ jobs: strategy: matrix: python-version: +{%- if version_between("3.8", minimal_python_version, maximal_python_version) | bool %} - '3.8' +{%- endif %} +{%- if version_between("3.9", minimal_python_version, maximal_python_version) | bool %} - '3.9' +{%- endif %} +{%- if version_between("3.10", minimal_python_version, maximal_python_version) | bool %} - '3.10' +{%- endif %} +{%- if version_between("3.11", minimal_python_version, maximal_python_version) | bool %} - '3.11' +{%- endif %} tests: runs-on: ubuntu-latest steps: @@ -61,10 +78,18 @@ jobs: strategy: matrix: python-version: +{%- if version_between("3.8", minimal_python_version, maximal_python_version) | bool %} - '3.8' +{%- endif %} +{%- if version_between("3.9", minimal_python_version, maximal_python_version) | bool %} - '3.9' +{%- endif %} +{%- if version_between("3.10", minimal_python_version, maximal_python_version) | bool %} - '3.10' +{%- endif %} +{%- if version_between("3.11", minimal_python_version, maximal_python_version) | bool %} - '3.11' +{%- endif %} name: CI on: pull_request: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 308c6df6..367c3981 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,9 +1,11 @@ +default: + image: python:3.11 + interruptible: true stages: - lint_test - build_release lint: image: python:$PYTHON_VERSION - interruptible: true only: - /^v(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)$/ - main @@ -27,7 +29,6 @@ test: coverage_format: cobertura path: coverage.xml image: python:$PYTHON_VERSION - interruptible: true only: - /^v(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)$/ - main @@ -45,8 +46,6 @@ test: - make tests stage: lint_test package: - image: python:3.11 - interruptible: true only: - /^v(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)$/ script: @@ -62,8 +61,6 @@ pages: except: refs: - schedules - image: python:3.11 - interruptible: true only: changes: - docs/**/* diff --git a/.gitlab-ci.yml.jinja b/.gitlab-ci.yml.jinja index ddcbf273..36b976d8 100644 --- a/.gitlab-ci.yml.jinja +++ b/.gitlab-ci.yml.jinja @@ -1,10 +1,12 @@ {% from pathjoin("includes", "version_compare.jinja") import version_between -%} +default: + image: python:{{ default_python_version }} + interruptible: true stages: - lint_test - build_release lint: image: python:$PYTHON_VERSION - interruptible: true only: - /^v(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)$/ - main @@ -36,7 +38,6 @@ test: coverage_format: cobertura path: coverage.xml image: python:$PYTHON_VERSION - interruptible: true only: - /^v(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)$/ - main @@ -62,8 +63,6 @@ test: - make tests stage: lint_test package: - image: python:{{ default_python_version }} - interruptible: true only: - /^v(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)$/ script: @@ -79,8 +78,6 @@ pages: except: refs: - schedules - image: python:{{ default_python_version }} - interruptible: true only: changes: - docs/**/* diff --git a/.vscode/settings.json b/.vscode/settings.json index 1bf8ecb4..89c703fe 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -17,8 +17,10 @@ "cSpell.words": [ "autofix", "automodule", + "cobertura", "codecov", "huxuan", + "interruptible", "isort", "mypy", "pathjoin", @@ -73,7 +75,6 @@ "repo_name", "package_name", "module_name", - "ci_image", "test_coverage_threshold", "minimal_python_version", "maximal_python_version", @@ -81,6 +82,7 @@ "3.9", "3.10", "3.11", + "default", "stages", "lint", "test", diff --git a/copier.yaml b/copier.yaml index 37808eb9..635b155d 100644 --- a/copier.yaml +++ b/copier.yaml @@ -60,15 +60,12 @@ maximal_python_version: choices: '3.8': validator: '{% from pathjoin("includes", "version_compare.jinja") import version_lt -%}{{ "Invalid" if version_lt("3.8", minimal_python_version) | bool }}' - value: '3.8' '3.9': validator: '{% from pathjoin("includes", "version_compare.jinja") import version_lt -%}{{ "Invalid" if version_lt("3.9", minimal_python_version) | bool }}' - value: '3.9' '3.10': validator: '{% from pathjoin("includes", "version_compare.jinja") import version_lt -%}{{ "Invalid" if version_lt("3.10", minimal_python_version) | bool }}' - value: '3.10' '3.11': - value: '3.11' + validator: '{% from pathjoin("includes", "version_compare.jinja") import version_lt -%}{{ "Invalid" if version_lt("3.8", minimal_python_version) | bool }}' default: '3.11' help: 'Maximal Python Version to support:' type: str @@ -76,16 +73,12 @@ default_python_version: choices: '3.8': validator: '{% from pathjoin("includes", "version_compare.jinja") import version_between %}{{ "Invalid" if not version_between("3.8", minimal_python_version, maximal_python_version) | bool }}' - value: '3.8' '3.9': validator: '{% from pathjoin("includes", "version_compare.jinja") import version_between %}{{ "Invalid" if not version_between("3.9", minimal_python_version, maximal_python_version) | bool }}' - value: '3.9' '3.10': validator: '{% from pathjoin("includes", "version_compare.jinja") import version_between %}{{ "Invalid" if not version_between("3.10", minimal_python_version, maximal_python_version) | bool }}' - value: '3.10' '3.11': validator: '{% from pathjoin("includes", "version_compare.jinja") import version_between %}{{ "Invalid" if not version_between("3.11", minimal_python_version, maximal_python_version) | bool }}' - value: '3.11' default: '{{ maximal_python_version }}' help: 'Default Python Version (e.g. for daily development, docs generation):' type: str diff --git a/pyproject.toml.jinja b/pyproject.toml.jinja index 2340d595..e4d1ca98 100644 --- a/pyproject.toml.jinja +++ b/pyproject.toml.jinja @@ -1,3 +1,4 @@ +{% from pathjoin("includes", "version_compare.jinja") import version_between -%} [build-system] build-backend = "setuptools.build_meta" requires = [ @@ -13,10 +14,18 @@ classifiers = [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", +{%- if version_between("3.10", minimal_python_version, maximal_python_version) | bool %} "Programming Language :: Python :: 3.10", +{%- endif %} +{%- if version_between("3.11", minimal_python_version, maximal_python_version) | bool %} "Programming Language :: Python :: 3.11", +{%- endif %} +{%- if version_between("3.8", minimal_python_version, maximal_python_version) | bool %} "Programming Language :: Python :: 3.8", +{%- endif %} +{%- if version_between("3.9", minimal_python_version, maximal_python_version) | bool %} "Programming Language :: Python :: 3.9", +{%- endif %} ] description = "{{ project_description }}" dynamic = [ From 94fe1a700605528d75a502c42768a24cd23905f2 Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Thu, 8 Jun 2023 18:45:03 +0800 Subject: [PATCH 13/15] Fix. --- .vscode/settings.json | 1 + copier.yaml | 11 +++++++++-- includes/version_compare.jinja | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 89c703fe..eb39a5f2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -82,6 +82,7 @@ "3.9", "3.10", "3.11", + "choices", "default", "stages", "lint", diff --git a/copier.yaml b/copier.yaml index 635b155d..493d3542 100644 --- a/copier.yaml +++ b/copier.yaml @@ -46,7 +46,7 @@ test_coverage_threshold: default: 100 help: 'Threshold for test coverage (0-100):' type: int - validator: '{% if (test_coverage_threshold < 0) or (test_coverage_threshold > 100) %} Invalid threshold. {% endif %}' + validator: '{% if not 0 <= test_coverage_threshold <= 100 %}Invalid threshold{% endif %}' minimal_python_version: choices: - '3.8' @@ -60,12 +60,15 @@ maximal_python_version: choices: '3.8': validator: '{% from pathjoin("includes", "version_compare.jinja") import version_lt -%}{{ "Invalid" if version_lt("3.8", minimal_python_version) | bool }}' + value: '3.8' '3.9': validator: '{% from pathjoin("includes", "version_compare.jinja") import version_lt -%}{{ "Invalid" if version_lt("3.9", minimal_python_version) | bool }}' + value: '3.9' '3.10': validator: '{% from pathjoin("includes", "version_compare.jinja") import version_lt -%}{{ "Invalid" if version_lt("3.10", minimal_python_version) | bool }}' + value: '3.10' '3.11': - validator: '{% from pathjoin("includes", "version_compare.jinja") import version_lt -%}{{ "Invalid" if version_lt("3.8", minimal_python_version) | bool }}' + value: '3.11' default: '3.11' help: 'Maximal Python Version to support:' type: str @@ -73,12 +76,16 @@ default_python_version: choices: '3.8': validator: '{% from pathjoin("includes", "version_compare.jinja") import version_between %}{{ "Invalid" if not version_between("3.8", minimal_python_version, maximal_python_version) | bool }}' + value: '3.8' '3.9': validator: '{% from pathjoin("includes", "version_compare.jinja") import version_between %}{{ "Invalid" if not version_between("3.9", minimal_python_version, maximal_python_version) | bool }}' + value: '3.9' '3.10': validator: '{% from pathjoin("includes", "version_compare.jinja") import version_between %}{{ "Invalid" if not version_between("3.10", minimal_python_version, maximal_python_version) | bool }}' + value: '3.10' '3.11': validator: '{% from pathjoin("includes", "version_compare.jinja") import version_between %}{{ "Invalid" if not version_between("3.11", minimal_python_version, maximal_python_version) | bool }}' + value: '3.11' default: '{{ maximal_python_version }}' help: 'Default Python Version (e.g. for daily development, docs generation):' type: str diff --git a/includes/version_compare.jinja b/includes/version_compare.jinja index 86f508a6..97da4aab 100644 --- a/includes/version_compare.jinja +++ b/includes/version_compare.jinja @@ -3,5 +3,5 @@ {%- endmacro %} {% macro version_between(version, version_min, version_max) -%} -{{ (version.split(".") | map("int") | list >= version_min.split(".") | map("int") | list) and (version.split(".") | map("int") | list <= version_max.split(".") | map("int") | list) }} +{{ (version_min.split(".") | map("int") | list <= version.split(".") | map("int") | list <= version_max.split(".") | map("int") | list ) }} {%- endmacro %} From 932723ca9f9a61376d3f2e2e34b57288bf14e212 Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Thu, 8 Jun 2023 19:05:46 +0800 Subject: [PATCH 14/15] Minor. --- .github/workflows/ci.yml | 38 +++++++++++++++--------------- .github/workflows/ci.yml.jinja | 42 +++++++++++++++++----------------- .gitlab-ci.yml | 8 +++---- .pre-commit-config.yaml | 4 ++-- .vscode/settings.json | 8 +------ copier.yaml | 22 +++++++++--------- 6 files changed, 58 insertions(+), 64 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a733d2e9..ede7af87 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,5 @@ jobs: - consistency: + lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -8,14 +8,8 @@ jobs: with: cache: pip python-version: ${{ matrix.python-version }} - - run: pip install copier - - run: copier copy -r HEAD -f . . - - run: git diff - - run: git status --porcelain - - run: | - if [[ -n `git status --porcelain` ]]; then - exit 1 - fi + - run: make dev-lint + - run: make lint strategy: matrix: python-version: @@ -23,7 +17,7 @@ jobs: - '3.9' - '3.10' - '3.11' - lint: + tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -32,8 +26,12 @@ jobs: with: cache: pip python-version: ${{ matrix.python-version }} - - run: make dev-lint - - run: make lint + - run: make dev-tests + - run: make tests + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + flags: ${{ matrix.python-version }} strategy: matrix: python-version: @@ -41,7 +39,7 @@ jobs: - '3.9' - '3.10' - '3.11' - tests: + consistency: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -50,12 +48,14 @@ jobs: with: cache: pip python-version: ${{ matrix.python-version }} - - run: make dev-tests - - run: make tests - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - flags: ${{ matrix.python-version }} + - run: pip install copier + - run: copier copy -r HEAD -f . . + - run: git diff + - run: git status --porcelain + - run: | + if [[ -n `git status --porcelain` ]]; then + exit 1 + fi strategy: matrix: python-version: diff --git a/.github/workflows/ci.yml.jinja b/.github/workflows/ci.yml.jinja index 6b2f0d32..ba39ad22 100644 --- a/.github/workflows/ci.yml.jinja +++ b/.github/workflows/ci.yml.jinja @@ -1,7 +1,6 @@ {% from pathjoin("includes", "version_compare.jinja") import version_between -%} jobs: -{%- if project_name == "Serious Scaffold Python" %} - consistency: + lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -10,14 +9,8 @@ jobs: with: cache: pip python-version: {{ '${{ matrix.python-version }}' }} - - run: pip install copier - - run: copier copy -r HEAD -f . . - - run: git diff - - run: git status --porcelain - - run: | - if [[ -n `git status --porcelain` ]]; then - exit 1 - fi + - run: make dev-lint + - run: make lint strategy: matrix: python-version: @@ -33,8 +26,7 @@ jobs: {%- if version_between("3.11", minimal_python_version, maximal_python_version) | bool %} - '3.11' {%- endif %} -{%- endif %} - lint: + tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -43,8 +35,12 @@ jobs: with: cache: pip python-version: {{ '${{ matrix.python-version }}' }} - - run: make dev-lint - - run: make lint + - run: make dev-tests + - run: make tests + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + flags: {{ '${{ matrix.python-version }}' }} strategy: matrix: python-version: @@ -60,7 +56,8 @@ jobs: {%- if version_between("3.11", minimal_python_version, maximal_python_version) | bool %} - '3.11' {%- endif %} - tests: +{%- if project_name == "Serious Scaffold Python" %} + consistency: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -69,12 +66,14 @@ jobs: with: cache: pip python-version: {{ '${{ matrix.python-version }}' }} - - run: make dev-tests - - run: make tests - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - flags: {{ '${{ matrix.python-version }}' }} + - run: pip install copier + - run: copier copy -r HEAD -f . . + - run: git diff + - run: git status --porcelain + - run: | + if [[ -n `git status --porcelain` ]]; then + exit 1 + fi strategy: matrix: python-version: @@ -90,6 +89,7 @@ jobs: {%- if version_between("3.11", minimal_python_version, maximal_python_version) | bool %} - '3.11' {%- endif %} +{%- endif %} name: CI on: pull_request: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 367c3981..aa8f6132 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,3 @@ -default: - image: python:3.11 - interruptible: true stages: - lint_test - build_release @@ -22,7 +19,7 @@ lint: - make dev-lint - make lint stage: lint_test -test: +tests: artifacts: reports: coverage_report: @@ -71,3 +68,6 @@ pages: - make dev-docs - make docs stage: build_release +default: + image: python:3.11 + interruptible: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6942430e..5dc229f8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,9 +11,9 @@ repos: - id: forbid-new-submodules - id: mixed-line-ending - id: name-tests-test - - id: no-commit-to-branch - stages: + - stages: - push + id: no-commit-to-branch - args: - '--autofix' id: pretty-format-json diff --git a/.vscode/settings.json b/.vscode/settings.json index eb39a5f2..08224d45 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -78,15 +78,9 @@ "test_coverage_threshold", "minimal_python_version", "maximal_python_version", - "3.8", - "3.9", - "3.10", - "3.11", - "choices", - "default", "stages", "lint", - "test", + "tests", "package", "pages" ], diff --git a/copier.yaml b/copier.yaml index 493d3542..eefda03d 100644 --- a/copier.yaml +++ b/copier.yaml @@ -58,34 +58,34 @@ minimal_python_version: type: str maximal_python_version: choices: + '3.10': + validator: '{% from pathjoin("includes", "version_compare.jinja") import version_lt -%}{{ "Invalid" if version_lt("3.10", minimal_python_version) | bool }}' + value: '3.10' + '3.11': + value: '3.11' '3.8': validator: '{% from pathjoin("includes", "version_compare.jinja") import version_lt -%}{{ "Invalid" if version_lt("3.8", minimal_python_version) | bool }}' value: '3.8' '3.9': validator: '{% from pathjoin("includes", "version_compare.jinja") import version_lt -%}{{ "Invalid" if version_lt("3.9", minimal_python_version) | bool }}' value: '3.9' - '3.10': - validator: '{% from pathjoin("includes", "version_compare.jinja") import version_lt -%}{{ "Invalid" if version_lt("3.10", minimal_python_version) | bool }}' - value: '3.10' - '3.11': - value: '3.11' default: '3.11' help: 'Maximal Python Version to support:' type: str default_python_version: choices: - '3.8': - validator: '{% from pathjoin("includes", "version_compare.jinja") import version_between %}{{ "Invalid" if not version_between("3.8", minimal_python_version, maximal_python_version) | bool }}' - value: '3.8' - '3.9': - validator: '{% from pathjoin("includes", "version_compare.jinja") import version_between %}{{ "Invalid" if not version_between("3.9", minimal_python_version, maximal_python_version) | bool }}' - value: '3.9' '3.10': validator: '{% from pathjoin("includes", "version_compare.jinja") import version_between %}{{ "Invalid" if not version_between("3.10", minimal_python_version, maximal_python_version) | bool }}' value: '3.10' '3.11': validator: '{% from pathjoin("includes", "version_compare.jinja") import version_between %}{{ "Invalid" if not version_between("3.11", minimal_python_version, maximal_python_version) | bool }}' value: '3.11' + '3.8': + validator: '{% from pathjoin("includes", "version_compare.jinja") import version_between %}{{ "Invalid" if not version_between("3.8", minimal_python_version, maximal_python_version) | bool }}' + value: '3.8' + '3.9': + validator: '{% from pathjoin("includes", "version_compare.jinja") import version_between %}{{ "Invalid" if not version_between("3.9", minimal_python_version, maximal_python_version) | bool }}' + value: '3.9' default: '{{ maximal_python_version }}' help: 'Default Python Version (e.g. for daily development, docs generation):' type: str From b66ff92471c637ab6d3d27af2b28155e8128d909 Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Thu, 8 Jun 2023 19:09:07 +0800 Subject: [PATCH 15/15] Fix. --- .gitlab-ci.yml.jinja | 8 ++++---- .vscode/settings.json | 6 +++++- copier.yaml | 22 +++++++++++----------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml.jinja b/.gitlab-ci.yml.jinja index 36b976d8..e6328b30 100644 --- a/.gitlab-ci.yml.jinja +++ b/.gitlab-ci.yml.jinja @@ -1,7 +1,4 @@ {% from pathjoin("includes", "version_compare.jinja") import version_between -%} -default: - image: python:{{ default_python_version }} - interruptible: true stages: - lint_test - build_release @@ -31,7 +28,7 @@ lint: - make dev-lint - make lint stage: lint_test -test: +tests: artifacts: reports: coverage_report: @@ -88,3 +85,6 @@ pages: - make dev-docs - make docs stage: build_release +default: + image: python:{{ default_python_version }} + interruptible: true diff --git a/.vscode/settings.json b/.vscode/settings.json index 08224d45..d088ee86 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -82,7 +82,11 @@ "lint", "tests", "package", - "pages" + "pages", + "3.8", + "3.9", + "3.10", + "3.11" ], "vscode-yaml-sort.noCompatMode": true, "vscode-yaml-sort.sortOnSave": 2, diff --git a/copier.yaml b/copier.yaml index eefda03d..493d3542 100644 --- a/copier.yaml +++ b/copier.yaml @@ -58,34 +58,34 @@ minimal_python_version: type: str maximal_python_version: choices: - '3.10': - validator: '{% from pathjoin("includes", "version_compare.jinja") import version_lt -%}{{ "Invalid" if version_lt("3.10", minimal_python_version) | bool }}' - value: '3.10' - '3.11': - value: '3.11' '3.8': validator: '{% from pathjoin("includes", "version_compare.jinja") import version_lt -%}{{ "Invalid" if version_lt("3.8", minimal_python_version) | bool }}' value: '3.8' '3.9': validator: '{% from pathjoin("includes", "version_compare.jinja") import version_lt -%}{{ "Invalid" if version_lt("3.9", minimal_python_version) | bool }}' value: '3.9' + '3.10': + validator: '{% from pathjoin("includes", "version_compare.jinja") import version_lt -%}{{ "Invalid" if version_lt("3.10", minimal_python_version) | bool }}' + value: '3.10' + '3.11': + value: '3.11' default: '3.11' help: 'Maximal Python Version to support:' type: str default_python_version: choices: - '3.10': - validator: '{% from pathjoin("includes", "version_compare.jinja") import version_between %}{{ "Invalid" if not version_between("3.10", minimal_python_version, maximal_python_version) | bool }}' - value: '3.10' - '3.11': - validator: '{% from pathjoin("includes", "version_compare.jinja") import version_between %}{{ "Invalid" if not version_between("3.11", minimal_python_version, maximal_python_version) | bool }}' - value: '3.11' '3.8': validator: '{% from pathjoin("includes", "version_compare.jinja") import version_between %}{{ "Invalid" if not version_between("3.8", minimal_python_version, maximal_python_version) | bool }}' value: '3.8' '3.9': validator: '{% from pathjoin("includes", "version_compare.jinja") import version_between %}{{ "Invalid" if not version_between("3.9", minimal_python_version, maximal_python_version) | bool }}' value: '3.9' + '3.10': + validator: '{% from pathjoin("includes", "version_compare.jinja") import version_between %}{{ "Invalid" if not version_between("3.10", minimal_python_version, maximal_python_version) | bool }}' + value: '3.10' + '3.11': + validator: '{% from pathjoin("includes", "version_compare.jinja") import version_between %}{{ "Invalid" if not version_between("3.11", minimal_python_version, maximal_python_version) | bool }}' + value: '3.11' default: '{{ maximal_python_version }}' help: 'Default Python Version (e.g. for daily development, docs generation):' type: str