From fea08ade378154ac4f68fa78678e25e4528d7d0e Mon Sep 17 00:00:00 2001 From: Stephen Kent Date: Tue, 14 Jan 2025 17:43:16 -0800 Subject: [PATCH] Fix cruft metadata, disable test PyPI publishing --- .cruft.json | 4 ++-- .github/workflows/cd.yml | 4 ++-- pyproject.toml | 2 +- tests/test_template.py | 4 ++++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.cruft.json b/.cruft.json index f3260c9..33ddf0e 100644 --- a/.cruft.json +++ b/.cruft.json @@ -3,9 +3,9 @@ "commit": "45a5e60428dab6cb6f6382505d8591a050f1a7ba", "context": { "cookiecutter": { - "project_name": "Cookiecutter template for new Python projects", + "project_name": "cookie-python", "project_slug": "cookie_python", - "project_description": "A template for new Python projects", + "project_description": "Cookiecutter template for new Python projects", "project_license": "MIT", "enable_coverage": "yes", "enable_pypi_publish": "no", diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index af8fbda..83a1e92 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -3,7 +3,7 @@ name: Release env: ENABLE_PYPI_PUBLISH: true - ENABLE_TEST_PYPI_PUBLISH: true + ENABLE_TEST_PYPI_PUBLISH: false RELEASE_PYTHON_VERSION: "3.12" RELEASE_POETRY_VERSION: "2.0" @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest environment: name: pypi - url: https://pypi.org/p/Cookiecutter template for new Python projects + url: https://pypi.org/p/cookie-python permissions: id-token: write diff --git a/pyproject.toml b/pyproject.toml index 0447cfa..d8b483b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [project] name = "cookie-python" -description = "" +description = "Cookiecutter template for new Python projects" license = "MIT" authors = [ { name = "Stephen Kent", email = "smkent@smkent.net" } ] readme = "README.md" diff --git a/tests/test_template.py b/tests/test_template.py index e9ff84c..1c3df73 100644 --- a/tests/test_template.py +++ b/tests/test_template.py @@ -133,6 +133,10 @@ def test_rendered_project( assert ci_data["env"]["ENABLE_COVERAGE"] == enable_coverage assert cd_data["env"]["ENABLE_PYPI_PUBLISH"] == enable_pypi_publish assert cd_data["env"]["ENABLE_TEST_PYPI_PUBLISH"] is False + assert cd_data["jobs"]["Publish"]["environment"] == { + "name": "pypi", + "url": "https://pypi.org/p/test-baked-cookie", + } assert not ( subprocess.check_output(