Skip to content

Master - #9

Closed
sztal wants to merge 4 commits into
leodevian:mainfrom
sztal:master
Closed

Master#9
sztal wants to merge 4 commits into
leodevian:mainfrom
sztal:master

Conversation

@sztal

@sztal sztal commented Aug 21, 2026

Copy link
Copy Markdown

No description provided.

Copilot AI lite review requested due to automatic review settings August 21, 2026 19:31
@sztal

sztal commented Aug 21, 2026

Copy link
Copy Markdown
Author

Good.

@sztal

sztal commented Aug 21, 2026

Copy link
Copy Markdown
Author

Sorry, I do not know what happened, I though I merging in my fork.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

It currently contains template-breaking issues (missing Path import in the Nox template, incorrect pytest config section key, and an unsafe derived package path for flat layout).

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR rebrands the template repository and reshapes the generated-project scaffolding around a simplified, Nox + Zensical + Hatchling/uv-dynamic-versioning workflow, while adding configurable package layouts and a more explicit testing stack.

Changes:

  • Rename/repoint project metadata and documentation links from modern-python to python-package-template.
  • Simplify template features (drop tox + MkDocs branches) and standardize on Nox + Zensical for automation/docs.
  • Introduce target_python + package layout derivations (flat/src/namespace) and update generated packaging/testing configuration accordingly.
File summaries
File Description
zensical.toml Updates site metadata/repository links for the template repo.
uv.lock Adds pytest/coverage tooling dependencies and renames the virtual project package entry.
template/tests/{% if dynamic_version %}test_version.py{% endif %}.jinja Switches version test to importlib.metadata.
template/STYLE.md Adds a concise style guide aligned with Ruff + NumPy docstrings.
template/src/{% if dynamic_version %}.gitignore{% endif %} Removes ignoring VERSION.txt artifacts for dynamic versioning.
template/src/{{ package_name }}/{% if cli == 'argparse' %}.{% endif %}/cli.py.jinja Removes old argparse CLI template in the legacy template/src/... location.
template/scripts/release.py.jinja Simplifies release script to always take an explicit version argument.
template/README.md.jinja Removes Black badge and keeps README aligned with Ruff/uv.
template/pyproject.toml.jinja Moves to Hatchling + uv-dynamic-versioning, updates Ruff/pytest/coverage config, and introduces target_python.
template/Makefile Adds standard dev targets (build/test/coverage/lint/format) for generated projects.
template/devnotes/example.md Adds a starter dev note template.
template/CODE_OF_CONDUCT.md.jinja Removes the older, longer CoC template variant.
template/AGENTS.md.jinja Adds generated agent guide content for the produced repo.
template/AGENTS.md Adds a placeholder “first-run checklist” agent guidance file.
template/{% if tasks == 'tox' %}tox.toml{% endif %}.jinja Removes tox automation template.
template/{% if tasks == 'nox' %}noxfile.py{% endif %}.jinja Updates Nox automation template (tests/lint/typecheck/docs).
template/{% if docs == 'mkdocs' %}mkdocs.yml{% endif %}.jinja Removes MkDocs configuration template.
template/{% if docs %}docs{% endif %}/{% if docs == 'zensical' %}.{% endif %}/index.md.jinja Updates Zensical docs index (badges/branding).
template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/reference/index.md.jinja Removes MkDocs reference index template.
template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/reference/api.md.jinja Removes MkDocs API reference template.
template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/reference/{% if cli and cli != 'click' %}cli.md{% endif %}.jinja Removes MkDocs CLI reference template (non-click).
template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/reference/{% if cli == 'click' %}cli.md{% endif %}.jinja Removes MkDocs CLI reference template (click).
template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/license.md Removes MkDocs license include page.
template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/index.md.jinja Removes MkDocs home page template.
template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/changelog.md Removes MkDocs changelog include page.
template/{% if code_of_conduct %}CODE_OF_CONDUCT.md{% endif %}.jinja Adds a new shorter, conditional CoC template for generated projects.
template/{{ package_root }}/{{ package_name }}/py.typed Adds marker file to indicate typed package output.
template/{{ package_root }}/{{ package_name }}/{% if cli == 'typer' %}.{% endif %}/cli.py.jinja Simplifies typer CLI docstrings/option declaration.
template/{{ package_root }}/{{ package_name }}/{% if cli == 'typer' %}.{% endif %}/main.py.jinja Adds module entrypoint for typer CLI.
template/{{ package_root }}/{{ package_name }}/{% if cli == 'cyclopts' %}.{% endif %}/cli.py.jinja Simplifies cyclopts CLI docstring.
template/{{ package_root }}/{{ package_name }}/{% if cli == 'cyclopts' %}.{% endif %}/main.py.jinja Adds module entrypoint for cyclopts CLI.
template/{{ package_root }}/{{ package_name }}/{% if cli == 'click' %}.{% endif %}/cli.py.jinja Removes explicit __version__ import and relies on Click version option.
template/{{ package_root }}/{{ package_name }}/{% if cli == 'click' %}.{% endif %}/main.py.jinja Adds module entrypoint for click CLI.
template/{{ package_root }}/{{ package_name }}/{% if cli == 'argparse' %}.{% endif %}/cli.py.jinja Adds argparse CLI template in the new package_root location.
template/{{ package_root }}/{{ package_name }}/{% if cli == 'argparse' %}.{% endif %}/main.py.jinja Adds module entrypoint for argparse CLI.
template/{{ package_root }}/{{ package_name }}/init.py.jinja Adds __version__ from importlib.metadata.
template/.pre-commit-config.yaml.jinja Removes tox formatting hook and Blacken-docs; narrows mdformat config.
template/.gitignore.jinja Drops .tox/ from generated gitignore.
template/.github/workflows/{% if tasks == 'tox' %}ci.yaml{% endif %}.jinja Removes tox-based CI workflow template.
template/.github/skills/test-coverage-audit/SKILL.md Adds generated agent “test coverage audit” skill stub.
template/.github/skills/test-audit/SKILL.md Adds generated agent “test audit” skill stub.
template/.github/skills/investigate/SKILL.md Adds generated agent “investigate” skill stub.
template/.github/skills/fix-bugs/SKILL.md Adds generated agent “fix bugs” skill stub.
template/.github/skills/docstring-audit/SKILL.md Adds generated agent “docstring audit” skill stub.
template/.github/skills/agent-context-update/SKILL.md Adds generated agent “agent context update” skill stub.
README.md Rewrites repository README to explain Copier/template mechanics and new defaults.
pyproject.toml Rebrands project metadata and adds pytest/coverage dependency group + ini options.
docs/index.md Rebrands docs landing page and updates template usage examples.
copier.yaml Adds target_python, package layout variables, and makes tasks/docs defaults more fixed.
CODE_OF_CONDUCT.md Updates contact email in CoC.
CHANGELOG.md Updates changelog links to new repository path.
.pre-commit-config.yaml Removes mdformat-mkdocs dependency.
.gitignore Drops .tox/ ignore entry.
Review details

Suppressed comments (2)

template/AGENTS.md.jinja:53

  • The “run dependency groups directly” snippet hard-codes mypy src tests, which is incorrect for the flat and namespace layouts. It should use the derived package path/root so the command works for all layouts.
```console
uv run --group lint pre-commit run --all-files
uv run --group type mypy src tests
uv run --group test pytest
**template/{{ package_root }}/{{ package_name }}/{% if cli == 'click' %}.{% endif %}/cli.py.jinja:10**
* `@click.version_option()` tries to auto-detect an installed distribution to read its version. In this template, `distribution_name` (hyphenated) can differ from `package_name` (underscored), so the default detection can fail and `--version` may raise `PackageNotFoundError`. Pass `package_name` explicitly.

- **Files reviewed:** 45/53 changed files
- **Comments generated:** 5
- **Review effort level:** Lite
</details>

---

💡 <a href="/leodevian/modern-python/new/main?filename=.github/skills/code-review/SKILL.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add a `code-review` agent skill</a> or configure MCP servers for context-aware, tailored reviews. <a href="https://docs.github.com/en/copilot/how-tos/use-copilot-agents/request-a-code-review/use-code-review#mcp-servers-and-agent-skills" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn more in the docs.</a>

Comment on lines 12 to 14
import os
from pathlib import Path

import nox
[tool.pyproject-fmt]
max_supported_python = "3.14"

[tool.pytest]
Comment thread copier.yaml
package_path:
type: str
help: The package path.
default: "{{ package_root }}/{{ package_name }}"
Comment thread README.md
Comment on lines +206 to +208
At minimum, check the default flat layout, a `src` layout, a namespace layout,
both documentation backends, and the optional Code of Conduct. For generated
projects, initialize Git, create a version tag, and run:
Comment thread template/AGENTS.md.jinja

- Distribution: `{{ distribution_name }}`
- Import package: `{{ package_name }}`
- Source directory: `src/{{ package_name }}/`
@sztal sztal closed this by deleting the head repository Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants