create-forge 0.3.0__tar.gz → 0.3.1__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_forge-0.3.0 → create_forge-0.3.1}/CHANGELOG.md +11 -0
- create_forge-0.3.1/PKG-INFO +213 -0
- create_forge-0.3.1/README.md +180 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/docs/adr/README.md +5 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/docs/roadmap-v2/README.md +3 -1
- {create_forge-0.3.0 → create_forge-0.3.1}/docs/roadmap-v2/roadmap/14-data-science-validation-and-rollout/README.md +13 -4
- {create_forge-0.3.0 → create_forge-0.3.1}/pyproject.toml +25 -5
- {create_forge-0.3.0 → create_forge-0.3.1}/src/create_forge/cli.py +13 -2
- {create_forge-0.3.0 → create_forge-0.3.1}/src/create_forge/runner.py +32 -3
- create_forge-0.3.1/src/create_forge/sources.py +86 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/conftest.py +1 -1
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/installed_client.py +6 -5
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_e2e_installed_data_science.py +18 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_engine_contract.py +35 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_reference_client_boundary.py +1 -1
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_runner.py +7 -2
- create_forge-0.3.1/tests/test_sources.py +307 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_update.py +35 -0
- create_forge-0.3.1/tests/test_workflows.py +171 -0
- create_forge-0.3.0/PKG-INFO +0 -312
- create_forge-0.3.0/README.md +0 -280
- {create_forge-0.3.0 → create_forge-0.3.1}/.gitignore +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/LICENSE +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/docs/roadmap-v1/README.md +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/docs/roadmap-v1/roadmap/00-governance-and-principles/README.md +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/docs/roadmap-v1/roadmap/01-python-core/README.md +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/docs/roadmap-v1/roadmap/02-developer-experience/README.md +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/docs/roadmap-v1/roadmap/03-quality-and-ci/README.md +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/docs/roadmap-v1/roadmap/04-runtime-and-configuration/README.md +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/docs/roadmap-v1/roadmap/05-security-and-supply-chain/README.md +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/docs/roadmap-v1/roadmap/06-extension-and-composition-contract/README.md +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/docs/roadmap-v1/roadmap/07-forge-cli-integration/README.md +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/docs/roadmap-v1/roadmap/08-reference-archetype-validation/README.md +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/docs/roadmap-v1/roadmap/09-blueprint-compatibility/README.md +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/docs/roadmap-v2/roadmap/10-data-science-architecture-contract/README.md +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/docs/roadmap-v2/roadmap/11-reusable-data-science-capabilities/README.md +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/docs/roadmap-v2/roadmap/12-data-science-archetype/README.md +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/docs/roadmap-v2/roadmap/13-data-science-cli-integration/README.md +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/examples/README.md +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/src/create_forge/__init__.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/src/create_forge/compat.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/src/create_forge/config.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/src/create_forge/engine.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/src/create_forge/models.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/src/create_forge/pipeline.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/src/create_forge/prompts.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/src/create_forge/registry.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/src/create_forge/spec.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/src/create_forge/staging.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/src/create_forge/templates.toml +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/__init__.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_adr.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_archetype_parity.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_cli.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_component_selection.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_config.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_data_science_pipeline.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_downstream_reference.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_drift.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_e2e_engine_generation.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_e2e_generation.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_e2e_installed_rollout.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_engine_adapter.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_engine_cross_repository.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_labels.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_models.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_pipeline.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_policy_hook.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_prompts.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_registry.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_spec.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_staging.py +0 -0
- {create_forge-0.3.0 → create_forge-0.3.1}/tests/test_update_network.py +0 -0
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
3
|
Generated by git-cliff from Conventional Commits.
|
|
4
|
+
## [0.3.1] - 2026-09-08
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
- Prevent template source credentials from reaching CLI output (#144)
|
|
9
|
+
- Raise the Copier floor past the destination-escape advisories
|
|
10
|
+
|
|
11
|
+
### Documentation
|
|
12
|
+
|
|
13
|
+
- Publish 0.3.0 and close the Data Science roadmap (#130)
|
|
14
|
+
- Add shared Forge user guide and simplify README (#131)
|
|
4
15
|
## [0.3.0] - 2026-09-05
|
|
5
16
|
|
|
6
17
|
### Bug Fixes
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: create-forge
|
|
3
|
+
Version: 0.3.1
|
|
4
|
+
Summary: Scaffold modern Python projects from maintained templates.
|
|
5
|
+
Project-URL: Homepage, https://github.com/Sandsy09/create-forge
|
|
6
|
+
Project-URL: Repository, https://github.com/Sandsy09/create-forge
|
|
7
|
+
Project-URL: Issues, https://github.com/Sandsy09/create-forge/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/Sandsy09/create-forge/blob/main/CHANGELOG.md
|
|
9
|
+
Author: Alex
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: cookiecutter,copier,project,scaffold,template
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
21
|
+
Classifier: Typing :: Typed
|
|
22
|
+
Requires-Python: >=3.11
|
|
23
|
+
Requires-Dist: copier<10,>=9.15.2
|
|
24
|
+
Requires-Dist: pydantic>=2.10
|
|
25
|
+
Requires-Dist: pyyaml>=6.0
|
|
26
|
+
Requires-Dist: questionary>=2.0
|
|
27
|
+
Requires-Dist: rich>=13.9
|
|
28
|
+
Requires-Dist: typer>=0.16
|
|
29
|
+
Provides-Extra: engine
|
|
30
|
+
Requires-Dist: forge-template<0.5,>=0.4.1; extra == 'engine'
|
|
31
|
+
Requires-Dist: uv<0.13,>=0.12; extra == 'engine'
|
|
32
|
+
Description-Content-Type: text/markdown
|
|
33
|
+
|
|
34
|
+
# create-forge
|
|
35
|
+
|
|
36
|
+
[](https://github.com/Sandsy09/create-forge/actions/workflows/ci.yml)
|
|
37
|
+
[](https://pypi.org/project/create-forge/)
|
|
38
|
+
|
|
39
|
+
Create Python projects with packaging, quality checks, and a useful starting
|
|
40
|
+
structure already in place.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
uvx create-forge new
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Requires [uv](https://docs.astral.sh/uv/getting-started/installation/), Git,
|
|
47
|
+
and Python 3.11+ (uv can install Python for you). Configure your Git author
|
|
48
|
+
name and email before generating a default Library project: generation
|
|
49
|
+
creates local commits.
|
|
50
|
+
|
|
51
|
+
**[Read the Forge user guide](https://sandsy09.github.io/create-forge/)**
|
|
52
|
+
for walkthroughs, template choices, and troubleshooting.
|
|
53
|
+
|
|
54
|
+
## How the repositories fit together
|
|
55
|
+
|
|
56
|
+
| Repository | What it provides |
|
|
57
|
+
| --- | --- |
|
|
58
|
+
| **create-forge** | The CLI: prompts, project creation, updates, and diagnostics. |
|
|
59
|
+
| [forge-template](https://github.com/Sandsy09/forge-template) | The project templates and composition engine used to generate files. |
|
|
60
|
+
|
|
61
|
+
You normally use the CLI without cloning either repository. Generated
|
|
62
|
+
projects do not depend on either Forge package at runtime.
|
|
63
|
+
|
|
64
|
+
## Create your first project
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
uvx create-forge new "My Library"
|
|
68
|
+
cd my-library
|
|
69
|
+
uv run poe check
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The default workflow creates an installable Library with a `src/` layout,
|
|
73
|
+
uv, Ruff, pytest with coverage, mypy and/or pyright, pre-commit hooks, and
|
|
74
|
+
GitHub Actions CI. Choose your build backend, versioning, license, and
|
|
75
|
+
dependency-update tooling. MkDocs documentation is optional.
|
|
76
|
+
|
|
77
|
+
The template is rendered by [Copier](https://copier.readthedocs.io/), which
|
|
78
|
+
also supports bringing later template improvements into existing projects.
|
|
79
|
+
|
|
80
|
+
## Install and manage the tool
|
|
81
|
+
|
|
82
|
+
Use `uvx` for occasional runs, or install a persistent command:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
uv tool install create-forge
|
|
86
|
+
create-forge new
|
|
87
|
+
uv tool upgrade create-forge
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
If the command is not on your PATH, run `uv tool update-shell` and restart
|
|
91
|
+
your terminal.
|
|
92
|
+
|
|
93
|
+
### Choose a CLI version
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
uvx create-forge@latest new
|
|
97
|
+
uvx create-forge@0.3.0 new
|
|
98
|
+
uv tool install "create-forge==0.3.0"
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Plain `uvx create-forge` can reuse a cached or persistently installed
|
|
102
|
+
version; `@latest` explicitly requests the latest release. Tool upgrades
|
|
103
|
+
respect the constraints used at installation, so an exact pin stays pinned.
|
|
104
|
+
To return to the latest release, run `uv tool install create-forge@latest`.
|
|
105
|
+
See [installation and versions](https://sandsy09.github.io/create-forge/installation/).
|
|
106
|
+
|
|
107
|
+
## Everyday usage
|
|
108
|
+
|
|
109
|
+
| Command | Purpose |
|
|
110
|
+
| --- | --- |
|
|
111
|
+
| `uvx create-forge new` | Create a project interactively. |
|
|
112
|
+
| `uvx create-forge list` | List the bundled Copier templates. |
|
|
113
|
+
| `uvx create-forge update` | Update a Copier-generated project from its directory. |
|
|
114
|
+
| `uvx create-forge doctor` | Diagnose Python, Git, uv, and package compatibility. |
|
|
115
|
+
| `uvx create-forge config init` | Create an optional configuration file. |
|
|
116
|
+
| `uvx create-forge config show` | Show resolved configuration and its sources. |
|
|
117
|
+
|
|
118
|
+
For scripts and CI, provide a project name and skip questions with `--yes`:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
uvx create-forge new "My Library" --yes --data github_org=your-org --data build_backend=hatchling --data versioning=vcs
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Use `--path` to choose the destination and repeat `--data key=value` to
|
|
125
|
+
preset answers. Run `uvx create-forge new --help` for the default workflow's
|
|
126
|
+
options. Saved author details, GitHub organisation, and preferred template
|
|
127
|
+
are covered in the [CLI guide](https://sandsy09.github.io/create-forge/cli/).
|
|
128
|
+
|
|
129
|
+
### Choose a template version or source
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
uvx create-forge new "My Library" --template library --ref v0.4.1
|
|
133
|
+
uvx create-forge new "Custom Project" --template-url https://github.com/you/your-template
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
`--ref` selects a Git revision in the **template repository**. It does not
|
|
137
|
+
select the CLI version. Without it, Copier uses the latest suitable release
|
|
138
|
+
tag. The bundled registry currently offers Library; upgrade the CLI to
|
|
139
|
+
receive registry changes.
|
|
140
|
+
|
|
141
|
+
Templates can execute code through generation and update tasks. Use custom
|
|
142
|
+
sources only when you trust their content; `--yes` also skips the custom
|
|
143
|
+
template confirmation.
|
|
144
|
+
|
|
145
|
+
### Update a generated project
|
|
146
|
+
|
|
147
|
+
From a clean, committed Copier-generated project:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
uvx create-forge update --dry-run
|
|
151
|
+
uvx create-forge update
|
|
152
|
+
uv run poe check
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Keep `.copier-answers.yml` committed. Review the resulting diff and resolve
|
|
156
|
+
conflicts before committing. A dry run validates the update without applying
|
|
157
|
+
it; it does not produce a file-by-file diff. Use `update --ref v0.4.1` to
|
|
158
|
+
target a particular template version.
|
|
159
|
+
|
|
160
|
+
## Preview: more project types and capabilities
|
|
161
|
+
|
|
162
|
+
The `0.3.0` CLI also provides an opt-in engine preview using
|
|
163
|
+
`forge-template>=0.4.1,<0.5`. These options are currently hidden from help.
|
|
164
|
+
|
|
165
|
+
| Project type | Use it for |
|
|
166
|
+
| --- | --- |
|
|
167
|
+
| Library | A distributable Python package with a choice of packaging modes. |
|
|
168
|
+
| CLI Application | A Typer application with a console command and tests. |
|
|
169
|
+
| Data Science | A Python package with a starter notebook and Jupyter tooling. |
|
|
170
|
+
|
|
171
|
+
Add **Jupyter** for notebook development or **Scientific Python** for NumPy,
|
|
172
|
+
pandas, Matplotlib, and scikit-learn. Data Science requires Jupyter;
|
|
173
|
+
Scientific Python is optional. These capabilities can also accompany the
|
|
174
|
+
other preview archetypes.
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
uvx --from "create-forge[engine]==0.3.0" create-forge new "My Analysis" --engine-preview --archetype data-science --capability jupyter --yes --data license=mit
|
|
178
|
+
cd my-analysis
|
|
179
|
+
uv run --locked poe check
|
|
180
|
+
uv run poe notebook
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
For regular preview use, install with `uv tool install "create-forge[engine]"`.
|
|
184
|
+
The [project guide](https://sandsy09.github.io/create-forge/projects/) explains
|
|
185
|
+
each type's output and links to complete recipes.
|
|
186
|
+
|
|
187
|
+
**Preview projects do not support `create-forge update`.** Their shared
|
|
188
|
+
tooling differs from the default Copier template; the preview does not
|
|
189
|
+
generate its CI workflows or install Git hooks. `--template`,
|
|
190
|
+
`--template-url`, and `--ref` apply only to the Copier workflow.
|
|
191
|
+
|
|
192
|
+
## What's next
|
|
193
|
+
|
|
194
|
+
The Foundation and Data Science roadmaps are complete. Making the engine
|
|
195
|
+
the default generation workflow is a planned direction with no scheduled
|
|
196
|
+
release. Follow [open work](https://github.com/Sandsy09/create-forge/issues)
|
|
197
|
+
and [releases](https://github.com/Sandsy09/create-forge/releases) for updates,
|
|
198
|
+
or suggest a project type, capability, or guide you would find useful.
|
|
199
|
+
|
|
200
|
+
## Feedback and contributing
|
|
201
|
+
|
|
202
|
+
- [Report a CLI problem or suggest a feature](https://github.com/Sandsy09/create-forge/issues/new/choose).
|
|
203
|
+
- [Request or correct documentation](https://github.com/Sandsy09/create-forge/issues/new?template=documentation.yml).
|
|
204
|
+
- [Report generated-content or capability problems](https://github.com/Sandsy09/forge-template/issues/new/choose).
|
|
205
|
+
|
|
206
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development and PR checks, and
|
|
207
|
+
the [reference index](https://sandsy09.github.io/create-forge/reference/) for
|
|
208
|
+
engine APIs and architecture documents. Report vulnerabilities through
|
|
209
|
+
[SECURITY.md](SECURITY.md).
|
|
210
|
+
|
|
211
|
+
## License
|
|
212
|
+
|
|
213
|
+
MIT — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# create-forge
|
|
2
|
+
|
|
3
|
+
[](https://github.com/Sandsy09/create-forge/actions/workflows/ci.yml)
|
|
4
|
+
[](https://pypi.org/project/create-forge/)
|
|
5
|
+
|
|
6
|
+
Create Python projects with packaging, quality checks, and a useful starting
|
|
7
|
+
structure already in place.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
uvx create-forge new
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Requires [uv](https://docs.astral.sh/uv/getting-started/installation/), Git,
|
|
14
|
+
and Python 3.11+ (uv can install Python for you). Configure your Git author
|
|
15
|
+
name and email before generating a default Library project: generation
|
|
16
|
+
creates local commits.
|
|
17
|
+
|
|
18
|
+
**[Read the Forge user guide](https://sandsy09.github.io/create-forge/)**
|
|
19
|
+
for walkthroughs, template choices, and troubleshooting.
|
|
20
|
+
|
|
21
|
+
## How the repositories fit together
|
|
22
|
+
|
|
23
|
+
| Repository | What it provides |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| **create-forge** | The CLI: prompts, project creation, updates, and diagnostics. |
|
|
26
|
+
| [forge-template](https://github.com/Sandsy09/forge-template) | The project templates and composition engine used to generate files. |
|
|
27
|
+
|
|
28
|
+
You normally use the CLI without cloning either repository. Generated
|
|
29
|
+
projects do not depend on either Forge package at runtime.
|
|
30
|
+
|
|
31
|
+
## Create your first project
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
uvx create-forge new "My Library"
|
|
35
|
+
cd my-library
|
|
36
|
+
uv run poe check
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The default workflow creates an installable Library with a `src/` layout,
|
|
40
|
+
uv, Ruff, pytest with coverage, mypy and/or pyright, pre-commit hooks, and
|
|
41
|
+
GitHub Actions CI. Choose your build backend, versioning, license, and
|
|
42
|
+
dependency-update tooling. MkDocs documentation is optional.
|
|
43
|
+
|
|
44
|
+
The template is rendered by [Copier](https://copier.readthedocs.io/), which
|
|
45
|
+
also supports bringing later template improvements into existing projects.
|
|
46
|
+
|
|
47
|
+
## Install and manage the tool
|
|
48
|
+
|
|
49
|
+
Use `uvx` for occasional runs, or install a persistent command:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
uv tool install create-forge
|
|
53
|
+
create-forge new
|
|
54
|
+
uv tool upgrade create-forge
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
If the command is not on your PATH, run `uv tool update-shell` and restart
|
|
58
|
+
your terminal.
|
|
59
|
+
|
|
60
|
+
### Choose a CLI version
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
uvx create-forge@latest new
|
|
64
|
+
uvx create-forge@0.3.0 new
|
|
65
|
+
uv tool install "create-forge==0.3.0"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Plain `uvx create-forge` can reuse a cached or persistently installed
|
|
69
|
+
version; `@latest` explicitly requests the latest release. Tool upgrades
|
|
70
|
+
respect the constraints used at installation, so an exact pin stays pinned.
|
|
71
|
+
To return to the latest release, run `uv tool install create-forge@latest`.
|
|
72
|
+
See [installation and versions](https://sandsy09.github.io/create-forge/installation/).
|
|
73
|
+
|
|
74
|
+
## Everyday usage
|
|
75
|
+
|
|
76
|
+
| Command | Purpose |
|
|
77
|
+
| --- | --- |
|
|
78
|
+
| `uvx create-forge new` | Create a project interactively. |
|
|
79
|
+
| `uvx create-forge list` | List the bundled Copier templates. |
|
|
80
|
+
| `uvx create-forge update` | Update a Copier-generated project from its directory. |
|
|
81
|
+
| `uvx create-forge doctor` | Diagnose Python, Git, uv, and package compatibility. |
|
|
82
|
+
| `uvx create-forge config init` | Create an optional configuration file. |
|
|
83
|
+
| `uvx create-forge config show` | Show resolved configuration and its sources. |
|
|
84
|
+
|
|
85
|
+
For scripts and CI, provide a project name and skip questions with `--yes`:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
uvx create-forge new "My Library" --yes --data github_org=your-org --data build_backend=hatchling --data versioning=vcs
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Use `--path` to choose the destination and repeat `--data key=value` to
|
|
92
|
+
preset answers. Run `uvx create-forge new --help` for the default workflow's
|
|
93
|
+
options. Saved author details, GitHub organisation, and preferred template
|
|
94
|
+
are covered in the [CLI guide](https://sandsy09.github.io/create-forge/cli/).
|
|
95
|
+
|
|
96
|
+
### Choose a template version or source
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
uvx create-forge new "My Library" --template library --ref v0.4.1
|
|
100
|
+
uvx create-forge new "Custom Project" --template-url https://github.com/you/your-template
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
`--ref` selects a Git revision in the **template repository**. It does not
|
|
104
|
+
select the CLI version. Without it, Copier uses the latest suitable release
|
|
105
|
+
tag. The bundled registry currently offers Library; upgrade the CLI to
|
|
106
|
+
receive registry changes.
|
|
107
|
+
|
|
108
|
+
Templates can execute code through generation and update tasks. Use custom
|
|
109
|
+
sources only when you trust their content; `--yes` also skips the custom
|
|
110
|
+
template confirmation.
|
|
111
|
+
|
|
112
|
+
### Update a generated project
|
|
113
|
+
|
|
114
|
+
From a clean, committed Copier-generated project:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
uvx create-forge update --dry-run
|
|
118
|
+
uvx create-forge update
|
|
119
|
+
uv run poe check
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Keep `.copier-answers.yml` committed. Review the resulting diff and resolve
|
|
123
|
+
conflicts before committing. A dry run validates the update without applying
|
|
124
|
+
it; it does not produce a file-by-file diff. Use `update --ref v0.4.1` to
|
|
125
|
+
target a particular template version.
|
|
126
|
+
|
|
127
|
+
## Preview: more project types and capabilities
|
|
128
|
+
|
|
129
|
+
The `0.3.0` CLI also provides an opt-in engine preview using
|
|
130
|
+
`forge-template>=0.4.1,<0.5`. These options are currently hidden from help.
|
|
131
|
+
|
|
132
|
+
| Project type | Use it for |
|
|
133
|
+
| --- | --- |
|
|
134
|
+
| Library | A distributable Python package with a choice of packaging modes. |
|
|
135
|
+
| CLI Application | A Typer application with a console command and tests. |
|
|
136
|
+
| Data Science | A Python package with a starter notebook and Jupyter tooling. |
|
|
137
|
+
|
|
138
|
+
Add **Jupyter** for notebook development or **Scientific Python** for NumPy,
|
|
139
|
+
pandas, Matplotlib, and scikit-learn. Data Science requires Jupyter;
|
|
140
|
+
Scientific Python is optional. These capabilities can also accompany the
|
|
141
|
+
other preview archetypes.
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
uvx --from "create-forge[engine]==0.3.0" create-forge new "My Analysis" --engine-preview --archetype data-science --capability jupyter --yes --data license=mit
|
|
145
|
+
cd my-analysis
|
|
146
|
+
uv run --locked poe check
|
|
147
|
+
uv run poe notebook
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
For regular preview use, install with `uv tool install "create-forge[engine]"`.
|
|
151
|
+
The [project guide](https://sandsy09.github.io/create-forge/projects/) explains
|
|
152
|
+
each type's output and links to complete recipes.
|
|
153
|
+
|
|
154
|
+
**Preview projects do not support `create-forge update`.** Their shared
|
|
155
|
+
tooling differs from the default Copier template; the preview does not
|
|
156
|
+
generate its CI workflows or install Git hooks. `--template`,
|
|
157
|
+
`--template-url`, and `--ref` apply only to the Copier workflow.
|
|
158
|
+
|
|
159
|
+
## What's next
|
|
160
|
+
|
|
161
|
+
The Foundation and Data Science roadmaps are complete. Making the engine
|
|
162
|
+
the default generation workflow is a planned direction with no scheduled
|
|
163
|
+
release. Follow [open work](https://github.com/Sandsy09/create-forge/issues)
|
|
164
|
+
and [releases](https://github.com/Sandsy09/create-forge/releases) for updates,
|
|
165
|
+
or suggest a project type, capability, or guide you would find useful.
|
|
166
|
+
|
|
167
|
+
## Feedback and contributing
|
|
168
|
+
|
|
169
|
+
- [Report a CLI problem or suggest a feature](https://github.com/Sandsy09/create-forge/issues/new/choose).
|
|
170
|
+
- [Request or correct documentation](https://github.com/Sandsy09/create-forge/issues/new?template=documentation.yml).
|
|
171
|
+
- [Report generated-content or capability problems](https://github.com/Sandsy09/forge-template/issues/new/choose).
|
|
172
|
+
|
|
173
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development and PR checks, and
|
|
174
|
+
the [reference index](https://sandsy09.github.io/create-forge/reference/) for
|
|
175
|
+
engine APIs and architecture documents. Report vulnerabilities through
|
|
176
|
+
[SECURITY.md](SECURITY.md).
|
|
177
|
+
|
|
178
|
+
## License
|
|
179
|
+
|
|
180
|
+
MIT — see [LICENSE](LICENSE).
|
|
@@ -36,6 +36,11 @@ format](https://cognitect.com/blog/2011/11/15/documenting-architecture-decisions
|
|
|
36
36
|
- [0031 — Adopt the reviewed forge-template 0.4.1 release](0031-adopt-the-reviewed-forge-template-0-4-1-release.md)
|
|
37
37
|
- [0032 — Validate Data Science through the installed create-forge candidate](0032-validate-installed-data-science-generation.md)
|
|
38
38
|
- [0033 — Complete the rollout regression and failure matrix at the installed boundary](0033-complete-rollout-regression-validation.md)
|
|
39
|
+
- [0034 — Publish create-forge 0.3.0 and close the Data Science roadmap](0034-publish-0-3-0-and-close-roadmap-v2.md)
|
|
40
|
+
- [0035 — Shared Forge user documentation](0035-shared-forge-user-documentation.md)
|
|
41
|
+
- [0036 — Keep credentials out of template sources and CLI diagnostics](0036-template-source-credentials.md)
|
|
42
|
+
- [0037 — Pin external Actions to reviewed commits and scope permissions per job](0037-immutable-workflow-actions.md)
|
|
43
|
+
- [0038 — Raise the Copier floor past the destination-escape advisories and hold uv](0038-dependency-floor-review.md)
|
|
39
44
|
|
|
40
45
|
Add a new record by copying the most recent one and incrementing the number.
|
|
41
46
|
Records are immutable: supersede them rather than editing.
|
|
@@ -31,7 +31,9 @@ Provider Stage 14 is complete and published the reviewed
|
|
|
31
31
|
`>=0.4.1,<0.5` lower bound and prepares create-forge `0.3.0`; CF-14.02
|
|
32
32
|
(ADR 0032) completes installed-console Data Science validation, and CF-14.03
|
|
33
33
|
(ADR 0033) completes the installed regression and failure matrix. CF-14.04
|
|
34
|
-
|
|
34
|
+
(ADR 0034) published create-forge `0.3.0` to PyPI, verified the released pair,
|
|
35
|
+
and closed CF-EPIC-14 and both Stage 13 and Stage 14 milestones. **The Data
|
|
36
|
+
Science roadmap is complete in both repositories.**
|
|
35
37
|
|
|
36
38
|
## Repository roles
|
|
37
39
|
|
|
@@ -19,8 +19,11 @@ installed create-forge candidate under
|
|
|
19
19
|
[ADR 0032](../../../adr/0032-validate-installed-data-science-generation.md).
|
|
20
20
|
CF-14.03 completes the installed regression and failure matrix under
|
|
21
21
|
[ADR 0033](../../../adr/0033-complete-rollout-regression-validation.md).
|
|
22
|
-
CF-14.04
|
|
23
|
-
|
|
22
|
+
CF-14.04 published create-forge `0.3.0` to PyPI and closed CF-EPIC-14 and both
|
|
23
|
+
Stage 13 and Stage 14 milestones under
|
|
24
|
+
[ADR 0034](../../../adr/0034-publish-0-3-0-and-close-roadmap-v2.md). All four
|
|
25
|
+
children are complete; the Data Science roadmap is closed in both
|
|
26
|
+
repositories.
|
|
24
27
|
|
|
25
28
|
## Child sequence
|
|
26
29
|
|
|
@@ -60,8 +63,14 @@ create-forge then completes client rollout:
|
|
|
60
63
|
[rollout regression and failure validation](https://github.com/Sandsy09/create-forge/blob/main/docs/rollout-regression-validation.md)
|
|
61
64
|
record.
|
|
62
65
|
4. [CF-14.04 / create-forge#114](https://github.com/Sandsy09/create-forge/issues/114)
|
|
63
|
-
publishes create-forge 0.3.0 and completes roadmap v2
|
|
64
|
-
|
|
66
|
+
publishes create-forge 0.3.0 and completes roadmap v2. **Complete** under
|
|
67
|
+
[ADR 0034](../../../adr/0034-publish-0-3-0-and-close-roadmap-v2.md):
|
|
68
|
+
`create-forge` and `create-forge[engine]` `0.3.0` are on PyPI, tag `v0.3.0`
|
|
69
|
+
is released, the published pair generates and checks every archetype and the
|
|
70
|
+
engine-less default Copier path, and both Stage 13 and Stage 14 milestones
|
|
71
|
+
are closed. Canonical
|
|
72
|
+
[release 0.3.0 validation](https://github.com/Sandsy09/create-forge/blob/main/docs/release-0-3-0-validation.md)
|
|
73
|
+
record.
|
|
65
74
|
|
|
66
75
|
## Entry criteria
|
|
67
76
|
|
|
@@ -7,7 +7,7 @@ build-backend = "hatchling.build"
|
|
|
7
7
|
|
|
8
8
|
[project]
|
|
9
9
|
name = "create-forge"
|
|
10
|
-
version = "0.3.
|
|
10
|
+
version = "0.3.1"
|
|
11
11
|
description = "Scaffold modern Python projects from maintained templates."
|
|
12
12
|
readme = "README.md"
|
|
13
13
|
requires-python = ">=3.11"
|
|
@@ -29,12 +29,20 @@ classifiers = [
|
|
|
29
29
|
|
|
30
30
|
dependencies = [
|
|
31
31
|
# Pinned to a major: the Python API is public but evolves faster than the
|
|
32
|
-
# CLI. runner.py is the only module that touches it.
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
# CLI. runner.py is the only module that touches it. The lower bound clears
|
|
33
|
+
# every published Copier advisory -- the destination-escape set fixed
|
|
34
|
+
# through 9.14.1, and one patch further to 9.15.2 for a clean rule. See
|
|
35
|
+
# ADR 0038 and docs/engine-updates.md.
|
|
36
|
+
"copier>=9.15.2,<10",
|
|
37
|
+
# >=0.16: typer 0.15.0-0.15.3 declare an uncapped click and break against
|
|
38
|
+
# click >=8.2 (TyperArgument.make_metavar), and 0.15.4 pins click <8.2.
|
|
39
|
+
# 0.16.0 is the first release that works with current click. The CI
|
|
40
|
+
# `floor` job (ADR 0038) is what caught the stale >=0.15 bound.
|
|
41
|
+
"typer>=0.16",
|
|
35
42
|
"questionary>=2.0",
|
|
36
43
|
"pydantic>=2.10",
|
|
37
44
|
"rich>=13.9",
|
|
45
|
+
"pyyaml>=6.0",
|
|
38
46
|
]
|
|
39
47
|
|
|
40
48
|
[project.optional-dependencies]
|
|
@@ -47,7 +55,9 @@ dependencies = [
|
|
|
47
55
|
# call. src/create_forge/engine.py is the only module that imports it;
|
|
48
56
|
# src/create_forge/compat.py holds the range itself so cli.py's `doctor` can
|
|
49
57
|
# report it without importing the engine. ADR 0021 adds bounded uv to finalise
|
|
50
|
-
# the engine render's dynamic lockfile
|
|
58
|
+
# the engine render's dynamic lockfile; ADR 0038 reviewed that `uv` floor
|
|
59
|
+
# against the advisory record and held it -- the whole `>=0.12,<0.13` range is
|
|
60
|
+
# already advisory-free.
|
|
51
61
|
engine = ["forge-template>=0.4.1,<0.5", "uv>=0.12,<0.13"]
|
|
52
62
|
|
|
53
63
|
[project.scripts]
|
|
@@ -60,6 +70,7 @@ Issues = "https://github.com/Sandsy09/create-forge/issues"
|
|
|
60
70
|
Changelog = "https://github.com/Sandsy09/create-forge/blob/main/CHANGELOG.md"
|
|
61
71
|
|
|
62
72
|
[dependency-groups]
|
|
73
|
+
docs = ["mkdocs>=1.6,<2", "mkdocs-material>=9.5,<10"]
|
|
63
74
|
lint = ["ruff>=0.14", "pre-commit>=4.0"]
|
|
64
75
|
test = [
|
|
65
76
|
"pytest>=8.3",
|
|
@@ -71,6 +82,7 @@ test = [
|
|
|
71
82
|
]
|
|
72
83
|
typecheck = ["mypy>=1.14", "types-PyYAML>=6.0"]
|
|
73
84
|
dev = [
|
|
85
|
+
{ include-group = "docs" },
|
|
74
86
|
{ include-group = "lint" },
|
|
75
87
|
{ include-group = "test" },
|
|
76
88
|
{ include-group = "typecheck" },
|
|
@@ -179,6 +191,8 @@ test = "pytest -m 'not network and not e2e'"
|
|
|
179
191
|
"test:e2e" = "pytest -m e2e"
|
|
180
192
|
check = ["format:check", "lint", "typecheck", "test"]
|
|
181
193
|
changelog = "git-cliff --output CHANGELOG.md"
|
|
194
|
+
docs = "mkdocs serve"
|
|
195
|
+
"docs:build" = "mkdocs build --strict"
|
|
182
196
|
|
|
183
197
|
# Verifies templates.toml actually ships in the wheel. This is the failure
|
|
184
198
|
# that passes every local test and breaks on first uvx run. Builds into a
|
|
@@ -191,6 +205,12 @@ changelog = "git-cliff --output CHANGELOG.md"
|
|
|
191
205
|
# via tests/test_adr.py; this is the standalone entry point.
|
|
192
206
|
"check:adr" = "python scripts/adr.py"
|
|
193
207
|
|
|
208
|
+
# Verifies every workflow pins its external actions to a full commit SHA and
|
|
209
|
+
# keeps write permissions off the workflow level (ADR 0037). Also runs inside
|
|
210
|
+
# the fast test suite via tests/test_workflows.py; this is the standalone
|
|
211
|
+
# entry point -- see scripts/check_workflows.py.
|
|
212
|
+
"check:workflows" = "python scripts/check_workflows.py"
|
|
213
|
+
|
|
194
214
|
# Reconciles a repo's GitHub labels against .github/labels.toml. Idempotent:
|
|
195
215
|
# `gh label create --force` creates or updates. Pass extra args after `--`,
|
|
196
216
|
# e.g. `uv run poe labels:sync --dry-run` or `--repo OWNER/NAME --prune`
|
|
@@ -15,6 +15,7 @@ import typer
|
|
|
15
15
|
from rich.console import Console
|
|
16
16
|
from rich.panel import Panel
|
|
17
17
|
from rich.table import Table
|
|
18
|
+
from rich.text import Text
|
|
18
19
|
|
|
19
20
|
from create_forge.compat import (
|
|
20
21
|
ENGINE_DISTRIBUTION,
|
|
@@ -42,6 +43,7 @@ from create_forge.prompts import (
|
|
|
42
43
|
)
|
|
43
44
|
from create_forge.registry import load_registry
|
|
44
45
|
from create_forge.runner import ScaffoldError, ScaffoldRequest, scaffold, update
|
|
46
|
+
from create_forge.sources import SourceError, display_source, validate_source
|
|
45
47
|
from create_forge.spec import (
|
|
46
48
|
DESCRIPTOR_KIND,
|
|
47
49
|
SELECTABLE_KINDS,
|
|
@@ -249,8 +251,11 @@ def _confirm_third_party(template_url: str | None, *, yes: bool) -> None:
|
|
|
249
251
|
return
|
|
250
252
|
err.print(
|
|
251
253
|
Panel(
|
|
252
|
-
|
|
253
|
-
|
|
254
|
+
Text.assemble(
|
|
255
|
+
"Scaffolding from ",
|
|
256
|
+
(display_source(template_url), "bold"),
|
|
257
|
+
"\nTemplate code will be executed. Only continue if you trust it.",
|
|
258
|
+
),
|
|
254
259
|
title="[yellow]Third-party template[/yellow]",
|
|
255
260
|
border_style="yellow",
|
|
256
261
|
)
|
|
@@ -857,6 +862,12 @@ def new( # noqa: PLR0913, PLR0917 - a CLI entry point's options are its public
|
|
|
857
862
|
] = None,
|
|
858
863
|
) -> None:
|
|
859
864
|
"""Create a new project."""
|
|
865
|
+
if template_url is not None:
|
|
866
|
+
try:
|
|
867
|
+
validate_source(template_url)
|
|
868
|
+
except SourceError as exc:
|
|
869
|
+
err.print(str(exc), style="red", markup=False)
|
|
870
|
+
raise typer.Exit(1) from None
|
|
860
871
|
if archetype is not None and not engine_preview:
|
|
861
872
|
err.print("[red]--archetype requires --engine-preview.[/red]")
|
|
862
873
|
raise typer.Exit(1)
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Copier's Python API is public but not versioned as strictly as its CLI, so this
|
|
4
4
|
module is the single place that touches it. Pin copier narrowly in
|
|
5
|
-
pyproject.toml (`copier>=9.
|
|
6
|
-
attention on a major bump.
|
|
5
|
+
pyproject.toml (`copier>=9.15.2,<10`) and this file is the only thing that
|
|
6
|
+
needs attention on a major bump.
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
9
|
from __future__ import annotations
|
|
@@ -12,11 +12,13 @@ from dataclasses import dataclass
|
|
|
12
12
|
from pathlib import Path
|
|
13
13
|
from typing import TYPE_CHECKING
|
|
14
14
|
|
|
15
|
+
import yaml
|
|
15
16
|
from copier import run_copy, run_update
|
|
16
17
|
from copier.errors import CopierError
|
|
17
18
|
from plumbum.commands.processes import ProcessExecutionError
|
|
18
19
|
|
|
19
20
|
from create_forge import staging
|
|
21
|
+
from create_forge.sources import SourceError, validate_source
|
|
20
22
|
|
|
21
23
|
if TYPE_CHECKING:
|
|
22
24
|
from collections.abc import Mapping
|
|
@@ -55,6 +57,10 @@ def scaffold(request: ScaffoldRequest) -> None:
|
|
|
55
57
|
the same team publishes. Never widen the registry to arbitrary URLs without
|
|
56
58
|
revisiting this.
|
|
57
59
|
"""
|
|
60
|
+
try:
|
|
61
|
+
validate_source(request.src)
|
|
62
|
+
except SourceError as exc:
|
|
63
|
+
raise ScaffoldError(str(exc)) from None
|
|
58
64
|
try:
|
|
59
65
|
staging.ensure_available(request.dst)
|
|
60
66
|
except staging.DestinationConflictError as exc:
|
|
@@ -95,6 +101,28 @@ def update(project: Path, *, vcs_ref: str | None = None, dry_run: bool = False)
|
|
|
95
101
|
)
|
|
96
102
|
raise ScaffoldError(msg)
|
|
97
103
|
|
|
104
|
+
try:
|
|
105
|
+
recorded = yaml.safe_load(answers.read_text(encoding="utf-8"))
|
|
106
|
+
except (OSError, UnicodeError, yaml.YAMLError):
|
|
107
|
+
raise ScaffoldError(
|
|
108
|
+
"Cannot read .copier-answers.yml. Repair its YAML before retrying; "
|
|
109
|
+
"use a credential-free _src_path with a Git credential helper or SSH agent."
|
|
110
|
+
) from None
|
|
111
|
+
if (
|
|
112
|
+
not isinstance(recorded, dict)
|
|
113
|
+
or not isinstance(recorded.get("_src_path"), str)
|
|
114
|
+
or not recorded["_src_path"]
|
|
115
|
+
):
|
|
116
|
+
raise ScaffoldError(
|
|
117
|
+
".copier-answers.yml needs a non-empty string _src_path. "
|
|
118
|
+
"Restore a credential-free source with a Git credential helper "
|
|
119
|
+
"or SSH agent."
|
|
120
|
+
)
|
|
121
|
+
try:
|
|
122
|
+
validate_source(recorded["_src_path"], origin=".copier-answers.yml _src_path")
|
|
123
|
+
except SourceError as exc:
|
|
124
|
+
raise ScaffoldError(str(exc)) from None
|
|
125
|
+
|
|
98
126
|
try:
|
|
99
127
|
run_update(
|
|
100
128
|
dst_path=project,
|
|
@@ -158,5 +186,6 @@ def _explain(exc: CopierError | ProcessExecutionError) -> str:
|
|
|
158
186
|
return (
|
|
159
187
|
_PROCESS_FAILURE_MESSAGE
|
|
160
188
|
if "authentication" in lowered or "permission denied" in lowered
|
|
161
|
-
else
|
|
189
|
+
else "Copier could not complete the template operation. "
|
|
190
|
+
"Check the template configuration, supplied answers, and --ref, then retry."
|
|
162
191
|
)
|