create-pyproj 2.1.1__tar.gz → 2.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {create_pyproj-2.1.1/src/create_pyproj.egg-info → create_pyproj-2.3.0}/PKG-INFO +28 -15
- create_pyproj-2.1.1/PKG-INFO → create_pyproj-2.3.0/README.md +24 -19
- create_pyproj-2.3.0/pyproject.toml +90 -0
- create_pyproj-2.1.1/pyproject.toml → create_pyproj-2.3.0/pyproject.toml.orig +16 -18
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/__init__.py +1 -1
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/main.py +6 -3
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/scaffold.py +4 -1
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/base/.pre-commit-config.yaml.tmpl +1 -1
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/base/AGENTS.md.tmpl +3 -2
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/base/README.md.tmpl +3 -3
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/base/docs/index.md.tmpl +1 -1
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/base/docs/references.md.tmpl +1 -1
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/base/mise.toml.tmpl +9 -9
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/base/pyproject.toml.tmpl +16 -25
- create_pyproj-2.3.0/src/create_pyproj/templates/base/renovate.json.tmpl +52 -0
- create_pyproj-2.3.0/src/create_pyproj/templates/base/test/test_package.py.tmpl +17 -0
- create_pyproj-2.3.0/src/create_pyproj/templates/base/zensical.toml.tmpl +15 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/ci/github/.github/workflows/ci.yml.tmpl +12 -11
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/ci/gitlab/.gitlab-ci.yml.tmpl +4 -1
- create_pyproj-2.3.0/src/create_pyproj/templates/interfaces/cli/test/test_cli.py.tmpl +26 -0
- create_pyproj-2.3.0/src/create_pyproj/templates/interfaces/web/test/test_web.py.tmpl +66 -0
- create_pyproj-2.3.0/src/create_pyproj/versions.py +67 -0
- create_pyproj-2.1.1/LICENSE +0 -21
- create_pyproj-2.1.1/MANIFEST.in +0 -7
- create_pyproj-2.1.1/readme.md +0 -101
- create_pyproj-2.1.1/setup.cfg +0 -4
- create_pyproj-2.1.1/src/create_pyproj/templates/base/mkdocs.yml.tmpl +0 -14
- create_pyproj-2.1.1/src/create_pyproj.egg-info/SOURCES.txt +0 -56
- create_pyproj-2.1.1/src/create_pyproj.egg-info/dependency_links.txt +0 -1
- create_pyproj-2.1.1/src/create_pyproj.egg-info/entry_points.txt +0 -2
- create_pyproj-2.1.1/src/create_pyproj.egg-info/requires.txt +0 -1
- create_pyproj-2.1.1/src/create_pyproj.egg-info/top_level.txt +0 -1
- create_pyproj-2.1.1/test/test_main.py +0 -387
- create_pyproj-2.1.1/test/test_packaging.py +0 -85
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templater.py +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/base/.env.example.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/base/.gitignore.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/base/.python-version.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/base/.vscode/extensions.json.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/base/.vscode/settings.json.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/base/docs/api.md.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/base/docs/approach.md.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/base/docs/data-models.md.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/base/docs/domain-map.yml.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/base/docs/domain-model.md.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/base/docs/implementation.md.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/base/docs/topology.md.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/base/docs/use-cases.md.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/base/src/${package_name}/__init__.py.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/base/src/${package_name}/application/__init__.py.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/base/src/${package_name}/domain/__init__.py.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/base/src/${package_name}/infrastructure/__init__.py.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/infra/terraform/terraform/README.md.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/infra/terraform/terraform/_config.tf.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/infra/terraform/terraform/main.tf.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/infra/terraform/terraform/outputs.tf.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/infra/terraform/terraform/variables.tf.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/interfaces/cli/src/${package_name}/cli.py.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/interfaces/cli/src/main.py.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/interfaces/web/src/${package_name}/ui/__init__.py.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/interfaces/web/src/${package_name}/ui/static/app.css +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/interfaces/web/src/${package_name}/ui/templates/_greeting.html.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/interfaces/web/src/${package_name}/ui/templates/base.html.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/interfaces/web/src/${package_name}/ui/templates/index.html.tmpl +0 -0
- {create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/interfaces/web/src/${package_name}/web.py.tmpl +0 -0
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: create-pyproj
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0
|
|
4
4
|
Summary: Scaffold uv-first Python projects with a DDD and hexagonal baseline.
|
|
5
|
-
Requires-Python: >=3.10
|
|
6
|
-
Description-Content-Type: text/markdown
|
|
7
|
-
License-File: LICENSE
|
|
8
5
|
Requires-Dist: mako>=1.3.5
|
|
9
|
-
|
|
6
|
+
Requires-Python: >=3.11
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
10
8
|
|
|
11
9
|
# create-pyproj
|
|
12
10
|
|
|
13
11
|
`create-pyproj` scaffolds canonical Python projects with a `uv`-first workflow,
|
|
14
12
|
semantic-release, DDD and hexagonal defaults, optional CLI and web stubs,
|
|
15
|
-
starter
|
|
13
|
+
starter Zensical documentation, and an `AGENTS.md` tuned for the canonical
|
|
16
14
|
engineering skills.
|
|
17
15
|
|
|
18
16
|
## What It Generates
|
|
@@ -20,13 +18,15 @@ engineering skills.
|
|
|
20
18
|
The default scaffold includes:
|
|
21
19
|
|
|
22
20
|
- `.python-version`
|
|
23
|
-
- `pyproject.toml` with `uv`-friendly dependency groups and Ruff configuration
|
|
24
|
-
- `mise.toml` with
|
|
21
|
+
- `pyproject.toml` built with `uv_build`, with `uv`-friendly dependency groups and Ruff configuration
|
|
22
|
+
- `mise.toml` with pinned tools and common tasks; it is the one source for the Python and uv versions, locally and in GitHub CI
|
|
25
23
|
- semantic-release configuration for version stamping in `pyproject.toml` and `src/<package>/__init__.py`
|
|
26
24
|
- `src/<package>` with `domain`, `application`, and `infrastructure` package structure
|
|
27
|
-
- `docs/` plus `
|
|
25
|
+
- `docs/` plus `zensical.toml`
|
|
28
26
|
- `AGENTS.md`
|
|
29
27
|
- `.vscode/`, `.pre-commit-config.yaml`, and `.env.example`
|
|
28
|
+
- `test/` with starter tests for each generated adapter
|
|
29
|
+
- `renovate.json` so Renovate keeps dependencies, tools and hooks current
|
|
30
30
|
|
|
31
31
|
Optional adapters:
|
|
32
32
|
|
|
@@ -59,7 +59,7 @@ uv tool install --force .
|
|
|
59
59
|
|
|
60
60
|
Common flags:
|
|
61
61
|
|
|
62
|
-
- `--python-version 3.
|
|
62
|
+
- `--python-version 3.15` (default: `PYTHON_DEFAULT` in `src/create_pyproj/versions.py`)
|
|
63
63
|
- `--description "Short project summary"`
|
|
64
64
|
- `--author "Your Name"`
|
|
65
65
|
- `--author-email "you@example.com"`
|
|
@@ -83,7 +83,7 @@ The generated project is intended to:
|
|
|
83
83
|
- provide structure without inventing sample business behavior
|
|
84
84
|
- include the same semantic-release approach used elsewhere in this workspace
|
|
85
85
|
- add Terraform only when requested for a deployable service
|
|
86
|
-
- document the architecture and domain through
|
|
86
|
+
- document the architecture and domain through Zensical
|
|
87
87
|
- include an `AGENTS.md` that points contributors at the canonical skills
|
|
88
88
|
|
|
89
89
|
## Development
|
|
@@ -95,16 +95,29 @@ mise run complexity
|
|
|
95
95
|
mise run typecheck
|
|
96
96
|
mise run format
|
|
97
97
|
mise run test
|
|
98
|
+
mise run test-e2e
|
|
98
99
|
uv run python -m create_pyproj.main --help
|
|
99
100
|
```
|
|
100
101
|
|
|
101
102
|
The local test suite verifies the emitted scaffold contract rather than just
|
|
102
|
-
individual template files.
|
|
103
|
+
individual template files. `mise run test-e2e` generates a project with every
|
|
104
|
+
option and runs its own gates; it needs the network.
|
|
105
|
+
|
|
106
|
+
## Keeping Versions Current
|
|
107
|
+
|
|
108
|
+
- `src/create_pyproj/versions.py` holds every version the scaffold emits.
|
|
109
|
+
Templates and the CLI read from it.
|
|
110
|
+
- Renovate (`renovate.json`) updates that file and this repo's own pins, one
|
|
111
|
+
PR per dependency. Minor and patch updates automerge when CI passes.
|
|
112
|
+
- `test/test_versions.py` fails when this repo's pins drift from the scaffold's.
|
|
113
|
+
- The `Freshness` workflow runs weekly: the scaffolder and a generated project
|
|
114
|
+
against the newest packages, on the default Python and the next one.
|
|
115
|
+
- The default Python minor moves by hand under the policy in `AGENTS.md`.
|
|
103
116
|
|
|
104
117
|
## Docs
|
|
105
118
|
|
|
106
|
-
This repo
|
|
107
|
-
|
|
119
|
+
This repo's own Zensical docs live under `docs/`, with navigation configured in
|
|
120
|
+
`zensical.toml`.
|
|
108
121
|
|
|
109
122
|
```bash
|
|
110
123
|
mise run docs
|
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: create-pyproj
|
|
3
|
-
Version: 2.1.1
|
|
4
|
-
Summary: Scaffold uv-first Python projects with a DDD and hexagonal baseline.
|
|
5
|
-
Requires-Python: >=3.10
|
|
6
|
-
Description-Content-Type: text/markdown
|
|
7
|
-
License-File: LICENSE
|
|
8
|
-
Requires-Dist: mako>=1.3.5
|
|
9
|
-
Dynamic: license-file
|
|
10
|
-
|
|
11
1
|
# create-pyproj
|
|
12
2
|
|
|
13
3
|
`create-pyproj` scaffolds canonical Python projects with a `uv`-first workflow,
|
|
14
4
|
semantic-release, DDD and hexagonal defaults, optional CLI and web stubs,
|
|
15
|
-
starter
|
|
5
|
+
starter Zensical documentation, and an `AGENTS.md` tuned for the canonical
|
|
16
6
|
engineering skills.
|
|
17
7
|
|
|
18
8
|
## What It Generates
|
|
@@ -20,13 +10,15 @@ engineering skills.
|
|
|
20
10
|
The default scaffold includes:
|
|
21
11
|
|
|
22
12
|
- `.python-version`
|
|
23
|
-
- `pyproject.toml` with `uv`-friendly dependency groups and Ruff configuration
|
|
24
|
-
- `mise.toml` with
|
|
13
|
+
- `pyproject.toml` built with `uv_build`, with `uv`-friendly dependency groups and Ruff configuration
|
|
14
|
+
- `mise.toml` with pinned tools and common tasks; it is the one source for the Python and uv versions, locally and in GitHub CI
|
|
25
15
|
- semantic-release configuration for version stamping in `pyproject.toml` and `src/<package>/__init__.py`
|
|
26
16
|
- `src/<package>` with `domain`, `application`, and `infrastructure` package structure
|
|
27
|
-
- `docs/` plus `
|
|
17
|
+
- `docs/` plus `zensical.toml`
|
|
28
18
|
- `AGENTS.md`
|
|
29
19
|
- `.vscode/`, `.pre-commit-config.yaml`, and `.env.example`
|
|
20
|
+
- `test/` with starter tests for each generated adapter
|
|
21
|
+
- `renovate.json` so Renovate keeps dependencies, tools and hooks current
|
|
30
22
|
|
|
31
23
|
Optional adapters:
|
|
32
24
|
|
|
@@ -59,7 +51,7 @@ uv tool install --force .
|
|
|
59
51
|
|
|
60
52
|
Common flags:
|
|
61
53
|
|
|
62
|
-
- `--python-version 3.
|
|
54
|
+
- `--python-version 3.15` (default: `PYTHON_DEFAULT` in `src/create_pyproj/versions.py`)
|
|
63
55
|
- `--description "Short project summary"`
|
|
64
56
|
- `--author "Your Name"`
|
|
65
57
|
- `--author-email "you@example.com"`
|
|
@@ -83,7 +75,7 @@ The generated project is intended to:
|
|
|
83
75
|
- provide structure without inventing sample business behavior
|
|
84
76
|
- include the same semantic-release approach used elsewhere in this workspace
|
|
85
77
|
- add Terraform only when requested for a deployable service
|
|
86
|
-
- document the architecture and domain through
|
|
78
|
+
- document the architecture and domain through Zensical
|
|
87
79
|
- include an `AGENTS.md` that points contributors at the canonical skills
|
|
88
80
|
|
|
89
81
|
## Development
|
|
@@ -95,16 +87,29 @@ mise run complexity
|
|
|
95
87
|
mise run typecheck
|
|
96
88
|
mise run format
|
|
97
89
|
mise run test
|
|
90
|
+
mise run test-e2e
|
|
98
91
|
uv run python -m create_pyproj.main --help
|
|
99
92
|
```
|
|
100
93
|
|
|
101
94
|
The local test suite verifies the emitted scaffold contract rather than just
|
|
102
|
-
individual template files.
|
|
95
|
+
individual template files. `mise run test-e2e` generates a project with every
|
|
96
|
+
option and runs its own gates; it needs the network.
|
|
97
|
+
|
|
98
|
+
## Keeping Versions Current
|
|
99
|
+
|
|
100
|
+
- `src/create_pyproj/versions.py` holds every version the scaffold emits.
|
|
101
|
+
Templates and the CLI read from it.
|
|
102
|
+
- Renovate (`renovate.json`) updates that file and this repo's own pins, one
|
|
103
|
+
PR per dependency. Minor and patch updates automerge when CI passes.
|
|
104
|
+
- `test/test_versions.py` fails when this repo's pins drift from the scaffold's.
|
|
105
|
+
- The `Freshness` workflow runs weekly: the scaffolder and a generated project
|
|
106
|
+
against the newest packages, on the default Python and the next one.
|
|
107
|
+
- The default Python minor moves by hand under the policy in `AGENTS.md`.
|
|
103
108
|
|
|
104
109
|
## Docs
|
|
105
110
|
|
|
106
|
-
This repo
|
|
107
|
-
|
|
111
|
+
This repo's own Zensical docs live under `docs/`, with navigation configured in
|
|
112
|
+
`zensical.toml`.
|
|
108
113
|
|
|
109
114
|
```bash
|
|
110
115
|
mise run docs
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["uv_build>=0.13.8,<0.14"]
|
|
3
|
+
build-backend = "uv_build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "create-pyproj"
|
|
7
|
+
version = "2.3.0"
|
|
8
|
+
description = "Scaffold uv-first Python projects with a DDD and hexagonal baseline."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
dependencies = ["mako>=1.3.5"]
|
|
12
|
+
|
|
13
|
+
[project.scripts]
|
|
14
|
+
create-pyproj = "create_pyproj.main:main"
|
|
15
|
+
|
|
16
|
+
[tool.ruff]
|
|
17
|
+
line-length = 88
|
|
18
|
+
target-version = "py311"
|
|
19
|
+
|
|
20
|
+
[tool.ruff.lint]
|
|
21
|
+
select = [
|
|
22
|
+
"E",
|
|
23
|
+
"F",
|
|
24
|
+
"W",
|
|
25
|
+
"I",
|
|
26
|
+
"S",
|
|
27
|
+
"C901",
|
|
28
|
+
]
|
|
29
|
+
ignore = [
|
|
30
|
+
"E203",
|
|
31
|
+
"E501",
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
[tool.ruff.lint.mccabe]
|
|
35
|
+
max-complexity = 10
|
|
36
|
+
|
|
37
|
+
[tool.ruff.lint.per-file-ignores]
|
|
38
|
+
"test/**" = ["S101"]
|
|
39
|
+
|
|
40
|
+
[tool.ruff.format]
|
|
41
|
+
docstring-code-format = true
|
|
42
|
+
|
|
43
|
+
[tool.semantic_release]
|
|
44
|
+
commit_message = "chore(release): {version} [skip ci]"
|
|
45
|
+
version_toml = ["pyproject.toml:project.version"]
|
|
46
|
+
version_variables = ["src/create_pyproj/__init__.py:__version__"]
|
|
47
|
+
build_command = "uv lock --upgrade-package create-pyproj && git add uv.lock"
|
|
48
|
+
|
|
49
|
+
[tool.semantic_release.remote]
|
|
50
|
+
type = "github"
|
|
51
|
+
|
|
52
|
+
[tool.semantic_release.branches.main]
|
|
53
|
+
match = "main"
|
|
54
|
+
|
|
55
|
+
[tool.semantic_release.branches.master]
|
|
56
|
+
match = "master"
|
|
57
|
+
|
|
58
|
+
[tool.semantic_release.branches.release]
|
|
59
|
+
match = "release"
|
|
60
|
+
|
|
61
|
+
[tool.pytest.ini_options]
|
|
62
|
+
addopts = "-vv -m 'not e2e'"
|
|
63
|
+
markers = ["e2e: generates a project and runs its gates; needs the network"]
|
|
64
|
+
pythonpath = [
|
|
65
|
+
"src",
|
|
66
|
+
"test",
|
|
67
|
+
]
|
|
68
|
+
testpaths = ["test"]
|
|
69
|
+
|
|
70
|
+
[tool.ty.src]
|
|
71
|
+
include = [
|
|
72
|
+
"src",
|
|
73
|
+
"test",
|
|
74
|
+
]
|
|
75
|
+
|
|
76
|
+
[dependency-groups]
|
|
77
|
+
dev = [
|
|
78
|
+
"fastapi>=0.163.1",
|
|
79
|
+
"httpx2>=2.16.2",
|
|
80
|
+
"jinja2>=3.1.4",
|
|
81
|
+
"python-multipart>=0.0.9",
|
|
82
|
+
"zensical>=0.1.4",
|
|
83
|
+
"pre-commit>=4.0.1",
|
|
84
|
+
"python-semantic-release",
|
|
85
|
+
"pytest",
|
|
86
|
+
"hypothesis>=6.170.15",
|
|
87
|
+
"ruff>=0.17.5",
|
|
88
|
+
"twine",
|
|
89
|
+
"ty>=0.0.104,<0.1",
|
|
90
|
+
]
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = ["
|
|
3
|
-
build-backend = "
|
|
2
|
+
requires = ["uv_build>=0.13.8,<0.14"]
|
|
3
|
+
build-backend = "uv_build"
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "create-pyproj"
|
|
7
|
-
version = "2.
|
|
7
|
+
version = "2.3.0"
|
|
8
8
|
description = "Scaffold uv-first Python projects with a DDD and hexagonal baseline."
|
|
9
|
-
readme = "
|
|
10
|
-
requires-python = ">=3.
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
11
|
dependencies = ["mako>=1.3.5"]
|
|
12
12
|
|
|
13
13
|
[project.scripts]
|
|
@@ -15,7 +15,7 @@ create-pyproj = "create_pyproj.main:main"
|
|
|
15
15
|
|
|
16
16
|
[tool.ruff]
|
|
17
17
|
line-length = 88
|
|
18
|
-
target-version = "
|
|
18
|
+
target-version = "py311"
|
|
19
19
|
|
|
20
20
|
[tool.ruff.lint]
|
|
21
21
|
select = ["E", "F", "W", "I", "S", "C901"]
|
|
@@ -36,6 +36,8 @@ commit_message = "chore(release): {version} [skip ci]"
|
|
|
36
36
|
remote.type = "github"
|
|
37
37
|
version_toml = ["pyproject.toml:project.version"]
|
|
38
38
|
version_variables = ["src/create_pyproj/__init__.py:__version__"]
|
|
39
|
+
# Re-lock after the version stamp so the release commit carries a matching uv.lock.
|
|
40
|
+
build_command = "uv lock --upgrade-package create-pyproj && git add uv.lock"
|
|
39
41
|
|
|
40
42
|
[tool.semantic_release.branches.main]
|
|
41
43
|
match = "main"
|
|
@@ -47,29 +49,25 @@ match = "master"
|
|
|
47
49
|
match = "release"
|
|
48
50
|
|
|
49
51
|
[tool.pytest.ini_options]
|
|
50
|
-
addopts = "-vv"
|
|
52
|
+
addopts = "-vv -m 'not e2e'"
|
|
53
|
+
markers = ["e2e: generates a project and runs its gates; needs the network"]
|
|
51
54
|
pythonpath = ["src", "test"]
|
|
52
55
|
testpaths = ["test"]
|
|
53
56
|
|
|
54
|
-
[tool.setuptools.packages.find]
|
|
55
|
-
where = ["src"]
|
|
56
|
-
|
|
57
57
|
[dependency-groups]
|
|
58
58
|
dev = [
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"httpx",
|
|
59
|
+
"fastapi>=0.163.1",
|
|
60
|
+
"httpx2>=2.16.2",
|
|
62
61
|
"jinja2>=3.1.4",
|
|
63
62
|
"python-multipart>=0.0.9",
|
|
64
|
-
"
|
|
65
|
-
"mkdocs-material",
|
|
63
|
+
"zensical>=0.1.4",
|
|
66
64
|
"pre-commit>=4.0.1",
|
|
67
65
|
"python-semantic-release",
|
|
68
66
|
"pytest",
|
|
69
|
-
"hypothesis>=6.
|
|
70
|
-
"ruff>=0.
|
|
67
|
+
"hypothesis>=6.170.15",
|
|
68
|
+
"ruff>=0.17.5",
|
|
71
69
|
"twine",
|
|
72
|
-
"ty>=0.0.
|
|
70
|
+
"ty>=0.0.104,<0.1",
|
|
73
71
|
]
|
|
74
72
|
|
|
75
73
|
[tool.ty.src]
|
|
@@ -5,7 +5,7 @@ from __future__ import annotations
|
|
|
5
5
|
import argparse
|
|
6
6
|
from pathlib import Path
|
|
7
7
|
|
|
8
|
-
from . import __version__
|
|
8
|
+
from . import __version__, versions
|
|
9
9
|
from .scaffold import ProjectOptions, create_project
|
|
10
10
|
|
|
11
11
|
|
|
@@ -30,8 +30,11 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
30
30
|
)
|
|
31
31
|
parser.add_argument(
|
|
32
32
|
"--python-version",
|
|
33
|
-
default=
|
|
34
|
-
help=
|
|
33
|
+
default=versions.PYTHON_DEFAULT,
|
|
34
|
+
help=(
|
|
35
|
+
"Version string to write to .python-version. "
|
|
36
|
+
f"Defaults to {versions.PYTHON_DEFAULT}."
|
|
37
|
+
),
|
|
35
38
|
)
|
|
36
39
|
parser.add_argument(
|
|
37
40
|
"--description",
|
|
@@ -6,6 +6,7 @@ from dataclasses import dataclass
|
|
|
6
6
|
from pathlib import Path
|
|
7
7
|
from subprocess import CalledProcessError, run # nosec B404
|
|
8
8
|
|
|
9
|
+
from . import versions
|
|
9
10
|
from .templater import quoted, render_template_tree
|
|
10
11
|
|
|
11
12
|
TEMPLATES_DIR = Path(__file__).parent / "templates"
|
|
@@ -16,7 +17,7 @@ class ProjectOptions:
|
|
|
16
17
|
"""Options that control scaffold generation."""
|
|
17
18
|
|
|
18
19
|
project_name: str
|
|
19
|
-
python_version: str =
|
|
20
|
+
python_version: str = versions.PYTHON_DEFAULT
|
|
20
21
|
description: str = "Canonical Python project scaffold."
|
|
21
22
|
author: str = ""
|
|
22
23
|
author_email: str = ""
|
|
@@ -141,7 +142,9 @@ def _build_context(options: ProjectOptions) -> dict[str, object]:
|
|
|
141
142
|
"python_major_minor": options.python_major_minor,
|
|
142
143
|
"python_version": options.python_version,
|
|
143
144
|
"quoted": quoted,
|
|
145
|
+
"req": versions.REQUIREMENTS,
|
|
144
146
|
"ruff_target_version": options.ruff_target_version,
|
|
147
|
+
"versions": versions,
|
|
145
148
|
}
|
|
146
149
|
|
|
147
150
|
|
|
@@ -10,7 +10,7 @@ Work on this repo with the canonical skill set. Pick by the outcome requested:
|
|
|
10
10
|
- `define-concept`: framing or validating a product, venture or project concept and its assumptions.
|
|
11
11
|
- `learn-from-users`: capturing and synthesising user evidence into records that feed product decisions.
|
|
12
12
|
- `create-engineering-artefact`: source-faithful PDF-to-Markdown conversion or Given/When/Then acceptance scenarios, only when explicitly requested.
|
|
13
|
-
- `deliver-repository`: README and
|
|
13
|
+
- `deliver-repository`: README and docs-site alignment, commit and MR/PR wording, release hygiene and secret handling.
|
|
14
14
|
- `style-editor`: prose-only edits to wording, register or voice of supplied text.
|
|
15
15
|
|
|
16
16
|
## Golden rule: notes to the machine
|
|
@@ -38,4 +38,5 @@ and similar material written for agents or contributors.
|
|
|
38
38
|
- UI handlers return a fragment when the request carries `HX-Request` and the full page otherwise. Keep that branch so forms work without JavaScript.
|
|
39
39
|
- Render user input through Jinja2 templates rather than assembling HTML in Python; autoescaping is what keeps submitted markup inert.
|
|
40
40
|
% endif
|
|
41
|
-
- Keep `docs/` and `
|
|
41
|
+
- Keep `docs/` and `zensical.toml` aligned with the implementation.
|
|
42
|
+
- Renovate (`renovate.json`) keeps dependencies, mise tools and hooks current. Pin new tools to an exact version, never `latest`. Move to a new Python minor by hand, once its x.y.1 release is out.
|
|
@@ -116,14 +116,14 @@ working offline and under a strict content-security policy.
|
|
|
116
116
|
|
|
117
117
|
- Keep new behavior behind the application layer and injected ports.
|
|
118
118
|
- Add infrastructure adapters without leaking framework details into the domain.
|
|
119
|
-
- Update `docs/` and `
|
|
119
|
+
- Update `docs/` and `zensical.toml` when the project structure or behavior changes.
|
|
120
120
|
- Use the guidance in `AGENTS.md` to keep implementation and documentation consistent.
|
|
121
121
|
|
|
122
122
|
## Documentation
|
|
123
123
|
|
|
124
|
-
This scaffold includes a starter
|
|
124
|
+
This scaffold includes a starter Zensical setup:
|
|
125
125
|
|
|
126
|
-
- `
|
|
126
|
+
- `zensical.toml` defines the site navigation.
|
|
127
127
|
- `docs/index.md` gives the project overview.
|
|
128
128
|
- `docs/topology.md` shows the architectural shape.
|
|
129
129
|
- `docs/domain-model.md` and `docs/domain-map.yml` document the DDD model.
|
{create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/base/docs/references.md.tmpl
RENAMED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
|
|
3
3
|
- `README.md` for setup and day-to-day development commands.
|
|
4
4
|
- `AGENTS.md` for the canonical skills and engineering workflow.
|
|
5
|
-
- `
|
|
5
|
+
- `zensical.toml` for documentation navigation and theme configuration.
|
|
6
6
|
- `pyproject.toml` for runtime and development dependencies.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
[tools]
|
|
2
2
|
python = "${python_version}"
|
|
3
|
-
uv = "
|
|
4
|
-
terraform = "
|
|
5
|
-
aws-cli = "
|
|
6
|
-
jq = "
|
|
7
|
-
shellcheck = "
|
|
8
|
-
shfmt = "
|
|
3
|
+
uv = "${versions.UV}"
|
|
4
|
+
terraform = "${versions.TERRAFORM}"
|
|
5
|
+
aws-cli = "${versions.AWS_CLI}"
|
|
6
|
+
jq = "${versions.JQ}"
|
|
7
|
+
shellcheck = "${versions.SHELLCHECK}"
|
|
8
|
+
shfmt = "${versions.SHFMT}"
|
|
9
9
|
|
|
10
10
|
# uv must never manage its own interpreters: mise owns python. Without these,
|
|
11
11
|
# `uv sync` silently re-downloads a uv-managed CPython and the split returns.
|
|
@@ -41,8 +41,8 @@ description = "Run Python tests"
|
|
|
41
41
|
run = "uv run pytest"
|
|
42
42
|
|
|
43
43
|
[tasks.docs]
|
|
44
|
-
description = "Run
|
|
45
|
-
run = "uv run
|
|
44
|
+
description = "Run Zensical locally"
|
|
45
|
+
run = "uv run zensical serve"
|
|
46
46
|
% if has_cli:
|
|
47
47
|
|
|
48
48
|
[tasks.run-cli]
|
|
@@ -59,5 +59,5 @@ run = "uv run uvicorn ${package_name}.web:app --reload"
|
|
|
59
59
|
# under a strict content-security policy. Pin the version deliberately.
|
|
60
60
|
[tasks.vendor-htmx]
|
|
61
61
|
description = "Download HTMX into the UI static directory"
|
|
62
|
-
run = "curl -fsSL https://unpkg.com/htmx.org
|
|
62
|
+
run = "curl -fsSL https://unpkg.com/htmx.org@${versions.HTMX}/dist/htmx.min.js -o src/${package_name}/ui/static/htmx.min.js"
|
|
63
63
|
% endif
|
{create_pyproj-2.1.1 → create_pyproj-2.3.0}/src/create_pyproj/templates/base/pyproject.toml.tmpl
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = ["
|
|
3
|
-
build-backend = "
|
|
2
|
+
requires = ["${req['uv_build']}"]
|
|
3
|
+
build-backend = "uv_build"
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "${project_name}"
|
|
@@ -8,7 +8,7 @@ version = "0.1.0"
|
|
|
8
8
|
description = ${description | quoted}
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=${python_major_minor}"
|
|
11
|
-
license =
|
|
11
|
+
license = "MIT"
|
|
12
12
|
% if author_has_value:
|
|
13
13
|
authors = [
|
|
14
14
|
% if author_email_has_value:
|
|
@@ -19,12 +19,12 @@ authors = [
|
|
|
19
19
|
]
|
|
20
20
|
% endif
|
|
21
21
|
dependencies = [
|
|
22
|
-
"pydantic
|
|
22
|
+
"${req['pydantic']}",
|
|
23
23
|
% if has_web:
|
|
24
|
-
"fastapi
|
|
25
|
-
"uvicorn
|
|
26
|
-
"jinja2
|
|
27
|
-
"python-multipart
|
|
24
|
+
"${req['fastapi']}",
|
|
25
|
+
"${req['uvicorn']}",
|
|
26
|
+
"${req['jinja2']}",
|
|
27
|
+
"${req['python-multipart']}",
|
|
28
28
|
% endif
|
|
29
29
|
]
|
|
30
30
|
|
|
@@ -75,25 +75,16 @@ addopts = "-vv"
|
|
|
75
75
|
pythonpath = ["src", "test"]
|
|
76
76
|
testpaths = ["test"]
|
|
77
77
|
|
|
78
|
-
[tool.setuptools.packages.find]
|
|
79
|
-
where = ["src"]
|
|
80
|
-
% if has_web:
|
|
81
|
-
|
|
82
|
-
[tool.setuptools.package-data]
|
|
83
|
-
"*" = ["ui/templates/*.html", "ui/static/*"]
|
|
84
|
-
% endif
|
|
85
|
-
|
|
86
78
|
[dependency-groups]
|
|
87
79
|
dev = [
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"ty>=0.0.75,<0.1",
|
|
80
|
+
"${req['zensical']}",
|
|
81
|
+
"${req['pre-commit']}",
|
|
82
|
+
"${req['python-semantic-release']}",
|
|
83
|
+
"${req['pytest']}",
|
|
84
|
+
"${req['hypothesis']}",
|
|
85
|
+
"${req['ruff']}",
|
|
86
|
+
"${req['ty']}",
|
|
96
87
|
% if has_web:
|
|
97
|
-
"
|
|
88
|
+
"${req['httpx2']}",
|
|
98
89
|
% endif
|
|
99
90
|
]
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
3
|
+
"extends": ["config:recommended", ":semanticCommitTypeAll(chore)"],
|
|
4
|
+
"schedule": ["before 6am on monday"],
|
|
5
|
+
"pre-commit": { "enabled": true },
|
|
6
|
+
"lockFileMaintenance": { "enabled": true },
|
|
7
|
+
% if has_web:
|
|
8
|
+
"customManagers": [
|
|
9
|
+
{
|
|
10
|
+
"customType": "regex",
|
|
11
|
+
"description": "Vendored HTMX in the vendor-htmx mise task",
|
|
12
|
+
"managerFilePatterns": ["/^mise\\.toml$/"],
|
|
13
|
+
"matchStrings": ["htmx\\.org@(?<currentValue>[0-9][^/]*)/"],
|
|
14
|
+
"depNameTemplate": "htmx.org",
|
|
15
|
+
"datasourceTemplate": "npm"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
% endif
|
|
19
|
+
"packageRules": [
|
|
20
|
+
{
|
|
21
|
+
"description": "Keep pyproject.toml floors in step with uv.lock",
|
|
22
|
+
"matchManagers": ["pep621"],
|
|
23
|
+
"rangeStrategy": "bump"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"description": "ty breaks between 0.0.x releases",
|
|
27
|
+
"matchDepNames": ["ty"],
|
|
28
|
+
"allowedVersions": "<0.1"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"description": "Move to a new Python minor by hand, once its x.y.1 is out",
|
|
32
|
+
"matchDepNames": ["python"],
|
|
33
|
+
"matchUpdateTypes": ["major", "minor"],
|
|
34
|
+
"enabled": false
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"description": "uv_build releases with uv; move both, and its upper bound, together",
|
|
38
|
+
"matchDepNames": ["uv", "uv_build", "uv-build"],
|
|
39
|
+
"groupName": "uv",
|
|
40
|
+
"rangeStrategy": "replace"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"description": "Ruff and its pre-commit hook move together",
|
|
44
|
+
"matchDepNames": ["ruff", "astral-sh/ruff-pre-commit"],
|
|
45
|
+
"groupName": "ruff"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"matchUpdateTypes": ["minor", "patch", "digest"],
|
|
49
|
+
"automerge": true
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Package metadata stays consistent across releases."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import tomllib
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
import ${package_name}
|
|
9
|
+
|
|
10
|
+
PYPROJECT = Path(__file__).resolve().parent.parent / "pyproject.toml"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def test_package_version_matches_project_version() -> None:
|
|
14
|
+
# semantic-release stamps both; a mismatch means a release went wrong.
|
|
15
|
+
project = tomllib.loads(PYPROJECT.read_text())["project"]
|
|
16
|
+
|
|
17
|
+
assert ${package_name}.__version__ == project["version"]
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
site_name = ${project_title | quoted}
|
|
3
|
+
site_description = ${description | quoted}
|
|
4
|
+
docs_dir = "docs"
|
|
5
|
+
nav = [
|
|
6
|
+
{ "Overview" = "index.md" },
|
|
7
|
+
{ "Approach" = "approach.md" },
|
|
8
|
+
{ "Topology" = "topology.md" },
|
|
9
|
+
{ "Domain Model" = "domain-model.md" },
|
|
10
|
+
{ "API" = "api.md" },
|
|
11
|
+
{ "Data Models" = "data-models.md" },
|
|
12
|
+
{ "Use Cases" = "use-cases.md" },
|
|
13
|
+
{ "Implementation" = "implementation.md" },
|
|
14
|
+
{ "References" = "references.md" },
|
|
15
|
+
]
|