Skip to content

Commit 0d0857e

Browse files
chore: update fixtures for CNA-parity extension slugs (#213)
* chore: retarget fixtures and smokes to CNA-parity extension slugs Point catalog tests, fixtures, and scaffold workflow at fastapi-docker and all-github-setup paths after the cpa-templates taxonomy rename. Co-authored-by: Cursor <cursoragent@cursor.com> * style: wrap long validate_extension_compatibility call Co-authored-by: Cursor <cursoragent@cursor.com> * test: point github-setup fixture at all-github-setup dir Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 9cdfab3 commit 0d0857e

5 files changed

Lines changed: 13 additions & 10 deletions

File tree

.github/workflows/scaffold-cross-platform.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ env:
1818
# Full registry URLs: published PyPI 0.1.0 does not resolve catalog slugs.
1919
# After create-awesome-python-app>=0.2.0 ships resolve_catalog_spec, slugs also work.
2020
CPA_TEMPLATE_FASTAPI: https://github.com/Create-Python-App/cpa-templates?subdir=templates/fastapi-starter
21-
CPA_ADDON_DOCKER: https://github.com/Create-Python-App/cpa-templates?subdir=extensions/python-docker
21+
CPA_ADDON_DOCKER: https://github.com/Create-Python-App/cpa-templates?subdir=extensions/fastapi-docker
2222

2323
jobs:
2424
scaffold:
@@ -72,7 +72,7 @@ jobs:
7272
PY
7373
7474
addon-smoke:
75-
name: ubuntu-latest / fastapi-starter + python-docker
75+
name: ubuntu-latest / fastapi-starter + fastapi-docker
7676
runs-on: ubuntu-latest
7777
steps:
7878
- uses: astral-sh/setup-uv@v7

docs/MIGRATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ slugs fail with a hint to pass a full URL.
104104

105105
```text
106106
https://github.com/Create-Python-App/cpa-templates?subdir=templates/fastapi-starter
107-
https://github.com/Create-Python-App/cpa-templates?subdir=extensions/github-setup
107+
https://github.com/Create-Python-App/cpa-templates?subdir=extensions/all-github-setup
108108
```
109109

110110
**Local `file://` URLs.** For forks, air-gapped work, or integration tests:

fixtures/catalog/templates.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"name": "GitHub Setup",
5151
"slug": "github-setup",
5252
"description": "GitHub Actions CI, Dependabot, issue templates",
53-
"url": "https://github.com/Create-Python-App/cpa-templates?subdir=extensions/github-setup",
53+
"url": "https://github.com/Create-Python-App/cpa-templates?subdir=extensions/all-github-setup",
5454
"type": ["fastapi-backend"],
5555
"category": "tooling",
5656
"labels": ["GitHub", "CI"]

packages/create-awesome-python-app/tests/test_catalog_resolve.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"extensions": [
3333
{
3434
"slug": "github-setup",
35-
"url": "https://github.com/Create-Python-App/cpa-templates?subdir=extensions/github-setup",
35+
"url": "https://github.com/Create-Python-App/cpa-templates?subdir=extensions/all-github-setup",
3636
}
3737
],
3838
}
@@ -258,10 +258,13 @@ def test_validate_extension_compatibility_ok() -> None:
258258
"url": "file:///ext/github",
259259
"incompatibleWith": ["other"],
260260
},
261-
{"slug": "python-docker", "url": "file:///ext/docker"},
261+
{"slug": "fastapi-docker", "url": "file:///ext/docker"},
262262
]
263263
}
264-
validate_extension_compatibility(["github-setup", "python-docker"], catalog=catalog)
264+
validate_extension_compatibility(
265+
["github-setup", "fastapi-docker"],
266+
catalog=catalog,
267+
)
265268

266269

267270
def test_validate_extension_compatibility_fails_on_pair() -> None:

packages/create-awesome-python-app/tests/test_cpa_templates_integration.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
os.environ.get("CPA_TEMPLATES_ROOT", str(_DEFAULT_CPA_TEMPLATES))
1515
).resolve()
1616
FASTAPI_TEMPLATE = CPA_TEMPLATES_ROOT / "templates" / "fastapi-starter"
17-
GITHUB_SETUP = CPA_TEMPLATES_ROOT / "extensions" / "github-setup"
17+
GITHUB_SETUP = CPA_TEMPLATES_ROOT / "extensions" / "all-github-setup"
1818

1919

2020
def _cpa_templates_available() -> bool:
@@ -143,7 +143,7 @@ def test_scaffold_via_catalog_addon_slug(
143143
"extensions": [
144144
{
145145
"slug": "github-setup",
146-
"url": f"file://{repo}?subdir=extensions/github-setup",
146+
"url": f"file://{repo}?subdir=extensions/all-github-setup",
147147
}
148148
],
149149
"categories": [],
@@ -196,7 +196,7 @@ def test_scaffold_fastapi_with_github_setup_extension(
196196
"--template",
197197
f"file://{repo}?subdir=templates/fastapi-starter",
198198
"--addons",
199-
f"file://{repo}?subdir=extensions/github-setup",
199+
f"file://{repo}?subdir=extensions/all-github-setup",
200200
"--no-interactive",
201201
"--no-install",
202202
str(dest),

0 commit comments

Comments
 (0)