From 96c97add9f915703f27717f0af1218216e1c207f Mon Sep 17 00:00:00 2001 From: jzazo Date: Fri, 14 Mar 2025 13:49:03 +0000 Subject: [PATCH 1/5] refactor: remove template folder and use root instead with exclude patterns --- ...ers.yml.jinja => .copier-answers.yml.jinja | 0 .../workflows/automerge.yml.jinja | 0 .../workflows/main.yml.jinja | 0 .../workflows/pr.yml.jinja | 0 ... %}.jinja => .pre-commit-config.yaml.jinja | 0 template/Dockerfile.jinja => Dockerfile.jinja | 0 template/LICENSE.jinja => LICENSE.jinja | 0 template/README.md.jinja => README.md.jinja | 0 template/SUPPORT.md.jinja => SUPPORT.md.jinja | 0 {template/bin => bin}/check-all.jinja | 0 copier.yml | 28 ++++++---- docs/index.md.jinja | 1 - ...s.yml{% endif %}.jinja => mkdocs.yml.jinja | 0 ...project.toml.jinja => pyproject.toml.jinja | 0 template/ruff.toml.jinja => ruff.toml.jinja | 0 src/{{module_name}}/__init__.py | 0 src/{{module_name}}/example.py | 6 +++ template/.codespellrc | 1 - template/.coveragerc | 1 - template/.devcontainer | 1 - template/.dockerignore | 1 - template/.editorconfig | 1 - template/.envrc.jinja | 1 - template/.github/dependabot.yaml | 1 - template/.github/workflows/codeql.yml | 1 - template/.github/workflows/run-tests.yml | 1 - template/.github/workflows/weekly.yml | 1 - template/.github/workflows/wheels.yml | 53 ------------------- .../{% if documentation %}docs.yml{% endif %} | 1 - ...% if precommit %}pre-commit.yml{% endif %} | 1 - template/.gitignore | 1 - template/.python-version | 1 - template/.vscode | 1 - ...ocumentation %}build-docs{% endif %}.jinja | 1 - ...ocumentation %}serve-docs{% endif %}.jinja | 1 - template/pyrightconfig.json | 1 - template/pytest.ini | 1 - template/src/{{module_name}} | 1 - template/test/test_{{module_name}} | 1 - ... if commitizen %}.cz.toml{% endif %}.jinja | 1 - .../{% if documentation %}docs{% endif %} | 1 - ...oft_internal %}.azure-pipelines{% endif %} | 1 - ...rnal %}CODE_OF_CONDUCT.md{% endif %}.jinja | 1 - ...ft_internal %}SECURITY.md{% endif %}.jinja | 1 - test/test_cookie/test_jinja.py | 8 ++- test/test_{{module_name}}/__init__.py | 0 test/test_{{module_name}}/test_example.py | 6 +++ ...rnal %}CODE_OF_CONDUCT.md{% endif %}.jinja | 0 ...ft_internal %}SECURITY.md{% endif %}.jinja | 0 49 files changed, 34 insertions(+), 94 deletions(-) rename template/.copier-answers.yml.jinja => .copier-answers.yml.jinja (100%) rename {template/.github => .github}/workflows/automerge.yml.jinja (100%) rename {template/.github => .github}/workflows/main.yml.jinja (100%) rename {template/.github => .github}/workflows/pr.yml.jinja (100%) rename template/{% if precommit %}.pre-commit-config.yaml{% endif %}.jinja => .pre-commit-config.yaml.jinja (100%) rename template/Dockerfile.jinja => Dockerfile.jinja (100%) rename template/LICENSE.jinja => LICENSE.jinja (100%) rename template/README.md.jinja => README.md.jinja (100%) rename template/SUPPORT.md.jinja => SUPPORT.md.jinja (100%) rename {template/bin => bin}/check-all.jinja (100%) delete mode 120000 docs/index.md.jinja rename template/{% if documentation %}mkdocs.yml{% endif %}.jinja => mkdocs.yml.jinja (100%) rename template/pyproject.toml.jinja => pyproject.toml.jinja (100%) rename template/ruff.toml.jinja => ruff.toml.jinja (100%) create mode 100644 src/{{module_name}}/__init__.py create mode 100644 src/{{module_name}}/example.py delete mode 120000 template/.codespellrc delete mode 120000 template/.coveragerc delete mode 120000 template/.devcontainer delete mode 120000 template/.dockerignore delete mode 120000 template/.editorconfig delete mode 120000 template/.envrc.jinja delete mode 120000 template/.github/dependabot.yaml delete mode 120000 template/.github/workflows/codeql.yml delete mode 120000 template/.github/workflows/run-tests.yml delete mode 120000 template/.github/workflows/weekly.yml delete mode 100644 template/.github/workflows/wheels.yml delete mode 120000 template/.github/workflows/{% if documentation %}docs.yml{% endif %} delete mode 120000 template/.github/workflows/{% if precommit %}pre-commit.yml{% endif %} delete mode 120000 template/.gitignore delete mode 100644 template/.python-version delete mode 120000 template/.vscode delete mode 120000 template/bin/{% if documentation %}build-docs{% endif %}.jinja delete mode 120000 template/bin/{% if documentation %}serve-docs{% endif %}.jinja delete mode 120000 template/pyrightconfig.json delete mode 120000 template/pytest.ini delete mode 120000 template/src/{{module_name}} delete mode 120000 template/test/test_{{module_name}} delete mode 120000 template/{% if commitizen %}.cz.toml{% endif %}.jinja delete mode 120000 template/{% if documentation %}docs{% endif %} delete mode 120000 template/{% if microsoft_internal %}.azure-pipelines{% endif %} delete mode 120000 template/{% if microsoft_internal %}CODE_OF_CONDUCT.md{% endif %}.jinja delete mode 120000 template/{% if microsoft_internal %}SECURITY.md{% endif %}.jinja create mode 100644 test/test_{{module_name}}/__init__.py create mode 100644 test/test_{{module_name}}/test_example.py rename template/{% if not microsoft_internal %}CODE_OF_CONDUCT.md{% endif %}.jinja => {% if not microsoft_internal %}CODE_OF_CONDUCT.md{% endif %}.jinja (100%) rename template/{% if not microsoft_internal %}SECURITY.md{% endif %}.jinja => {% if not microsoft_internal %}SECURITY.md{% endif %}.jinja (100%) diff --git a/template/.copier-answers.yml.jinja b/.copier-answers.yml.jinja similarity index 100% rename from template/.copier-answers.yml.jinja rename to .copier-answers.yml.jinja diff --git a/template/.github/workflows/automerge.yml.jinja b/.github/workflows/automerge.yml.jinja similarity index 100% rename from template/.github/workflows/automerge.yml.jinja rename to .github/workflows/automerge.yml.jinja diff --git a/template/.github/workflows/main.yml.jinja b/.github/workflows/main.yml.jinja similarity index 100% rename from template/.github/workflows/main.yml.jinja rename to .github/workflows/main.yml.jinja diff --git a/template/.github/workflows/pr.yml.jinja b/.github/workflows/pr.yml.jinja similarity index 100% rename from template/.github/workflows/pr.yml.jinja rename to .github/workflows/pr.yml.jinja diff --git a/template/{% if precommit %}.pre-commit-config.yaml{% endif %}.jinja b/.pre-commit-config.yaml.jinja similarity index 100% rename from template/{% if precommit %}.pre-commit-config.yaml{% endif %}.jinja rename to .pre-commit-config.yaml.jinja diff --git a/template/Dockerfile.jinja b/Dockerfile.jinja similarity index 100% rename from template/Dockerfile.jinja rename to Dockerfile.jinja diff --git a/template/LICENSE.jinja b/LICENSE.jinja similarity index 100% rename from template/LICENSE.jinja rename to LICENSE.jinja diff --git a/template/README.md.jinja b/README.md.jinja similarity index 100% rename from template/README.md.jinja rename to README.md.jinja diff --git a/template/SUPPORT.md.jinja b/SUPPORT.md.jinja similarity index 100% rename from template/SUPPORT.md.jinja rename to SUPPORT.md.jinja diff --git a/template/bin/check-all.jinja b/bin/check-all.jinja similarity index 100% rename from template/bin/check-all.jinja rename to bin/check-all.jinja diff --git a/copier.yml b/copier.yml index aefb21d..6c6e249 100644 --- a/copier.yml +++ b/copier.yml @@ -64,20 +64,30 @@ repo_exists: create your repository on GitHub later on. default: false -_subdirectory: template +_min_copier_version: 9.6.0 + +_preserve_symlinks: true _exclude: + - copier.yml - CHANGELOG.md - - cookie-doh.code-workspace + - src/cookie + - test/test_cookie + - dist - uv.lock - - copier.yaml - - copier.yml - .git - - .DS_Store - - .svn - - "~*" - - "*.py[co]" - - __pycache__ + - .tmp + - .venv + - "{% if documentation %}docs{% endif %}" + - "{% if documentation %}mkdocs.yml{% endif %}" + - "{% if documentation %}.github/workflows/docs.yml{% endif %}" + - "{% if documentation %}bin/build-docs{% endif %}.jinja" + - "{% if documentation %}bin/serve-docs{% endif %}" + - "{% if commitizen %}.cz.toml{% endif %}" + - "{% if precommit %}.github/workflows/pre-commit.yml{% endif %}" + - "{% if precommit %}.pre-commit-config.yaml{% endif %}" + - "{% if microsoft_internal %}.azure-pipelines{% endif %}" + - "{% if microsoft_internal %}SECURITY.md{% endif %}" _message_after_copy: | Your project "{{ project_name }}" has been created successfully! 🎉 diff --git a/docs/index.md.jinja b/docs/index.md.jinja deleted file mode 120000 index d712168..0000000 --- a/docs/index.md.jinja +++ /dev/null @@ -1 +0,0 @@ -../template/README.md.jinja \ No newline at end of file diff --git a/template/{% if documentation %}mkdocs.yml{% endif %}.jinja b/mkdocs.yml.jinja similarity index 100% rename from template/{% if documentation %}mkdocs.yml{% endif %}.jinja rename to mkdocs.yml.jinja diff --git a/template/pyproject.toml.jinja b/pyproject.toml.jinja similarity index 100% rename from template/pyproject.toml.jinja rename to pyproject.toml.jinja diff --git a/template/ruff.toml.jinja b/ruff.toml.jinja similarity index 100% rename from template/ruff.toml.jinja rename to ruff.toml.jinja diff --git a/src/{{module_name}}/__init__.py b/src/{{module_name}}/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/{{module_name}}/example.py b/src/{{module_name}}/example.py new file mode 100644 index 0000000..5a1f31d --- /dev/null +++ b/src/{{module_name}}/example.py @@ -0,0 +1,6 @@ +"""DELETE ME!""" + + +def hello_world() -> None: + """Example function.""" + print("Hello World") diff --git a/template/.codespellrc b/template/.codespellrc deleted file mode 120000 index e6ae24f..0000000 --- a/template/.codespellrc +++ /dev/null @@ -1 +0,0 @@ -../.codespellrc \ No newline at end of file diff --git a/template/.coveragerc b/template/.coveragerc deleted file mode 120000 index 5078514..0000000 --- a/template/.coveragerc +++ /dev/null @@ -1 +0,0 @@ -../.coveragerc \ No newline at end of file diff --git a/template/.devcontainer b/template/.devcontainer deleted file mode 120000 index 485dcb2..0000000 --- a/template/.devcontainer +++ /dev/null @@ -1 +0,0 @@ -../.devcontainer \ No newline at end of file diff --git a/template/.dockerignore b/template/.dockerignore deleted file mode 120000 index 245b14e..0000000 --- a/template/.dockerignore +++ /dev/null @@ -1 +0,0 @@ -../.dockerignore \ No newline at end of file diff --git a/template/.editorconfig b/template/.editorconfig deleted file mode 120000 index 38d9a0c..0000000 --- a/template/.editorconfig +++ /dev/null @@ -1 +0,0 @@ -../.editorconfig \ No newline at end of file diff --git a/template/.envrc.jinja b/template/.envrc.jinja deleted file mode 120000 index 8d83695..0000000 --- a/template/.envrc.jinja +++ /dev/null @@ -1 +0,0 @@ -../.envrc \ No newline at end of file diff --git a/template/.github/dependabot.yaml b/template/.github/dependabot.yaml deleted file mode 120000 index 75ec997..0000000 --- a/template/.github/dependabot.yaml +++ /dev/null @@ -1 +0,0 @@ -../../.github/dependabot.yaml \ No newline at end of file diff --git a/template/.github/workflows/codeql.yml b/template/.github/workflows/codeql.yml deleted file mode 120000 index fad4917..0000000 --- a/template/.github/workflows/codeql.yml +++ /dev/null @@ -1 +0,0 @@ -../../../.github/workflows/codeql.yml \ No newline at end of file diff --git a/template/.github/workflows/run-tests.yml b/template/.github/workflows/run-tests.yml deleted file mode 120000 index 55466b3..0000000 --- a/template/.github/workflows/run-tests.yml +++ /dev/null @@ -1 +0,0 @@ -../../../.github/workflows/run-tests.yml \ No newline at end of file diff --git a/template/.github/workflows/weekly.yml b/template/.github/workflows/weekly.yml deleted file mode 120000 index 0435e3b..0000000 --- a/template/.github/workflows/weekly.yml +++ /dev/null @@ -1 +0,0 @@ -../../../.github/workflows/weekly.yml \ No newline at end of file diff --git a/template/.github/workflows/wheels.yml b/template/.github/workflows/wheels.yml deleted file mode 100644 index 6be5305..0000000 --- a/template/.github/workflows/wheels.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: wheels - -on: - workflow_call: - -jobs: - build-wheels: - runs-on: ubuntu-latest - name: build-wheels - steps: - - uses: actions/checkout@v4 - - - name: Install uv - uses: astral-sh/setup-uv@v5 - with: - version: "0.6.0" - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - - name: build-wheel - run: uv build - - - name: upload-artifacts - uses: actions/upload-artifact@v4 - with: - name: wheels - path: "dist/*.whl" - - # publish-wheels: - # needs: [build-wheels] - # runs-on: ubuntu-latest - # name: publish-wheels - # if: github.ref_name == 'main' - # environment: - # name: pypi - # url: https://pypi.org/p/cookie-doh - # permissions: - # id-token: write - # steps: - # - name: download-wheels - # uses: actions/download-artifact@v4 - # with: - # name: wheels - # path: dist/ - - # - name: publish-wheels - # uses: pypa/gh-action-pypi-publish@release/v1 - # with: - # user: __token__ - # password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/template/.github/workflows/{% if documentation %}docs.yml{% endif %} b/template/.github/workflows/{% if documentation %}docs.yml{% endif %} deleted file mode 120000 index b6581dd..0000000 --- a/template/.github/workflows/{% if documentation %}docs.yml{% endif %} +++ /dev/null @@ -1 +0,0 @@ -../../../.github/workflows/docs.yml \ No newline at end of file diff --git a/template/.github/workflows/{% if precommit %}pre-commit.yml{% endif %} b/template/.github/workflows/{% if precommit %}pre-commit.yml{% endif %} deleted file mode 120000 index 94e2297..0000000 --- a/template/.github/workflows/{% if precommit %}pre-commit.yml{% endif %} +++ /dev/null @@ -1 +0,0 @@ -../../../.github/workflows/pre-commit.yml \ No newline at end of file diff --git a/template/.gitignore b/template/.gitignore deleted file mode 120000 index 5a19b83..0000000 --- a/template/.gitignore +++ /dev/null @@ -1 +0,0 @@ -../.gitignore \ No newline at end of file diff --git a/template/.python-version b/template/.python-version deleted file mode 100644 index e4fba21..0000000 --- a/template/.python-version +++ /dev/null @@ -1 +0,0 @@ -3.12 diff --git a/template/.vscode b/template/.vscode deleted file mode 120000 index 1814466..0000000 --- a/template/.vscode +++ /dev/null @@ -1 +0,0 @@ -../.vscode \ No newline at end of file diff --git a/template/bin/{% if documentation %}build-docs{% endif %}.jinja b/template/bin/{% if documentation %}build-docs{% endif %}.jinja deleted file mode 120000 index d0b5a8e..0000000 --- a/template/bin/{% if documentation %}build-docs{% endif %}.jinja +++ /dev/null @@ -1 +0,0 @@ -../../bin/build-docs \ No newline at end of file diff --git a/template/bin/{% if documentation %}serve-docs{% endif %}.jinja b/template/bin/{% if documentation %}serve-docs{% endif %}.jinja deleted file mode 120000 index 284284b..0000000 --- a/template/bin/{% if documentation %}serve-docs{% endif %}.jinja +++ /dev/null @@ -1 +0,0 @@ -../../bin/serve-docs \ No newline at end of file diff --git a/template/pyrightconfig.json b/template/pyrightconfig.json deleted file mode 120000 index 9f031f9..0000000 --- a/template/pyrightconfig.json +++ /dev/null @@ -1 +0,0 @@ -../pyrightconfig.json \ No newline at end of file diff --git a/template/pytest.ini b/template/pytest.ini deleted file mode 120000 index aa8b70b..0000000 --- a/template/pytest.ini +++ /dev/null @@ -1 +0,0 @@ -../pytest.ini \ No newline at end of file diff --git a/template/src/{{module_name}} b/template/src/{{module_name}} deleted file mode 120000 index 70c82c2..0000000 --- a/template/src/{{module_name}} +++ /dev/null @@ -1 +0,0 @@ -../../src/cookie \ No newline at end of file diff --git a/template/test/test_{{module_name}} b/template/test/test_{{module_name}} deleted file mode 120000 index 8b8381b..0000000 --- a/template/test/test_{{module_name}} +++ /dev/null @@ -1 +0,0 @@ -../../test/test_cookie \ No newline at end of file diff --git a/template/{% if commitizen %}.cz.toml{% endif %}.jinja b/template/{% if commitizen %}.cz.toml{% endif %}.jinja deleted file mode 120000 index 24ff0f2..0000000 --- a/template/{% if commitizen %}.cz.toml{% endif %}.jinja +++ /dev/null @@ -1 +0,0 @@ -../.cz.toml \ No newline at end of file diff --git a/template/{% if documentation %}docs{% endif %} b/template/{% if documentation %}docs{% endif %} deleted file mode 120000 index a9594bf..0000000 --- a/template/{% if documentation %}docs{% endif %} +++ /dev/null @@ -1 +0,0 @@ -../docs \ No newline at end of file diff --git a/template/{% if microsoft_internal %}.azure-pipelines{% endif %} b/template/{% if microsoft_internal %}.azure-pipelines{% endif %} deleted file mode 120000 index f0a1bb2..0000000 --- a/template/{% if microsoft_internal %}.azure-pipelines{% endif %} +++ /dev/null @@ -1 +0,0 @@ -../.azure-pipelines \ No newline at end of file diff --git a/template/{% if microsoft_internal %}CODE_OF_CONDUCT.md{% endif %}.jinja b/template/{% if microsoft_internal %}CODE_OF_CONDUCT.md{% endif %}.jinja deleted file mode 120000 index 0400d57..0000000 --- a/template/{% if microsoft_internal %}CODE_OF_CONDUCT.md{% endif %}.jinja +++ /dev/null @@ -1 +0,0 @@ -../CODE_OF_CONDUCT.md \ No newline at end of file diff --git a/template/{% if microsoft_internal %}SECURITY.md{% endif %}.jinja b/template/{% if microsoft_internal %}SECURITY.md{% endif %}.jinja deleted file mode 120000 index 9d57138..0000000 --- a/template/{% if microsoft_internal %}SECURITY.md{% endif %}.jinja +++ /dev/null @@ -1 +0,0 @@ -../SECURITY.md \ No newline at end of file diff --git a/test/test_cookie/test_jinja.py b/test/test_cookie/test_jinja.py index 9e864e3..a7f42d0 100644 --- a/test/test_cookie/test_jinja.py +++ b/test/test_cookie/test_jinja.py @@ -4,7 +4,7 @@ import pytest from jinja2 import Environment, FileSystemLoader -TEMPLATE_PATH = Path("template/") +TEMPLATE_PATH = Path() ITEMS = { "organization": "microsoft", "project_name": "cookie-doh", @@ -33,10 +33,8 @@ def environment() -> Environment: "SUPPORT.md.jinja", "pyproject.toml.jinja", "ruff.toml.jinja", - ".envrc.jinja", - ".python-version", ".devcontainer/post-create.sh.jinja", - "{% if documentation %}docs{% endif %}/getting_started.md.jinja", + "docs/getting_started.md.jinja", ] ) def template_file(request: pytest.FixtureRequest) -> str: @@ -49,7 +47,7 @@ def test_template(environment: Environment, template_file: str): if template_file in [ "README.md.jinja", "pyproject.toml.jinja", - "{% if documentation %}docs{% endif %}/getting_started.md.jinja", + "docs/getting_started.md.jinja", ]: return rootfile = re.sub(r"{%.*?%}", "", template_file) diff --git a/test/test_{{module_name}}/__init__.py b/test/test_{{module_name}}/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_{{module_name}}/test_example.py b/test/test_{{module_name}}/test_example.py new file mode 100644 index 0000000..f3590b5 --- /dev/null +++ b/test/test_{{module_name}}/test_example.py @@ -0,0 +1,6 @@ +"""DELETE ME!""" + + +def test_example(): + """Example test.""" + assert True diff --git a/template/{% if not microsoft_internal %}CODE_OF_CONDUCT.md{% endif %}.jinja b/{% if not microsoft_internal %}CODE_OF_CONDUCT.md{% endif %}.jinja similarity index 100% rename from template/{% if not microsoft_internal %}CODE_OF_CONDUCT.md{% endif %}.jinja rename to {% if not microsoft_internal %}CODE_OF_CONDUCT.md{% endif %}.jinja diff --git a/template/{% if not microsoft_internal %}SECURITY.md{% endif %}.jinja b/{% if not microsoft_internal %}SECURITY.md{% endif %}.jinja similarity index 100% rename from template/{% if not microsoft_internal %}SECURITY.md{% endif %}.jinja rename to {% if not microsoft_internal %}SECURITY.md{% endif %}.jinja From 66a4c43b4494e40a2e31907665f29c01225af26e Mon Sep 17 00:00:00 2001 From: jzazo Date: Mon, 17 Mar 2025 09:22:29 +0000 Subject: [PATCH 2/5] fix: wrong copier variable name --- pyproject.toml.jinja | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml.jinja b/pyproject.toml.jinja index c29a3ae..b49d9ba 100644 --- a/pyproject.toml.jinja +++ b/pyproject.toml.jinja @@ -2,7 +2,7 @@ authors = [] license = { text = "MIT License" } requires-python = ">=3.12" -name = "{{project_name}}" +name = "{{ project_name }}" version = "0.0.0" description = "" readme = "README.md" @@ -26,7 +26,7 @@ docs = [ default-groups = ["dev", "docs"] [tool.hatch.build.targets.wheel] -packages = ["src/{{ module }}"] +packages = ["src/{{ module_name }}"] [build-system] requires = ["hatchling"] From 2b6109e770570148413a15eb9118b7a50797b9f6 Mon Sep 17 00:00:00 2001 From: jzazo Date: Mon, 17 Mar 2025 09:22:44 +0000 Subject: [PATCH 3/5] feat: change dependabot package ecosystem to uv --- .github/dependabot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 14e05e5..7c51ece 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -13,7 +13,7 @@ updates: prefix: ":arrow_up: dep-bump" include: scope - - package-ecosystem: pip + - package-ecosystem: uv directory: "/" # location of package manifests schedule: interval: weekly From a8df5bd6da7e2060a5f63abf7fd6d6d4ac772bf3 Mon Sep 17 00:00:00 2001 From: jzazo Date: Mon, 17 Mar 2025 09:38:16 +0000 Subject: [PATCH 4/5] fix: wrong exclude conditions in copier yaml --- copier.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/copier.yml b/copier.yml index 6c6e249..92fb08a 100644 --- a/copier.yml +++ b/copier.yml @@ -78,16 +78,16 @@ _exclude: - .git - .tmp - .venv - - "{% if documentation %}docs{% endif %}" - - "{% if documentation %}mkdocs.yml{% endif %}" - - "{% if documentation %}.github/workflows/docs.yml{% endif %}" - - "{% if documentation %}bin/build-docs{% endif %}.jinja" - - "{% if documentation %}bin/serve-docs{% endif %}" - - "{% if commitizen %}.cz.toml{% endif %}" - - "{% if precommit %}.github/workflows/pre-commit.yml{% endif %}" - - "{% if precommit %}.pre-commit-config.yaml{% endif %}" - - "{% if microsoft_internal %}.azure-pipelines{% endif %}" - - "{% if microsoft_internal %}SECURITY.md{% endif %}" + - "{% if not documentation %}docs{% endif %}" + - "{% if not documentation %}mkdocs.yml{% endif %}" + - "{% if not documentation %}.github/workflows/docs.yml{% endif %}" + - "{% if not documentation %}bin/build-docs{% endif %}.jinja" + - "{% if not documentation %}bin/serve-docs{% endif %}" + - "{% if not commitizen %}.cz.toml{% endif %}" + - "{% if not precommit %}.github/workflows/pre-commit.yml{% endif %}" + - "{% if not precommit %}.pre-commit-config.yaml{% endif %}" + - "{% if not microsoft_internal %}.azure-pipelines{% endif %}" + - "{% if not microsoft_internal %}SECURITY.md{% endif %}" _message_after_copy: | Your project "{{ project_name }}" has been created successfully! 🎉 From 079a3eecb18de4d1d492bb34556624b38704caec Mon Sep 17 00:00:00 2001 From: jzazo Date: Mon, 17 Mar 2025 09:38:30 +0000 Subject: [PATCH 5/5] feat: check pre-commit config in tests --- test/test_cookie/test_jinja.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_cookie/test_jinja.py b/test/test_cookie/test_jinja.py index a7f42d0..a310d13 100644 --- a/test/test_cookie/test_jinja.py +++ b/test/test_cookie/test_jinja.py @@ -35,6 +35,7 @@ def environment() -> Environment: "ruff.toml.jinja", ".devcontainer/post-create.sh.jinja", "docs/getting_started.md.jinja", + ".pre-commit-config.yaml.jinja", ] ) def template_file(request: pytest.FixtureRequest) -> str: