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
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
28 changes: 19 additions & 9 deletions copier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 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! 🎉
Expand Down
1 change: 0 additions & 1 deletion docs/index.md.jinja

This file was deleted.

File renamed without changes.
4 changes: 2 additions & 2 deletions template/pyproject.toml.jinja → pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"]
Expand Down
File renamed without changes.
Empty file added src/{{module_name}}/__init__.py
Empty file.
6 changes: 6 additions & 0 deletions src/{{module_name}}/example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"""DELETE ME!"""


def hello_world() -> None:
"""Example function."""
print("Hello World")
1 change: 0 additions & 1 deletion template/.codespellrc

This file was deleted.

1 change: 0 additions & 1 deletion template/.coveragerc

This file was deleted.

1 change: 0 additions & 1 deletion template/.devcontainer

This file was deleted.

1 change: 0 additions & 1 deletion template/.dockerignore

This file was deleted.

1 change: 0 additions & 1 deletion template/.editorconfig

This file was deleted.

1 change: 0 additions & 1 deletion template/.envrc.jinja

This file was deleted.

1 change: 0 additions & 1 deletion template/.github/dependabot.yaml

This file was deleted.

1 change: 0 additions & 1 deletion template/.github/workflows/codeql.yml

This file was deleted.

1 change: 0 additions & 1 deletion template/.github/workflows/run-tests.yml

This file was deleted.

1 change: 0 additions & 1 deletion template/.github/workflows/weekly.yml

This file was deleted.

53 changes: 0 additions & 53 deletions template/.github/workflows/wheels.yml

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion template/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion template/.python-version

This file was deleted.

1 change: 0 additions & 1 deletion template/.vscode

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion template/pyrightconfig.json

This file was deleted.

1 change: 0 additions & 1 deletion template/pytest.ini

This file was deleted.

1 change: 0 additions & 1 deletion template/src/{{module_name}}

This file was deleted.

1 change: 0 additions & 1 deletion template/test/test_{{module_name}}

This file was deleted.

1 change: 0 additions & 1 deletion template/{% if commitizen %}.cz.toml{% endif %}.jinja

This file was deleted.

1 change: 0 additions & 1 deletion template/{% if documentation %}docs{% endif %}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

9 changes: 4 additions & 5 deletions test/test_cookie/test_jinja.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -33,10 +33,9 @@ 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",
".pre-commit-config.yaml.jinja",
]
)
def template_file(request: pytest.FixtureRequest) -> str:
Expand All @@ -49,7 +48,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)
Expand Down
Empty file.
6 changes: 6 additions & 0 deletions test/test_{{module_name}}/test_example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"""DELETE ME!"""


def test_example():
"""Example test."""
assert True
Loading