Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/workflows/publish.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,12 +24,25 @@ jobs:
with:
python-version-file: .python-version
- run: uv sync --group dev
- run: uv build --package create-awesome-python-app
# Publish core first so the CLI wheel can resolve create-python-app-core on PyPI.
- name: Build packages
run: |
uv build --package create-python-app-core
uv build --package create-awesome-python-app
ls -la dist/
- name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: dist/*
body: |
First public release. Install with:

```bash
uvx create-awesome-python-app@0.1.0 --help
```

Catalog: https://github.com/Create-Python-App/cpa-templates
- name: Publish to PyPI (OIDC)
if: startsWith(github.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
# Changelog

## 0.1.0

First public release of:

- `create-python-app-core` — scaffolding engine (Jinja `.template` / `.append`, `pyproject.toml` merge, git cache, `file://` / GitHub sources)
- `create-awesome-python-app` — Typer CLI

Default template catalog: `Create-Python-App/cpa-templates` (`templates.json`).

### Install

```bash
uvx create-awesome-python-app@0.1.0 my-api --template fastapi-starter --no-interactive
```
13 changes: 9 additions & 4 deletions README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,6 +3,7 @@
[![CI Tests](https://github.com/Create-Python-App/create-python-app/actions/workflows/test.yml/badge.svg)](https://github.com/Create-Python-App/create-python-app/actions/workflows/test.yml)
[![Lint](https://github.com/Create-Python-App/create-python-app/actions/workflows/lint.yml/badge.svg)](https://github.com/Create-Python-App/create-python-app/actions/workflows/lint.yml)
[![Typecheck](https://github.com/Create-Python-App/create-python-app/actions/workflows/type-check.yml/badge.svg)](https://github.com/Create-Python-App/create-python-app/actions/workflows/type-check.yml)
[![PyPI](https://img.shields.io/pypi/v/create-awesome-python-app.svg)](https://pypi.org/project/create-awesome-python-app/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)

<!-- PyPI / coverage badges activate after first publish -->
Expand All@@ -24,15 +25,19 @@ The CLI fetches the catalog from:

Override with `CPA_CATALOG_URL` for forks or local testing (`file://` supported).

## Install (preview)

Once published to PyPI:
## Install

```bash
uvx create-awesome-python-app@latest my-app
```

Until the first release, use the workspace CLI:
Or pin a version:

```bash
uvx create-awesome-python-app@0.1.0 my-app --template fastapi-starter --no-interactive
```

From this workspace (development):

```bash
uv sync
Expand Down
33 changes: 29 additions & 4 deletions docs/DISTRIBUTION_SETUP.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,10 +13,35 @@

## PyPI Trusted Publishing

1. On PyPI, add a Trusted Publisher for project `create-awesome-python-app`
2. Owner/repo: `Create-Python-App/create-python-app`
3. Workflow name: `publish.yml`
4. Environment: (optional)
Configure **two** pending Trusted Publishers on PyPI (same workflow publishes both packages):

### `create-python-app-core`

1. Owner: `Create-Python-App`
2. Repository: `create-python-app`
3. Workflow: `publish.yml`
4. Environment: (leave empty unless you use one)

### `create-awesome-python-app`

Same owner/repo/workflow as above.

On the first tag `create-awesome-python-app@0.1.0`, OIDC creates the projects and uploads sdists/wheels for both packages.

## Cutting a release

1. Bump versions in both package `pyproject.toml` files and `__version__` / `_version.py`
2. Update `CHANGELOG.md`
3. Merge to `main`
4. Tag and push:

```bash
git tag create-awesome-python-app@0.1.0
git push origin create-awesome-python-app@0.1.0
```

5. Confirm the Release workflow published both packages

Check failure on line 43 in docs/DISTRIBUTION_SETUP.md

View workflow job for this annotation

GitHub Actions/ markdownlint

Ordered list item prefix

docs/DISTRIBUTION_SETUP.md:43:1 MD029/ol-prefix Ordered list item prefix [Expected: 1; Actual: 5; Style: 1/2/3] https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md029.md
6. Smoke: `uvx create-awesome-python-app@0.1.0 --help`

Check failure on line 44 in docs/DISTRIBUTION_SETUP.md

View workflow job for this annotation

GitHub Actions/ markdownlint

Ordered list item prefix

docs/DISTRIBUTION_SETUP.md:44:1 MD029/ol-prefix Ordered list item prefix [Expected: 2; Actual: 6; Style: 1/2/3] https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md029.md

## Docker Hub

Expand Down
13 changes: 10 additions & 3 deletions packages/create-awesome-python-app/pyproject.toml
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
[project]
name = "create-awesome-python-app"
version = "0.0.0"
description = "Composable scaffolding CLI for production-ready Python apps (stub)"
version = "0.1.0"
description = "Composable scaffolding CLI for production-ready Python apps"
readme = "README.md"
requires-python = ">=3.12"
license = "MIT"
dependencies = [
"create-python-app-core",
"create-python-app-core>=0.1.0",
"questionary>=2.1.1",
"rich>=15.0.0",
"typer>=0.27.0",
]

[project.urls]
Homepage = "https://github.com/Create-Python-App/create-python-app"
Repository = "https://github.com/Create-Python-App/create-python-app"
Issues = "https://github.com/Create-Python-App/create-python-app/issues"
Changelog = "https://github.com/Create-Python-App/create-python-app/blob/main/CHANGELOG.md"

[project.scripts]
create-awesome-python-app = "create_awesome_python_app.cli:main"

Expand Down
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
"""Create Awesome Python App CLI."""

__version__ = "0.0.0"
__version__ = "0.1.0"
2 changes: 1 addition & 1 deletion packages/create-awesome-python-app/tests/test_cli.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,7 +8,7 @@ def test_version() -> None:
result = runner.invoke(app, ["--version"])
assert result.exit_code == 0
combined = result.stdout + result.stderr
assert "0.0.0" in combined
assert "0.1.0" in combined


def test_help() -> None:
Expand Down
10 changes: 8 additions & 2 deletions packages/create-python-app-core/pyproject.toml
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
[project]
name = "create-python-app-core"
version = "0.0.0"
description = "Scaffolding engine for Create Awesome Python App (stub)"
version = "0.1.0"
description = "Scaffolding engine for Create Awesome Python App"
readme = "README.md"
requires-python = ">=3.12"
license = "MIT"
dependencies = [
"httpx>=0.28.1",
"jinja2>=3.1.0",
"packaging>=24.0",
"tomlkit>=0.13.0",
]

[project.urls]
Homepage = "https://github.com/Create-Python-App/create-python-app"
Repository = "https://github.com/Create-Python-App/create-python-app"
Issues = "https://github.com/Create-Python-App/create-python-app/issues"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
Expand Down
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
__version__ = "0.0.0"
__version__ = "0.1.0"
4 changes: 2 additions & 2 deletions packages/create-python-app-core/tests/test_version.py
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
from create_python_app_core import CPA_USER_AGENT, __version__


def test_version_is_semver_stub() -> None:
assert __version__ == "0.0.0"
def test_version_is_semver() -> None:
assert __version__ == "0.1.0"


def test_user_agent_contains_version() -> None:
Expand Down
4 changes: 2 additions & 2 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading