diff --git a/.copier-answers.yml b/.copier-answers.yml index 2bcd6d0..5bf0a7b 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -11,11 +11,11 @@ copyright_license: ISC insiders: false project_description: Special Jinja2 extension for Copier that allows to load extensions using file paths relative to the template root instead of Python dotted paths. -project_name: Copier Templates Extensions +project_name: Copier Template-Extensions python_package_command_line_name: '' -python_package_distribution_name: copier-templates-extensions -python_package_import_name: copier_templates_extensions -repository_name: copier-templates-extensions +python_package_distribution_name: copier-template-extensions +python_package_import_name: copier_template_extensions +repository_name: copier-template-extensions repository_namespace: copier-org repository_provider: github.com diff --git a/.github/ISSUE_TEMPLATE/1-bug.md b/.github/ISSUE_TEMPLATE/1-bug.md index 2ab8a53..076d854 100644 --- a/.github/ISSUE_TEMPLATE/1-bug.md +++ b/.github/ISSUE_TEMPLATE/1-bug.md @@ -50,7 +50,7 @@ PASTE TRACEBACK HERE redacting sensitive information. --> ```bash -python -m copier_templates_extensions._internal.debug # | xclip -selection clipboard +python -m copier_template_extensions._internal.debug # | xclip -selection clipboard ``` PASTE MARKDOWN OUTPUT HERE diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index bd1f3bf..99f5f58 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ blank_issues_enabled: false contact_links: - name: I have a question / I need help - url: https://github.com/copier-org/copier-templates-extensions/discussions/new?category=q-a + url: https://github.com/copier-org/copier-template-extensions/discussions/new?category=q-a about: Ask and answer questions in the Discussions tab. diff --git a/CHANGELOG.md b/CHANGELOG.md index c21e7a3..9150623 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,63 +5,63 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [0.3.1](https://github.com/pawamoy/copier-templates-extensions/releases/tag/0.3.1) - 2025-03-10 +## [0.3.1](https://github.com/pawamoy/copier-template-extensions/releases/tag/0.3.1) - 2025-03-10 -[Compare with 0.3.0](https://github.com/pawamoy/copier-templates-extensions/compare/0.3.0...0.3.1) +[Compare with 0.3.0](https://github.com/pawamoy/copier-template-extensions/compare/0.3.0...0.3.1) ### Dependencies -- Depend on Copier 9.2+ ([43679a9](https://github.com/pawamoy/copier-templates-extensions/commit/43679a9719b2d05e041e674bde1f10dee21984a6) by Timothée Mazzucotelli). +- Depend on Copier 9.2+ ([43679a9](https://github.com/pawamoy/copier-template-extensions/commit/43679a9719b2d05e041e674bde1f10dee21984a6) by Timothée Mazzucotelli). ### Bug Fixes -- Add loaded module to `sys.modules` to help libraries using data from annotation scopes ([a290f27](https://github.com/pawamoy/copier-templates-extensions/commit/a290f271e302db88bcc755d57c647e4f3a8043ff) by Axel H.). [PR-12](https://github.com/copier-org/copier-templates-extensions/pull/12) +- Add loaded module to `sys.modules` to help libraries using data from annotation scopes ([a290f27](https://github.com/pawamoy/copier-template-extensions/commit/a290f271e302db88bcc755d57c647e4f3a8043ff) by Axel H.). [PR-12](https://github.com/copier-org/copier-template-extensions/pull/12) ### Code Refactoring -- Move modules into internal folder (and simplify API docs) ([a8c0377](https://github.com/pawamoy/copier-templates-extensions/commit/a8c03770298f51fa07667598fd7d0b72196aecad) by Timothée Mazzucotelli). -- Pass globals to parent constructor ([ea4567b](https://github.com/pawamoy/copier-templates-extensions/commit/ea4567bcfad0f17764e17d6b7fd12a7fd7a33cba) by Timothée Mazzucotelli). -- Deprecate the "update" aspect of context hooks ([876c055](https://github.com/pawamoy/copier-templates-extensions/commit/876c0554e34b630ab255111b69da74db16439dcb) by Timothée Mazzucotelli). [Issue-4](https://github.com/copier-org/copier-templates-extensions/issues/4) +- Move modules into internal folder (and simplify API docs) ([a8c0377](https://github.com/pawamoy/copier-template-extensions/commit/a8c03770298f51fa07667598fd7d0b72196aecad) by Timothée Mazzucotelli). +- Pass globals to parent constructor ([ea4567b](https://github.com/pawamoy/copier-template-extensions/commit/ea4567bcfad0f17764e17d6b7fd12a7fd7a33cba) by Timothée Mazzucotelli). +- Deprecate the "update" aspect of context hooks ([876c055](https://github.com/pawamoy/copier-template-extensions/commit/876c0554e34b630ab255111b69da74db16439dcb) by Timothée Mazzucotelli). [Issue-4](https://github.com/copier-org/copier-template-extensions/issues/4) -## [0.3.0](https://github.com/copier-org/copier-templates-extensions/releases/tag/0.3.0) - 2022-09-12 +## [0.3.0](https://github.com/copier-org/copier-template-extensions/releases/tag/0.3.0) - 2022-09-12 -[Compare with 0.2.0](https://github.com/copier-org/copier-templates-extensions/compare/0.2.0...0.3.0) +[Compare with 0.2.0](https://github.com/copier-org/copier-template-extensions/compare/0.2.0...0.3.0) ### Build -- Require Copier v6+ (Python >= 3.7) ([6380c90](https://github.com/copier-org/copier-templates-extensions/commit/6380c90a3e26c596790d9a083673dcf1dd613678) by Timothée Mazzucotelli). +- Require Copier v6+ (Python >= 3.7) ([6380c90](https://github.com/copier-org/copier-template-extensions/commit/6380c90a3e26c596790d9a083673dcf1dd613678) by Timothée Mazzucotelli). -## [0.2.0](https://github.com/copier-org/copier-templates-extensions/releases/tag/0.2.0) - 2021-12-27 +## [0.2.0](https://github.com/copier-org/copier-template-extensions/releases/tag/0.2.0) - 2021-12-27 -[Compare with 0.1.1](https://github.com/copier-org/copier-templates-extensions/compare/0.1.1...0.2.0) +[Compare with 0.1.1](https://github.com/copier-org/copier-template-extensions/compare/0.1.1...0.2.0) ### Build -- Match Python cap to Copier's ([a04f938](https://github.com/copier-org/copier-templates-extensions/commit/a04f93813f9795b64cbd9d21209dd5e5127b3eb4) by Timothée Mazzucotelli). +- Match Python cap to Copier's ([a04f938](https://github.com/copier-org/copier-template-extensions/commit/a04f93813f9795b64cbd9d21209dd5e5127b3eb4) by Timothée Mazzucotelli). ### Features -- Support Jinja2 version 3.x ([55211df](https://github.com/copier-org/copier-templates-extensions/commit/55211df29c4118c2603cc18ea4a1bc4247e41176) by Timothée Mazzucotelli). +- Support Jinja2 version 3.x ([55211df](https://github.com/copier-org/copier-template-extensions/commit/55211df29c4118c2603cc18ea4a1bc4247e41176) by Timothée Mazzucotelli). -## [0.1.1](https://github.com/copier-org/copier-templates-extensions/releases/tag/0.1.1) - 2021-03-29 +## [0.1.1](https://github.com/copier-org/copier-template-extensions/releases/tag/0.1.1) - 2021-03-29 -[Compare with 0.1.0](https://github.com/copier-org/copier-templates-extensions/compare/0.1.0...0.1.1) +[Compare with 0.1.0](https://github.com/copier-org/copier-template-extensions/compare/0.1.0...0.1.1) ### Bug Fixes -- Fix loader extension ([7d8b9e8](https://github.com/copier-org/copier-templates-extensions/commit/7d8b9e8cf2de66fafc9953ff5d4ba4e210470649) by Timothée Mazzucotelli). +- Fix loader extension ([7d8b9e8](https://github.com/copier-org/copier-template-extensions/commit/7d8b9e8cf2de66fafc9953ff5d4ba4e210470649) by Timothée Mazzucotelli). ### Code Refactoring -- Raise error from abstract hook ([52494f8](https://github.com/copier-org/copier-templates-extensions/commit/52494f8d02505027da0733a7beb9269fc2ba8c3e) by Timothée Mazzucotelli). -- Raise Copier errors from loader extension ([c136feb](https://github.com/copier-org/copier-templates-extensions/commit/c136febaa4ed719f5a0919e2fa073862258e7143) by Timothée Mazzucotelli). -- Rename context module, inherit from default context class ([855284a](https://github.com/copier-org/copier-templates-extensions/commit/855284ad2112feecd6b2a8dfc38dbbd397d29275) by Timothée Mazzucotelli). +- Raise error from abstract hook ([52494f8](https://github.com/copier-org/copier-template-extensions/commit/52494f8d02505027da0733a7beb9269fc2ba8c3e) by Timothée Mazzucotelli). +- Raise Copier errors from loader extension ([c136feb](https://github.com/copier-org/copier-template-extensions/commit/c136febaa4ed719f5a0919e2fa073862258e7143) by Timothée Mazzucotelli). +- Rename context module, inherit from default context class ([855284a](https://github.com/copier-org/copier-template-extensions/commit/855284ad2112feecd6b2a8dfc38dbbd397d29275) by Timothée Mazzucotelli). -## [0.1.0](https://github.com/copier-org/copier-templates-extensions/releases/tag/0.1.0) - 2021-03-29 +## [0.1.0](https://github.com/copier-org/copier-template-extensions/releases/tag/0.1.0) - 2021-03-29 -[Compare with first commit](https://github.com/copier-org/copier-templates-extensions/compare/e74578393a7cffe4e502640a6092e789d2cc6f29...0.1.0) +[Compare with first commit](https://github.com/copier-org/copier-template-extensions/compare/e74578393a7cffe4e502640a6092e789d2cc6f29...0.1.0) ### Code Refactoring -- Reorganize code ([474b617](https://github.com/copier-org/copier-templates-extensions/commit/474b6173f3970c7713643b7cbc16f11f32a70e5c) by Timothée Mazzucotelli). +- Reorganize code ([474b617](https://github.com/copier-org/copier-template-extensions/commit/474b6173f3970c7713643b7cbc16f11f32a70e5c) by Timothée Mazzucotelli). ### Features -- Add context hook extension ([ce95212](https://github.com/copier-org/copier-templates-extensions/commit/ce952126afb282cfa1fbf18366a6f857426eeaa1) by Timothée Mazzucotelli). -- Add initial contents ([e745783](https://github.com/copier-org/copier-templates-extensions/commit/e74578393a7cffe4e502640a6092e789d2cc6f29) by Timothée Mazzucotelli). +- Add context hook extension ([ce95212](https://github.com/copier-org/copier-template-extensions/commit/ce952126afb282cfa1fbf18366a6f857426eeaa1) by Timothée Mazzucotelli). +- Add initial contents ([e745783](https://github.com/copier-org/copier-template-extensions/commit/e74578393a7cffe4e502640a6092e789d2cc6f29) by Timothée Mazzucotelli). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f734c31..62c8816 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,7 +9,7 @@ Nothing easier! Fork and clone the repository, then: ```bash -cd copier-templates-extensions +cd copier-template-extensions make setup ``` diff --git a/README.md b/README.md index d6a8010..67dd9b9 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# Copier Templates Extensions +# Copier Template-Extensions -[](https://github.com/copier-org/copier-templates-extensions/actions?query=workflow%3Aci) -[](https://copier-org.github.io/copier-templates-extensions/) -[](https://pypi.org/project/copier-templates-extensions/) +[](https://github.com/copier-org/copier-template-extensions/actions?query=workflow%3Aci) +[](https://copier-org.github.io/copier-template-extensions/) +[](https://pypi.org/project/copier-template-extensions/) Special Jinja2 extension for Copier that allows to load extensions using file paths relative to the template root instead of Python dotted paths. @@ -11,20 +11,20 @@ Special Jinja2 extension for Copier that allows to load extensions using file pa With pip: ```bash -pip install copier-templates-extensions +pip install copier-template-extensions ``` With uv: ```bash -uv tool install copier --with copier-templates-extensions +uv tool install copier --with copier-template-extensions ``` With pipx: ```bash pipx install copier -pipx inject copier copier-templates-extensions +pipx inject copier copier-template-extensions ``` ## Usage @@ -37,7 +37,7 @@ and the class name after a colon: ```yaml _jinja_extensions: -- copier_templates_extensions.TemplateExtensionLoader +- copier_template_extensions.TemplateExtensionLoader - extensions/context.py:ContextUpdater - extensions/slugify.py:SlugifyExtension ``` @@ -103,7 +103,7 @@ create a class that inherits from `ContextHook`, and override its `hook` method: ```python -from copier_templates_extensions import ContextHook +from copier_template_extensions import ContextHook class ContextUpdater(ContextHook): @@ -175,7 +175,7 @@ As you can see, both forms are really ugly to write: **Using our context hook instead makes it so easy and clean!** ```python -from copier_templates_extensions import ContextHook +from copier_template_extensions import ContextHook class ContextUpdater(ContextHook): diff --git a/config/ruff.toml b/config/ruff.toml index eb0374c..93cff8a 100644 --- a/config/ruff.toml +++ b/config/ruff.toml @@ -78,7 +78,7 @@ docstring-quotes = "double" ban-relative-imports = "all" [lint.isort] -known-first-party = ["copier_templates_extensions"] +known-first-party = ["copier_template_extensions"] [lint.pydocstyle] convention = "google" diff --git a/config/vscode/launch.json b/config/vscode/launch.json index 6261818..cfef2cf 100644 --- a/config/vscode/launch.json +++ b/config/vscode/launch.json @@ -14,7 +14,7 @@ "name": "run", "type": "debugpy", "request": "launch", - "module": "copier_templates_extensions", + "module": "copier_template_extensions", "console": "integratedTerminal", "justMyCode": false, "args": "${command:pickArgs}" diff --git a/docs/.overrides/partials/comments.html b/docs/.overrides/partials/comments.html index ffd0edf..3ab52a5 100644 --- a/docs/.overrides/partials/comments.html +++ b/docs/.overrides/partials/comments.html @@ -3,7 +3,7 @@