From e77b3702b54db49a7d032df84b059cdd5179c58c Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Sun, 6 Jul 2025 20:31:04 -0400 Subject: [PATCH 01/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 +- .github/workflows/bump-version.yml | 15 +--- .github/workflows/release-github.yml | 24 ++++++ .github/workflows/release-python.yml | 10 +++ noxfile.py | 10 +-- scripts/bump-version.py | 30 +++++++ .../{prepare-release.py => setup-release.py} | 45 +++------- scripts/util.py | 85 +++++++++++++++++++ 9 files changed, 172 insertions(+), 53 deletions(-) create mode 100644 .github/workflows/release-github.yml create mode 100644 scripts/bump-version.py rename scripts/{prepare-release.py => setup-release.py} (51%) diff --git a/.cookiecutter.json b/.cookiecutter.json index ba278af..78612f7 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "dab1f8da6cb6be90a50db1aafb4411ec61fbcb2c", + "_commit": "34a57b81ff4263362669776636b30a8d051687a3", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index 2dab440..5e72ba8 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "dab1f8da6cb6be90a50db1aafb4411ec61fbcb2c", + "commit": "34a57b81ff4263362669776636b30a8d051687a3", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "dab1f8da6cb6be90a50db1aafb4411ec61fbcb2c" + "_commit": "34a57b81ff4263362669776636b30a8d051687a3" } }, "directory": null diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 63ad4f4..e542c4c 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -3,8 +3,7 @@ name: Bump version on: push: branches: - - master - - main + - "release/*" jobs: bump-version: @@ -15,17 +14,9 @@ jobs: - name: Check out uses: actions/checkout@v4 with: - token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} fetch-depth: 0 - name: Create bump and changelog uses: commitizen-tools/commitizen-action@master with: - github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - changelog_increment_filename: body.md - - name: Release - uses: softprops/action-gh-release@v1 - with: - body_path: "body.md" - tag_name: ${{ env.REVISION }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-github.yml b/.github/workflows/release-github.yml new file mode 100644 index 0000000..e5c4e9d --- /dev/null +++ b/.github/workflows/release-github.yml @@ -0,0 +1,24 @@ +name: release-github.yml +on: + + +jobs: + generate-release-notes: + if: "startsWith(github.event.head_commit.message, 'bump:')" + runs-on: ubuntu-latest + name: "Generate Release Notes" + steps: + - name: Create Release Notes + uses: commitizen-tools/commitizen-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + changelog: "false" + dry_run: "true" + changelog_increment_filename: body.md + - name: Release + uses: softprops/action-gh-release@v1 + with: + body_path: "body.md" + tag_name: ${{ env.REVISION }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index 8c99c07..3352110 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -109,6 +109,16 @@ jobs: id: get_tag run: echo "tag=${{ github.ref_name }}" >> $GITHUB_OUTPUT + - name: Generate Release Notes + run: | + if [ -z "${{ steps.previous_tag.outputs.previous }}" ]; then + echo "No previous tag found: generating changelog for all commits." + cz changelog --dry-run > RELEASE_NOTES.md + else + echo "Previous tag found: generating changelog diff." + cz changelog --dry-run --rev-range ${{ steps.previous_tag.outputs.previous }}..${GITHUB_REF_NAME} > RELEASE_NOTES.md + fi + - name: Create GitHub Release uses: softprops/action-gh-release@v2 with: diff --git a/noxfile.py b/noxfile.py index 6aa7f13..641b47b 100644 --- a/noxfile.py +++ b/noxfile.py @@ -193,15 +193,15 @@ def build_container(session: Session) -> None: session.log(f"Container image {project_image_name}:latest built locally.") -@nox.session(python=None, name="prepare-release", tags=[RELEASE]) -def prepare_release(session: Session) -> None: +@nox.session(python=None, name="seutp-release", tags=[RELEASE]) +def setup_release(session: Session) -> None: """Prepares a release by creating a release branch and bumping the version. - Does not commit or push the release branch. Additionally, does not tag the release. + Additionally, creates the initial bump commit but doesn't push it. """ - session.log("Preparing release...") + session.log("Setting up release...") - session.run("python", SCRIPTS_FOLDER / "prepare-release.py", external=True) + session.run("python", SCRIPTS_FOLDER / "setup-release.py", external=True) @nox.session(python=None, tags=[RELEASE]) diff --git a/scripts/bump-version.py b/scripts/bump-version.py new file mode 100644 index 0000000..a0959a9 --- /dev/null +++ b/scripts/bump-version.py @@ -0,0 +1,30 @@ +"""Script responsible for bumping the version of the robust-python-demo package.""" + +import argparse + +from util import bump_version + + +def main() -> None: + """Parses args and passes through to bump_version.""" + parser: argparse.ArgumentParser = get_parser() + args: argparse.Namespace = parser.parse_args() + bump_version(increment=args.increment) + + +def get_parser() -> argparse.ArgumentParser: + """Creates the argument parser for prepare-release.""" + parser: argparse.ArgumentParser = argparse.ArgumentParser( + prog="bump-version", usage="python ./scripts/bump-version.py patch" + ) + parser.add_argument( + "increment", + type=str, + help="Increment type to use when preparing the release.", + choices=["MAJOR", "MINOR", "PATCH", "PRERELEASE"], + ) + return parser + + +if __name__ == "__main__": + main() diff --git a/scripts/prepare-release.py b/scripts/setup-release.py similarity index 51% rename from scripts/prepare-release.py rename to scripts/setup-release.py index 1fc155f..e7fa78e 100644 --- a/scripts/prepare-release.py +++ b/scripts/setup-release.py @@ -1,31 +1,22 @@ """Script responsible for preparing a release of the robust-python-demo package.""" import argparse -import re -import shutil import subprocess -from pathlib import Path -from re import Match -from typing import Literal from typing import Optional -from typing import Pattern -from typing import TypeAlias - +from util import bump_version from util import check_dependencies -from util import remove_readonly +from util import create_release_branch +from util import get_package_version +from util import get_bumped_package_version from util import REPO_FOLDER -Increment: TypeAlias = Literal["major", "minor", "patch", "prerelease"] -CZ_PATTERN: Pattern[str] = re.compile(r"bump: version (?P.*?) → (?P.*?)") - - def main() -> None: - """Parses args and passes through to prepare_release.""" + """Parses args and passes through to setup_release.""" parser: argparse.ArgumentParser = get_parser() args: argparse.Namespace = parser.parse_args() - prepare_release(path=args.path, python_version=args.python_version) + setup_release(increment=args.increment) def get_parser() -> argparse.ArgumentParser: @@ -42,39 +33,27 @@ def get_parser() -> argparse.ArgumentParser: return parser -def prepare_release(increment: Optional[str] = None) -> None: +def setup_release(increment: Optional[str] = None) -> None: """Prepares a release of the robust-python-demo package. Sets up a release branch from the branch develop, bumps the version, and creates a release commit. Does not tag the release or push any changes. """ - dry_run_cmd: list[str] = ["uvx", "cz", "bump", "--dry-run", "--yes"] - bump_cmd: list[str] = ["uvx", "cz", "bump", "--yes", "--files-only", "--changelog"] - if increment is not None: - dry_run_cmd.extend(["--increment", increment]) - bump_cmd.extend(["--increment", increment]) + check_dependencies(path=REPO_FOLDER, dependencies=["git", "cz"]) - result: subprocess.CompletedProcess = subprocess.run(dry_run_cmd, cwd=REPO_FOLDER, capture_output=True) - match: Match = re.match(CZ_PATTERN, result.stdout) - current_version: str = match.group("current_version") - new_version: str = match.group("new_version") + current_version: str = get_package_version() + new_version: str = get_bumped_package_version(increment=increment) + create_release_branch(new_version=new_version) + bump_version(increment=increment) commands: list[list[str]] = [ - ["git", "status", "--porcelain"], - ["git", "branch", "-b", f"release/{new_version}", "develop"], - ["git", "checkout", f"release/{new_version}"], - bump_cmd, ["git", "add", "."], ["git", "commit", "-m", f"bump: version {current_version} → {new_version}"] ] - check_dependencies(path=REPO_FOLDER, dependencies=["git", "cz"]) - for command in commands: subprocess.run(command, cwd=REPO_FOLDER, capture_output=True, check=True) if __name__ == "__main__": main() - - diff --git a/scripts/util.py b/scripts/util.py index 9161094..3e11775 100644 --- a/scripts/util.py +++ b/scripts/util.py @@ -6,10 +6,15 @@ from pathlib import Path from typing import Any from typing import Callable +from typing import Literal +from typing import Optional +from typing import TypeAlias REPO_FOLDER: Path = Path(__file__).resolve().parent.parent +Increment: TypeAlias = Literal["MAJOR", "MINOR", "PATCH", "PRERELEASE"] + class MissingDependencyError(Exception): """Exception raised when a depedency is missing from the system running setup-repo.""" @@ -52,3 +57,83 @@ def remove_readonly(func: Callable[[str], Any], path: str, _: Any) -> None: """ Path(path).chmod(stat.S_IWRITE) func(path) + + +def get_package_version() -> str: + """Gets the package version.""" + result: subprocess.CompletedProcess = subprocess.run( + ["uvx", "version", "-p"], + cwd=REPO_FOLDER, + capture_output=True + ) + return result.stdout.decode("utf-8").strip() + + +def get_bumped_package_version(increment: Optional[Increment] = None) -> str: + """Gets the bumped package version.""" + args: list[str] = ["uvx", "cz", "bump", "--get-next", "--yes", "--dry-run"] + if increment is not None: + args.extend(["--increment", increment]) + result: subprocess.CompletedProcess = subprocess.run(args, cwd=REPO_FOLDER, capture_output=True) + return result.stdout.decode("utf-8").strip() + + +def create_release_branch(new_version: str) -> None: + """Creates a release branch.""" + commands: list[list[str]] = [ + ["git", "status", "--porcelain"], + ["git", "branch", "-b", f"release/{new_version}", "develop"], + ["git", "checkout", f"release/{new_version}"], + ] + for command in commands: + subprocess.run(command, cwd=REPO_FOLDER, capture_output=True, check=True) + + +def bump_version(increment: Optional[Increment] = None) -> None: + """Bumps the package version.""" + bump_cmd: list[str] = ["uvx", "cz", "bump", "--yes", "--files-only", "--changelog"] + if increment is not None: + bump_cmd.extend(["--increment", increment]) + subprocess.run(bump_cmd, cwd=REPO_FOLDER, check=True) + + +def get_latest_tag() -> Optional[str]: + """Gets the latest git tag.""" + sort_tags: list[str] = ["git", "tag", "--sort=-creatordate"] + find_last: list[str] = ["grep", "-v", '"${GITHUB_REF_NAME}"'] + echo_none: list[str] = ["echo", "''"] + result: subprocess.CompletedProcess = subprocess.run( + [*sort_tags, "|", *find_last, "|", "tail", "-n1", "||", *echo_none], + cwd=REPO_FOLDER, + capture_output=True + ) + tag: str = result.stdout.decode("utf-8").strip() + if tag == "": + return None + return tag + + +def get_latest_release_notes() -> None: + """Gets the release notes. + + Assumes the latest_tag hasn't been applied yet. + """ + latest_tag: Optional[str] = get_latest_tag() + latest_version: str = get_package_version() + if latest_tag == latest_version: + raise ValueError( + "The latest tag and version are the same. Please ensure the release notes are taken before tagging." + ) + rev_range: str = latest_version if latest_tag is None else f"{latest_tag}..{latest_version}" + + result: subprocess.CompletedProcess = subprocess.run( + ["uvx", "cz", "changelog", rev_range, "--dry-run"], + cwd=REPO_FOLDER, + check=True + ) + return result.stdout.decode("utf-8") + + +def tag_release() -> None: + """Tags the release using commitizen bump with tag only.""" + subprocess.run(["uvx", "cz", "bump", "--tag-only", "--yes"], cwd=REPO_FOLDER, check=True) From cab740b44022b26da8c02ba0b2231d4a27887fca Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Tue, 8 Jul 2025 01:28:06 -0400 Subject: [PATCH 02/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 +-- .github/workflows/bump-version.yml | 37 +++++++++++++++++++++++++++- .github/workflows/release-github.yml | 24 ------------------ noxfile.py | 9 ++++++- scripts/get-release-notes.py | 17 +++++++++++++ scripts/util.py | 2 +- 7 files changed, 65 insertions(+), 30 deletions(-) delete mode 100644 .github/workflows/release-github.yml create mode 100644 scripts/get-release-notes.py diff --git a/.cookiecutter.json b/.cookiecutter.json index 78612f7..09c773e 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "34a57b81ff4263362669776636b30a8d051687a3", + "_commit": "9490ead9e72f2e78d421b5d791e64e312af7905d", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index 5e72ba8..0ab6d99 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "34a57b81ff4263362669776636b30a8d051687a3", + "commit": "9490ead9e72f2e78d421b5d791e64e312af7905d", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "34a57b81ff4263362669776636b30a8d051687a3" + "_commit": "9490ead9e72f2e78d421b5d791e64e312af7905d" } }, "directory": null diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index e542c4c..5935fec 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -7,9 +7,9 @@ on: jobs: bump-version: + name: "Bump version and create changelog with commitizen" if: "!startsWith(github.event.head_commit.message, 'bump:')" runs-on: ubuntu-latest - name: "Bump version and create changelog with commitizen" steps: - name: Check out uses: actions/checkout@v4 @@ -20,3 +20,38 @@ jobs: uses: commitizen-tools/commitizen-action@master with: github_token: ${{ secrets.GITHUB_TOKEN }} + changelog_increment_filename: body.md + + generate-release-notes: + name: "Generate Release Notes" + if: "startsWith(github.event.head_commit.message, 'bump:')" + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up uv + uses: astral-sh/setup-uv@v6 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version-file: ".github/workflows/.python-version" + + - name: Get Release Notes + run: uvx -s + + generate-release-draft: + name: "Generate Release Draft" + if: always() + needs: [bump-version, generate-release-notes] + runs-on: ubuntu-latest + steps: + - name: Release + uses: softprops/action-gh-release@v1 + with: + body_path: "body.md" + tag_name: ${{ env.REVISION }} + draft: "true" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-github.yml b/.github/workflows/release-github.yml deleted file mode 100644 index e5c4e9d..0000000 --- a/.github/workflows/release-github.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: release-github.yml -on: - - -jobs: - generate-release-notes: - if: "startsWith(github.event.head_commit.message, 'bump:')" - runs-on: ubuntu-latest - name: "Generate Release Notes" - steps: - - name: Create Release Notes - uses: commitizen-tools/commitizen-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - changelog: "false" - dry_run: "true" - changelog_increment_filename: body.md - - name: Release - uses: softprops/action-gh-release@v1 - with: - body_path: "body.md" - tag_name: ${{ env.REVISION }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/noxfile.py b/noxfile.py index 641b47b..2ab2392 100644 --- a/noxfile.py +++ b/noxfile.py @@ -193,7 +193,7 @@ def build_container(session: Session) -> None: session.log(f"Container image {project_image_name}:latest built locally.") -@nox.session(python=None, name="seutp-release", tags=[RELEASE]) +@nox.session(python=None, name="setup-release", tags=[RELEASE]) def setup_release(session: Session) -> None: """Prepares a release by creating a release branch and bumping the version. @@ -204,6 +204,13 @@ def setup_release(session: Session) -> None: session.run("python", SCRIPTS_FOLDER / "setup-release.py", external=True) +@nox.session(python=None, name="get-release-notes", tags=[RELEASE]) +def get_release_notes(session: Session) -> None: + """Gets the latest release notes if between bumping the version and tagging the release.""" + session.log("Getting release notes...") + session.run("python", SCRIPTS_FOLDER / "get-release-notes.py", external=True) + + @nox.session(python=None, tags=[RELEASE]) def release(session: Session) -> None: """Run the release process using Commitizen. diff --git a/scripts/get-release-notes.py b/scripts/get-release-notes.py new file mode 100644 index 0000000..f33475e --- /dev/null +++ b/scripts/get-release-notes.py @@ -0,0 +1,17 @@ +"""Script responsible for getting the release notes of the robust-python-demo package.""" +from pathlib import Path + +from util import get_latest_release_notes + + +RELEASE_NOTES_PATH: Path = Path("body.md") + + +def main() -> None: + """Parses args and passes through to bump_version.""" + release_notes: str = get_latest_release_notes() + RELEASE_NOTES_PATH.write_text(release_notes) + + +if __name__ == "__main__": + main() diff --git a/scripts/util.py b/scripts/util.py index 3e11775..dec9c41 100644 --- a/scripts/util.py +++ b/scripts/util.py @@ -113,7 +113,7 @@ def get_latest_tag() -> Optional[str]: return tag -def get_latest_release_notes() -> None: +def get_latest_release_notes() -> str: """Gets the release notes. Assumes the latest_tag hasn't been applied yet. From 2079b48a9dccdd7362072fb7597c700cb4142841 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Tue, 8 Jul 2025 01:30:39 -0400 Subject: [PATCH 03/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- scripts/util.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index 09c773e..400203e 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "9490ead9e72f2e78d421b5d791e64e312af7905d", + "_commit": "28cf872a70bdeafd3f65c7b78935e85518df5f0a", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index 0ab6d99..aa6c353 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "9490ead9e72f2e78d421b5d791e64e312af7905d", + "commit": "28cf872a70bdeafd3f65c7b78935e85518df5f0a", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "9490ead9e72f2e78d421b5d791e64e312af7905d" + "_commit": "28cf872a70bdeafd3f65c7b78935e85518df5f0a" } }, "directory": null diff --git a/scripts/util.py b/scripts/util.py index dec9c41..9e98238 100644 --- a/scripts/util.py +++ b/scripts/util.py @@ -8,7 +8,7 @@ from typing import Callable from typing import Literal from typing import Optional -from typing import TypeAlias +from typing_extensions import TypeAlias REPO_FOLDER: Path = Path(__file__).resolve().parent.parent From 087ac97b049b97027fdc06964163831da4bbd826 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Tue, 8 Jul 2025 01:37:22 -0400 Subject: [PATCH 04/44] chore: update demo to the latest cookiecutter-robust-python --- pyproject.toml | 3 ++- uv.lock | 30 +++++++++++------------------- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c644ea1..5805ea5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,8 @@ classifiers = [ dependencies = [ "loguru>=0.7.3", "platformdirs>=4.3.8", - "typer>=0.15.4" + "typer>=0.15.4", + "typing-extensions>=4.13.2", ] [dependency-groups] diff --git a/uv.lock b/uv.lock index 53a48bb..26a8606 100644 --- a/uv.lock +++ b/uv.lock @@ -935,18 +935,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/6d/0e/8601d2331dea0825f3be769688b48a95f387a83c918cca6a8c9cee4b9eb7/py_serializable-2.0.0-py3-none-any.whl", hash = "sha256:1721e4c0368adeec965c183168da4b912024702f19e15e13f8577098b9a4f8fe", size = 22824, upload-time = "2025-02-09T13:41:54.236Z" }, ] -[[package]] -name = "pydocstyle" -version = "6.3.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "snowballstemmer" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/e9/5c/d5385ca59fd065e3c6a5fe19f9bc9d5ea7f2509fa8c9c22fb6b2031dd953/pydocstyle-6.3.0.tar.gz", hash = "sha256:7ce43f0c0ac87b07494eb9c0b462c0b73e6ff276807f204d6b53edc72b7e44e1", size = 36796, upload-time = "2023-01-17T20:29:19.838Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/36/ea/99ddefac41971acad68f14114f38261c1f27dac0b3ec529824ebc739bdaa/pydocstyle-6.3.0-py3-none-any.whl", hash = "sha256:118762d452a49d6b05e194ef344a55822987a462831ade91ec5c06fd2169d019", size = 38038, upload-time = "2023-01-17T20:29:18.094Z" }, -] - [[package]] name = "pygments" version = "2.19.1" @@ -1110,24 +1098,26 @@ dependencies = [ { name = "loguru" }, { name = "platformdirs" }, { name = "typer" }, + { name = "typing-extensions" }, ] [package.dev-dependencies] dev = [ { name = "bandit" }, { name = "commitizen" }, - { name = "furo" }, - { name = "myst-parser", version = "3.0.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "myst-parser", version = "4.0.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, { name = "nox" }, { name = "pip-audit" }, { name = "pre-commit" }, { name = "pre-commit-hooks" }, - { name = "pydocstyle" }, { name = "pyright" }, { name = "pytest" }, { name = "pytest-cov" }, { name = "ruff" }, +] +docs = [ + { name = "furo" }, + { name = "myst-parser", version = "3.0.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, + { name = "myst-parser", version = "4.0.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, { name = "sphinx", version = "7.4.7", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, { name = "sphinx", version = "8.1.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.10.*'" }, { name = "sphinx", version = "8.2.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, @@ -1144,23 +1134,25 @@ requires-dist = [ { name = "loguru", specifier = ">=0.7.3" }, { name = "platformdirs", specifier = ">=4.3.8" }, { name = "typer", specifier = ">=0.15.4" }, + { name = "typing-extensions", specifier = ">=4.13.2" }, ] [package.metadata.requires-dev] dev = [ { name = "bandit", specifier = ">=1.8.3" }, { name = "commitizen", specifier = ">=4.7.0" }, - { name = "furo", specifier = ">=2024.8.6" }, - { name = "myst-parser", specifier = ">=3.0.1" }, { name = "nox", specifier = ">=2025.5.1" }, { name = "pip-audit", specifier = ">=2.9.0" }, { name = "pre-commit", specifier = ">=4.2.0" }, { name = "pre-commit-hooks", specifier = ">=5.0.0" }, - { name = "pydocstyle", specifier = ">=6.3.0" }, { name = "pyright", specifier = ">=1.1.400" }, { name = "pytest", specifier = ">=8.3.5" }, { name = "pytest-cov", specifier = ">=6.1.1" }, { name = "ruff", specifier = ">=0.11.9" }, +] +docs = [ + { name = "furo", specifier = ">=2024.8.6" }, + { name = "myst-parser", specifier = ">=3.0.1" }, { name = "sphinx", specifier = ">=7.4.7" }, { name = "sphinx-autodoc-typehints", specifier = ">=2.3.0" }, { name = "sphinx-copybutton", specifier = ">=0.5.2" }, From 907a3543c87787487545359498e005a7ffc80c87 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Tue, 8 Jul 2025 01:38:04 -0400 Subject: [PATCH 05/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- pyproject.toml | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index 400203e..20df2ba 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "28cf872a70bdeafd3f65c7b78935e85518df5f0a", + "_commit": "23c99cf2cbbcf6d9712b7c37f77844e6e964fe04", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index aa6c353..1819029 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "28cf872a70bdeafd3f65c7b78935e85518df5f0a", + "commit": "23c99cf2cbbcf6d9712b7c37f77844e6e964fe04", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "28cf872a70bdeafd3f65c7b78935e85518df5f0a" + "_commit": "23c99cf2cbbcf6d9712b7c37f77844e6e964fe04" } }, "directory": null diff --git a/pyproject.toml b/pyproject.toml index 5805ea5..ce28e86 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,11 @@ dependencies = [ "loguru>=0.7.3", "platformdirs>=4.3.8", "typer>=0.15.4", +<<<<<<< ours "typing-extensions>=4.13.2", +======= + "typing-extensions>=4.13.2" +>>>>>>> theirs ] [dependency-groups] From 12c62ac41d235bb4616846a8b43aa831bbe7d8d7 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Tue, 8 Jul 2025 01:38:04 -0400 Subject: [PATCH 06/44] chore: update demo to the latest cookiecutter-robust-python --- pyproject.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ce28e86..4cca1be 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,11 +20,7 @@ dependencies = [ "loguru>=0.7.3", "platformdirs>=4.3.8", "typer>=0.15.4", -<<<<<<< ours - "typing-extensions>=4.13.2", -======= "typing-extensions>=4.13.2" ->>>>>>> theirs ] [dependency-groups] From c53cbd5c235943f3f36ec55a5222c643e76784bb Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Tue, 8 Jul 2025 22:19:35 -0400 Subject: [PATCH 07/44] chore: update demo to the latest cookiecutter-robust-python --- noxfile.py | 4 +++- scripts/util.py | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/noxfile.py b/noxfile.py index 2ab2392..6943560 100644 --- a/noxfile.py +++ b/noxfile.py @@ -193,7 +193,7 @@ def build_container(session: Session) -> None: session.log(f"Container image {project_image_name}:latest built locally.") -@nox.session(python=None, name="setup-release", tags=[RELEASE]) +@nox.session(python=False, name="setup-release", tags=[RELEASE]) def setup_release(session: Session) -> None: """Prepares a release by creating a release branch and bumping the version. @@ -208,6 +208,8 @@ def setup_release(session: Session) -> None: def get_release_notes(session: Session) -> None: """Gets the latest release notes if between bumping the version and tagging the release.""" session.log("Getting release notes...") + session.install("-e", ".", "--group", "dev") + session.install("typing_extensions") session.run("python", SCRIPTS_FOLDER / "get-release-notes.py", external=True) diff --git a/scripts/util.py b/scripts/util.py index 9e98238..8698766 100644 --- a/scripts/util.py +++ b/scripts/util.py @@ -3,11 +3,14 @@ import argparse import stat import subprocess +import sys from pathlib import Path from typing import Any from typing import Callable from typing import Literal from typing import Optional +print(sys.version_info) +print(sys.executable) from typing_extensions import TypeAlias From d3ab3e30fcb40a6d7da87ace2ddd82327bcb196d Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Tue, 8 Jul 2025 22:20:03 -0400 Subject: [PATCH 08/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- noxfile.py | 26 +++++++++++++++----------- scripts/setup-release.py | 4 +++- 4 files changed, 21 insertions(+), 15 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index 20df2ba..7dfe4d4 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "23c99cf2cbbcf6d9712b7c37f77844e6e964fe04", + "_commit": "3fe6276285c66293f418a38abcdb8785d8fe5012", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index 1819029..6445551 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "23c99cf2cbbcf6d9712b7c37f77844e6e964fe04", + "commit": "3fe6276285c66293f418a38abcdb8785d8fe5012", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "23c99cf2cbbcf6d9712b7c37f77844e6e964fe04" + "_commit": "3fe6276285c66293f418a38abcdb8785d8fe5012" } }, "directory": null diff --git a/noxfile.py b/noxfile.py index 6943560..ac7516a 100644 --- a/noxfile.py +++ b/noxfile.py @@ -47,13 +47,13 @@ RUST: str = "rust" -@nox.session(python=None, name="setup-git", tags=[ENV]) +@nox.session(python=False, name="setup-git", tags=[ENV]) def setup_git(session: Session) -> None: """Set up the git repo for the current project.""" session.run("python", SCRIPTS_FOLDER / "setup-git.py", REPO_ROOT, external=True) -@nox.session(python=None, name="setup-venv", tags=[ENV]) +@nox.session(python=False, name="setup-venv", tags=[ENV]) def setup_venv(session: Session) -> None: """Set up the virtual environment for the current project.""" session.run("python", SCRIPTS_FOLDER / "setup-venv.py", REPO_ROOT, "-p", PYTHON_VERSIONS[0], external=True) @@ -72,14 +72,14 @@ def precommit(session: Session) -> None: activate_virtualenv_in_precommit_hooks(session) -@nox.session(python=None, name="format-python", tags=[FORMAT, PYTHON]) +@nox.session(python=False, name="format-python", tags=[FORMAT, PYTHON]) def format_python(session: Session) -> None: """Run Python code formatter (Ruff format).""" session.log(f"Running Ruff formatter check with py{session.python}.") session.run("uvx", "ruff", "format", *session.posargs) -@nox.session(python=None, name="lint-python", tags=[LINT, PYTHON]) +@nox.session(python=False, name="lint-python", tags=[LINT, PYTHON]) def lint_python(session: Session) -> None: """Run Python code linters (Ruff check, Pydocstyle rules).""" session.log(f"Running Ruff check with py{session.python}.") @@ -96,7 +96,7 @@ def typecheck(session: Session) -> None: session.run("pyright", "--pythonversion", session.python) -@nox.session(python=None, name="security-python", tags=[SECURITY, PYTHON, CI]) +@nox.session(python=False, name="security-python", tags=[SECURITY, PYTHON, CI]) def security_python(session: Session) -> None: """Run code security checks (Bandit) on Python code.""" session.log(f"Running Bandit static security analysis with py{session.python}.") @@ -144,7 +144,7 @@ def docs_build(session: Session) -> None: session.run("sphinx-build", "-b", "html", "docs", str(docs_build_dir), "-W") -@nox.session(python=None, name="build-python", tags=[BUILD, PYTHON]) +@nox.session(python=False, name="build-python", tags=[BUILD, PYTHON]) def build_python(session: Session) -> None: """Build sdist and wheel packages (uv build).""" session.log(f"Building sdist and wheel packages with py{session.python}.") @@ -154,7 +154,7 @@ def build_python(session: Session) -> None: session.log(f"- {path.name}") -@nox.session(python=None, name="build-container", tags=[BUILD]) +@nox.session(python=False, name="build-container", tags=[BUILD]) def build_container(session: Session) -> None: """Build the Docker container image. @@ -204,16 +204,20 @@ def setup_release(session: Session) -> None: session.run("python", SCRIPTS_FOLDER / "setup-release.py", external=True) -@nox.session(python=None, name="get-release-notes", tags=[RELEASE]) +@nox.session(python=False, name="get-release-notes", tags=[RELEASE]) def get_release_notes(session: Session) -> None: """Gets the latest release notes if between bumping the version and tagging the release.""" session.log("Getting release notes...") +<<<<<<< ours session.install("-e", ".", "--group", "dev") session.install("typing_extensions") session.run("python", SCRIPTS_FOLDER / "get-release-notes.py", external=True) +======= + session.run("python", SCRIPTS_FOLDER / "get-release-notes.py", *session.posargs, external=True) +>>>>>>> theirs -@nox.session(python=None, tags=[RELEASE]) +@nox.session(python=False, tags=[RELEASE]) def release(session: Session) -> None: """Run the release process using Commitizen. @@ -248,7 +252,7 @@ def release(session: Session) -> None: session.log("IMPORTANT: Push commits and tags to remote (`git push --follow-tags`) to trigger CD pipeline.") -@nox.session(python=None, name="publish-python", tags=[RELEASE]) +@nox.session(python=False, name="publish-python", tags=[RELEASE]) def publish_python(session: Session) -> None: """Publish sdist and wheel packages to PyPI via uv publish. @@ -262,7 +266,7 @@ def publish_python(session: Session) -> None: session.run("uv", "publish", "dist/*", *session.posargs, external=True) -@nox.session(python=None) +@nox.session(python=False) def tox(session: Session) -> None: """Run the 'tox' test matrix. diff --git a/scripts/setup-release.py b/scripts/setup-release.py index e7fa78e..8e4331b 100644 --- a/scripts/setup-release.py +++ b/scripts/setup-release.py @@ -26,9 +26,11 @@ def get_parser() -> argparse.ArgumentParser: ) parser.add_argument( "increment", + nargs="?", + default=None, type=str, help="Increment type to use when preparing the release.", - choices=["major", "minor", "patch", "prerelease"], + choices=["MAJOR", "MINOR", "PATCH", "PRERELEASE"], ) return parser From acdc477ae311b519aab65e5201aa72cacb009434 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Tue, 8 Jul 2025 22:21:46 -0400 Subject: [PATCH 09/44] Revert "chore: update demo to the latest cookiecutter-robust-python" This reverts commit d3ab3e30fcb40a6d7da87ace2ddd82327bcb196d. --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- noxfile.py | 26 +++++++++++--------------- scripts/setup-release.py | 4 +--- 4 files changed, 15 insertions(+), 21 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index 7dfe4d4..20df2ba 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "3fe6276285c66293f418a38abcdb8785d8fe5012", + "_commit": "23c99cf2cbbcf6d9712b7c37f77844e6e964fe04", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index 6445551..1819029 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "3fe6276285c66293f418a38abcdb8785d8fe5012", + "commit": "23c99cf2cbbcf6d9712b7c37f77844e6e964fe04", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "3fe6276285c66293f418a38abcdb8785d8fe5012" + "_commit": "23c99cf2cbbcf6d9712b7c37f77844e6e964fe04" } }, "directory": null diff --git a/noxfile.py b/noxfile.py index ac7516a..6943560 100644 --- a/noxfile.py +++ b/noxfile.py @@ -47,13 +47,13 @@ RUST: str = "rust" -@nox.session(python=False, name="setup-git", tags=[ENV]) +@nox.session(python=None, name="setup-git", tags=[ENV]) def setup_git(session: Session) -> None: """Set up the git repo for the current project.""" session.run("python", SCRIPTS_FOLDER / "setup-git.py", REPO_ROOT, external=True) -@nox.session(python=False, name="setup-venv", tags=[ENV]) +@nox.session(python=None, name="setup-venv", tags=[ENV]) def setup_venv(session: Session) -> None: """Set up the virtual environment for the current project.""" session.run("python", SCRIPTS_FOLDER / "setup-venv.py", REPO_ROOT, "-p", PYTHON_VERSIONS[0], external=True) @@ -72,14 +72,14 @@ def precommit(session: Session) -> None: activate_virtualenv_in_precommit_hooks(session) -@nox.session(python=False, name="format-python", tags=[FORMAT, PYTHON]) +@nox.session(python=None, name="format-python", tags=[FORMAT, PYTHON]) def format_python(session: Session) -> None: """Run Python code formatter (Ruff format).""" session.log(f"Running Ruff formatter check with py{session.python}.") session.run("uvx", "ruff", "format", *session.posargs) -@nox.session(python=False, name="lint-python", tags=[LINT, PYTHON]) +@nox.session(python=None, name="lint-python", tags=[LINT, PYTHON]) def lint_python(session: Session) -> None: """Run Python code linters (Ruff check, Pydocstyle rules).""" session.log(f"Running Ruff check with py{session.python}.") @@ -96,7 +96,7 @@ def typecheck(session: Session) -> None: session.run("pyright", "--pythonversion", session.python) -@nox.session(python=False, name="security-python", tags=[SECURITY, PYTHON, CI]) +@nox.session(python=None, name="security-python", tags=[SECURITY, PYTHON, CI]) def security_python(session: Session) -> None: """Run code security checks (Bandit) on Python code.""" session.log(f"Running Bandit static security analysis with py{session.python}.") @@ -144,7 +144,7 @@ def docs_build(session: Session) -> None: session.run("sphinx-build", "-b", "html", "docs", str(docs_build_dir), "-W") -@nox.session(python=False, name="build-python", tags=[BUILD, PYTHON]) +@nox.session(python=None, name="build-python", tags=[BUILD, PYTHON]) def build_python(session: Session) -> None: """Build sdist and wheel packages (uv build).""" session.log(f"Building sdist and wheel packages with py{session.python}.") @@ -154,7 +154,7 @@ def build_python(session: Session) -> None: session.log(f"- {path.name}") -@nox.session(python=False, name="build-container", tags=[BUILD]) +@nox.session(python=None, name="build-container", tags=[BUILD]) def build_container(session: Session) -> None: """Build the Docker container image. @@ -204,20 +204,16 @@ def setup_release(session: Session) -> None: session.run("python", SCRIPTS_FOLDER / "setup-release.py", external=True) -@nox.session(python=False, name="get-release-notes", tags=[RELEASE]) +@nox.session(python=None, name="get-release-notes", tags=[RELEASE]) def get_release_notes(session: Session) -> None: """Gets the latest release notes if between bumping the version and tagging the release.""" session.log("Getting release notes...") -<<<<<<< ours session.install("-e", ".", "--group", "dev") session.install("typing_extensions") session.run("python", SCRIPTS_FOLDER / "get-release-notes.py", external=True) -======= - session.run("python", SCRIPTS_FOLDER / "get-release-notes.py", *session.posargs, external=True) ->>>>>>> theirs -@nox.session(python=False, tags=[RELEASE]) +@nox.session(python=None, tags=[RELEASE]) def release(session: Session) -> None: """Run the release process using Commitizen. @@ -252,7 +248,7 @@ def release(session: Session) -> None: session.log("IMPORTANT: Push commits and tags to remote (`git push --follow-tags`) to trigger CD pipeline.") -@nox.session(python=False, name="publish-python", tags=[RELEASE]) +@nox.session(python=None, name="publish-python", tags=[RELEASE]) def publish_python(session: Session) -> None: """Publish sdist and wheel packages to PyPI via uv publish. @@ -266,7 +262,7 @@ def publish_python(session: Session) -> None: session.run("uv", "publish", "dist/*", *session.posargs, external=True) -@nox.session(python=False) +@nox.session(python=None) def tox(session: Session) -> None: """Run the 'tox' test matrix. diff --git a/scripts/setup-release.py b/scripts/setup-release.py index 8e4331b..e7fa78e 100644 --- a/scripts/setup-release.py +++ b/scripts/setup-release.py @@ -26,11 +26,9 @@ def get_parser() -> argparse.ArgumentParser: ) parser.add_argument( "increment", - nargs="?", - default=None, type=str, help="Increment type to use when preparing the release.", - choices=["MAJOR", "MINOR", "PATCH", "PRERELEASE"], + choices=["major", "minor", "patch", "prerelease"], ) return parser From 0dc4578b9d876920a81dcda2294c043565db4dc3 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Tue, 8 Jul 2025 22:22:12 -0400 Subject: [PATCH 10/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- noxfile.py | 26 +++++++++++++++----------- scripts/setup-release.py | 4 +++- 4 files changed, 21 insertions(+), 15 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index 20df2ba..7dfe4d4 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "23c99cf2cbbcf6d9712b7c37f77844e6e964fe04", + "_commit": "3fe6276285c66293f418a38abcdb8785d8fe5012", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index 1819029..6445551 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "23c99cf2cbbcf6d9712b7c37f77844e6e964fe04", + "commit": "3fe6276285c66293f418a38abcdb8785d8fe5012", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "23c99cf2cbbcf6d9712b7c37f77844e6e964fe04" + "_commit": "3fe6276285c66293f418a38abcdb8785d8fe5012" } }, "directory": null diff --git a/noxfile.py b/noxfile.py index 6943560..ac7516a 100644 --- a/noxfile.py +++ b/noxfile.py @@ -47,13 +47,13 @@ RUST: str = "rust" -@nox.session(python=None, name="setup-git", tags=[ENV]) +@nox.session(python=False, name="setup-git", tags=[ENV]) def setup_git(session: Session) -> None: """Set up the git repo for the current project.""" session.run("python", SCRIPTS_FOLDER / "setup-git.py", REPO_ROOT, external=True) -@nox.session(python=None, name="setup-venv", tags=[ENV]) +@nox.session(python=False, name="setup-venv", tags=[ENV]) def setup_venv(session: Session) -> None: """Set up the virtual environment for the current project.""" session.run("python", SCRIPTS_FOLDER / "setup-venv.py", REPO_ROOT, "-p", PYTHON_VERSIONS[0], external=True) @@ -72,14 +72,14 @@ def precommit(session: Session) -> None: activate_virtualenv_in_precommit_hooks(session) -@nox.session(python=None, name="format-python", tags=[FORMAT, PYTHON]) +@nox.session(python=False, name="format-python", tags=[FORMAT, PYTHON]) def format_python(session: Session) -> None: """Run Python code formatter (Ruff format).""" session.log(f"Running Ruff formatter check with py{session.python}.") session.run("uvx", "ruff", "format", *session.posargs) -@nox.session(python=None, name="lint-python", tags=[LINT, PYTHON]) +@nox.session(python=False, name="lint-python", tags=[LINT, PYTHON]) def lint_python(session: Session) -> None: """Run Python code linters (Ruff check, Pydocstyle rules).""" session.log(f"Running Ruff check with py{session.python}.") @@ -96,7 +96,7 @@ def typecheck(session: Session) -> None: session.run("pyright", "--pythonversion", session.python) -@nox.session(python=None, name="security-python", tags=[SECURITY, PYTHON, CI]) +@nox.session(python=False, name="security-python", tags=[SECURITY, PYTHON, CI]) def security_python(session: Session) -> None: """Run code security checks (Bandit) on Python code.""" session.log(f"Running Bandit static security analysis with py{session.python}.") @@ -144,7 +144,7 @@ def docs_build(session: Session) -> None: session.run("sphinx-build", "-b", "html", "docs", str(docs_build_dir), "-W") -@nox.session(python=None, name="build-python", tags=[BUILD, PYTHON]) +@nox.session(python=False, name="build-python", tags=[BUILD, PYTHON]) def build_python(session: Session) -> None: """Build sdist and wheel packages (uv build).""" session.log(f"Building sdist and wheel packages with py{session.python}.") @@ -154,7 +154,7 @@ def build_python(session: Session) -> None: session.log(f"- {path.name}") -@nox.session(python=None, name="build-container", tags=[BUILD]) +@nox.session(python=False, name="build-container", tags=[BUILD]) def build_container(session: Session) -> None: """Build the Docker container image. @@ -204,16 +204,20 @@ def setup_release(session: Session) -> None: session.run("python", SCRIPTS_FOLDER / "setup-release.py", external=True) -@nox.session(python=None, name="get-release-notes", tags=[RELEASE]) +@nox.session(python=False, name="get-release-notes", tags=[RELEASE]) def get_release_notes(session: Session) -> None: """Gets the latest release notes if between bumping the version and tagging the release.""" session.log("Getting release notes...") +<<<<<<< ours session.install("-e", ".", "--group", "dev") session.install("typing_extensions") session.run("python", SCRIPTS_FOLDER / "get-release-notes.py", external=True) +======= + session.run("python", SCRIPTS_FOLDER / "get-release-notes.py", *session.posargs, external=True) +>>>>>>> theirs -@nox.session(python=None, tags=[RELEASE]) +@nox.session(python=False, tags=[RELEASE]) def release(session: Session) -> None: """Run the release process using Commitizen. @@ -248,7 +252,7 @@ def release(session: Session) -> None: session.log("IMPORTANT: Push commits and tags to remote (`git push --follow-tags`) to trigger CD pipeline.") -@nox.session(python=None, name="publish-python", tags=[RELEASE]) +@nox.session(python=False, name="publish-python", tags=[RELEASE]) def publish_python(session: Session) -> None: """Publish sdist and wheel packages to PyPI via uv publish. @@ -262,7 +266,7 @@ def publish_python(session: Session) -> None: session.run("uv", "publish", "dist/*", *session.posargs, external=True) -@nox.session(python=None) +@nox.session(python=False) def tox(session: Session) -> None: """Run the 'tox' test matrix. diff --git a/scripts/setup-release.py b/scripts/setup-release.py index e7fa78e..8e4331b 100644 --- a/scripts/setup-release.py +++ b/scripts/setup-release.py @@ -26,9 +26,11 @@ def get_parser() -> argparse.ArgumentParser: ) parser.add_argument( "increment", + nargs="?", + default=None, type=str, help="Increment type to use when preparing the release.", - choices=["major", "minor", "patch", "prerelease"], + choices=["MAJOR", "MINOR", "PATCH", "PRERELEASE"], ) return parser From d296d490573b7b5b81ffc49b89faf285d1b313d6 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Tue, 8 Jul 2025 22:22:31 -0400 Subject: [PATCH 11/44] Revert "chore: update demo to the latest cookiecutter-robust-python" This reverts commit 0dc4578b9d876920a81dcda2294c043565db4dc3. --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- noxfile.py | 26 +++++++++++--------------- scripts/setup-release.py | 4 +--- 4 files changed, 15 insertions(+), 21 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index 7dfe4d4..20df2ba 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "3fe6276285c66293f418a38abcdb8785d8fe5012", + "_commit": "23c99cf2cbbcf6d9712b7c37f77844e6e964fe04", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index 6445551..1819029 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "3fe6276285c66293f418a38abcdb8785d8fe5012", + "commit": "23c99cf2cbbcf6d9712b7c37f77844e6e964fe04", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "3fe6276285c66293f418a38abcdb8785d8fe5012" + "_commit": "23c99cf2cbbcf6d9712b7c37f77844e6e964fe04" } }, "directory": null diff --git a/noxfile.py b/noxfile.py index ac7516a..6943560 100644 --- a/noxfile.py +++ b/noxfile.py @@ -47,13 +47,13 @@ RUST: str = "rust" -@nox.session(python=False, name="setup-git", tags=[ENV]) +@nox.session(python=None, name="setup-git", tags=[ENV]) def setup_git(session: Session) -> None: """Set up the git repo for the current project.""" session.run("python", SCRIPTS_FOLDER / "setup-git.py", REPO_ROOT, external=True) -@nox.session(python=False, name="setup-venv", tags=[ENV]) +@nox.session(python=None, name="setup-venv", tags=[ENV]) def setup_venv(session: Session) -> None: """Set up the virtual environment for the current project.""" session.run("python", SCRIPTS_FOLDER / "setup-venv.py", REPO_ROOT, "-p", PYTHON_VERSIONS[0], external=True) @@ -72,14 +72,14 @@ def precommit(session: Session) -> None: activate_virtualenv_in_precommit_hooks(session) -@nox.session(python=False, name="format-python", tags=[FORMAT, PYTHON]) +@nox.session(python=None, name="format-python", tags=[FORMAT, PYTHON]) def format_python(session: Session) -> None: """Run Python code formatter (Ruff format).""" session.log(f"Running Ruff formatter check with py{session.python}.") session.run("uvx", "ruff", "format", *session.posargs) -@nox.session(python=False, name="lint-python", tags=[LINT, PYTHON]) +@nox.session(python=None, name="lint-python", tags=[LINT, PYTHON]) def lint_python(session: Session) -> None: """Run Python code linters (Ruff check, Pydocstyle rules).""" session.log(f"Running Ruff check with py{session.python}.") @@ -96,7 +96,7 @@ def typecheck(session: Session) -> None: session.run("pyright", "--pythonversion", session.python) -@nox.session(python=False, name="security-python", tags=[SECURITY, PYTHON, CI]) +@nox.session(python=None, name="security-python", tags=[SECURITY, PYTHON, CI]) def security_python(session: Session) -> None: """Run code security checks (Bandit) on Python code.""" session.log(f"Running Bandit static security analysis with py{session.python}.") @@ -144,7 +144,7 @@ def docs_build(session: Session) -> None: session.run("sphinx-build", "-b", "html", "docs", str(docs_build_dir), "-W") -@nox.session(python=False, name="build-python", tags=[BUILD, PYTHON]) +@nox.session(python=None, name="build-python", tags=[BUILD, PYTHON]) def build_python(session: Session) -> None: """Build sdist and wheel packages (uv build).""" session.log(f"Building sdist and wheel packages with py{session.python}.") @@ -154,7 +154,7 @@ def build_python(session: Session) -> None: session.log(f"- {path.name}") -@nox.session(python=False, name="build-container", tags=[BUILD]) +@nox.session(python=None, name="build-container", tags=[BUILD]) def build_container(session: Session) -> None: """Build the Docker container image. @@ -204,20 +204,16 @@ def setup_release(session: Session) -> None: session.run("python", SCRIPTS_FOLDER / "setup-release.py", external=True) -@nox.session(python=False, name="get-release-notes", tags=[RELEASE]) +@nox.session(python=None, name="get-release-notes", tags=[RELEASE]) def get_release_notes(session: Session) -> None: """Gets the latest release notes if between bumping the version and tagging the release.""" session.log("Getting release notes...") -<<<<<<< ours session.install("-e", ".", "--group", "dev") session.install("typing_extensions") session.run("python", SCRIPTS_FOLDER / "get-release-notes.py", external=True) -======= - session.run("python", SCRIPTS_FOLDER / "get-release-notes.py", *session.posargs, external=True) ->>>>>>> theirs -@nox.session(python=False, tags=[RELEASE]) +@nox.session(python=None, tags=[RELEASE]) def release(session: Session) -> None: """Run the release process using Commitizen. @@ -252,7 +248,7 @@ def release(session: Session) -> None: session.log("IMPORTANT: Push commits and tags to remote (`git push --follow-tags`) to trigger CD pipeline.") -@nox.session(python=False, name="publish-python", tags=[RELEASE]) +@nox.session(python=None, name="publish-python", tags=[RELEASE]) def publish_python(session: Session) -> None: """Publish sdist and wheel packages to PyPI via uv publish. @@ -266,7 +262,7 @@ def publish_python(session: Session) -> None: session.run("uv", "publish", "dist/*", *session.posargs, external=True) -@nox.session(python=False) +@nox.session(python=None) def tox(session: Session) -> None: """Run the 'tox' test matrix. diff --git a/scripts/setup-release.py b/scripts/setup-release.py index 8e4331b..e7fa78e 100644 --- a/scripts/setup-release.py +++ b/scripts/setup-release.py @@ -26,11 +26,9 @@ def get_parser() -> argparse.ArgumentParser: ) parser.add_argument( "increment", - nargs="?", - default=None, type=str, help="Increment type to use when preparing the release.", - choices=["MAJOR", "MINOR", "PATCH", "PRERELEASE"], + choices=["major", "minor", "patch", "prerelease"], ) return parser From bc74943019125bd1d51c6420600b4f1dcc5d1328 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Tue, 8 Jul 2025 22:23:37 -0400 Subject: [PATCH 12/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- noxfile.py | 26 +++++++++++++++----------- scripts/setup-release.py | 4 +++- 4 files changed, 21 insertions(+), 15 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index 20df2ba..7dfe4d4 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "23c99cf2cbbcf6d9712b7c37f77844e6e964fe04", + "_commit": "3fe6276285c66293f418a38abcdb8785d8fe5012", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index 1819029..6445551 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "23c99cf2cbbcf6d9712b7c37f77844e6e964fe04", + "commit": "3fe6276285c66293f418a38abcdb8785d8fe5012", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "23c99cf2cbbcf6d9712b7c37f77844e6e964fe04" + "_commit": "3fe6276285c66293f418a38abcdb8785d8fe5012" } }, "directory": null diff --git a/noxfile.py b/noxfile.py index 6943560..ac7516a 100644 --- a/noxfile.py +++ b/noxfile.py @@ -47,13 +47,13 @@ RUST: str = "rust" -@nox.session(python=None, name="setup-git", tags=[ENV]) +@nox.session(python=False, name="setup-git", tags=[ENV]) def setup_git(session: Session) -> None: """Set up the git repo for the current project.""" session.run("python", SCRIPTS_FOLDER / "setup-git.py", REPO_ROOT, external=True) -@nox.session(python=None, name="setup-venv", tags=[ENV]) +@nox.session(python=False, name="setup-venv", tags=[ENV]) def setup_venv(session: Session) -> None: """Set up the virtual environment for the current project.""" session.run("python", SCRIPTS_FOLDER / "setup-venv.py", REPO_ROOT, "-p", PYTHON_VERSIONS[0], external=True) @@ -72,14 +72,14 @@ def precommit(session: Session) -> None: activate_virtualenv_in_precommit_hooks(session) -@nox.session(python=None, name="format-python", tags=[FORMAT, PYTHON]) +@nox.session(python=False, name="format-python", tags=[FORMAT, PYTHON]) def format_python(session: Session) -> None: """Run Python code formatter (Ruff format).""" session.log(f"Running Ruff formatter check with py{session.python}.") session.run("uvx", "ruff", "format", *session.posargs) -@nox.session(python=None, name="lint-python", tags=[LINT, PYTHON]) +@nox.session(python=False, name="lint-python", tags=[LINT, PYTHON]) def lint_python(session: Session) -> None: """Run Python code linters (Ruff check, Pydocstyle rules).""" session.log(f"Running Ruff check with py{session.python}.") @@ -96,7 +96,7 @@ def typecheck(session: Session) -> None: session.run("pyright", "--pythonversion", session.python) -@nox.session(python=None, name="security-python", tags=[SECURITY, PYTHON, CI]) +@nox.session(python=False, name="security-python", tags=[SECURITY, PYTHON, CI]) def security_python(session: Session) -> None: """Run code security checks (Bandit) on Python code.""" session.log(f"Running Bandit static security analysis with py{session.python}.") @@ -144,7 +144,7 @@ def docs_build(session: Session) -> None: session.run("sphinx-build", "-b", "html", "docs", str(docs_build_dir), "-W") -@nox.session(python=None, name="build-python", tags=[BUILD, PYTHON]) +@nox.session(python=False, name="build-python", tags=[BUILD, PYTHON]) def build_python(session: Session) -> None: """Build sdist and wheel packages (uv build).""" session.log(f"Building sdist and wheel packages with py{session.python}.") @@ -154,7 +154,7 @@ def build_python(session: Session) -> None: session.log(f"- {path.name}") -@nox.session(python=None, name="build-container", tags=[BUILD]) +@nox.session(python=False, name="build-container", tags=[BUILD]) def build_container(session: Session) -> None: """Build the Docker container image. @@ -204,16 +204,20 @@ def setup_release(session: Session) -> None: session.run("python", SCRIPTS_FOLDER / "setup-release.py", external=True) -@nox.session(python=None, name="get-release-notes", tags=[RELEASE]) +@nox.session(python=False, name="get-release-notes", tags=[RELEASE]) def get_release_notes(session: Session) -> None: """Gets the latest release notes if between bumping the version and tagging the release.""" session.log("Getting release notes...") +<<<<<<< ours session.install("-e", ".", "--group", "dev") session.install("typing_extensions") session.run("python", SCRIPTS_FOLDER / "get-release-notes.py", external=True) +======= + session.run("python", SCRIPTS_FOLDER / "get-release-notes.py", *session.posargs, external=True) +>>>>>>> theirs -@nox.session(python=None, tags=[RELEASE]) +@nox.session(python=False, tags=[RELEASE]) def release(session: Session) -> None: """Run the release process using Commitizen. @@ -248,7 +252,7 @@ def release(session: Session) -> None: session.log("IMPORTANT: Push commits and tags to remote (`git push --follow-tags`) to trigger CD pipeline.") -@nox.session(python=None, name="publish-python", tags=[RELEASE]) +@nox.session(python=False, name="publish-python", tags=[RELEASE]) def publish_python(session: Session) -> None: """Publish sdist and wheel packages to PyPI via uv publish. @@ -262,7 +266,7 @@ def publish_python(session: Session) -> None: session.run("uv", "publish", "dist/*", *session.posargs, external=True) -@nox.session(python=None) +@nox.session(python=False) def tox(session: Session) -> None: """Run the 'tox' test matrix. diff --git a/scripts/setup-release.py b/scripts/setup-release.py index e7fa78e..8e4331b 100644 --- a/scripts/setup-release.py +++ b/scripts/setup-release.py @@ -26,9 +26,11 @@ def get_parser() -> argparse.ArgumentParser: ) parser.add_argument( "increment", + nargs="?", + default=None, type=str, help="Increment type to use when preparing the release.", - choices=["major", "minor", "patch", "prerelease"], + choices=["MAJOR", "MINOR", "PATCH", "PRERELEASE"], ) return parser From 49f6948957d1d16209ff870b1fa83e2aa6152ed1 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Tue, 8 Jul 2025 22:25:42 -0400 Subject: [PATCH 13/44] fix: resolve conflicts --- noxfile.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/noxfile.py b/noxfile.py index ac7516a..6604314 100644 --- a/noxfile.py +++ b/noxfile.py @@ -208,13 +208,7 @@ def setup_release(session: Session) -> None: def get_release_notes(session: Session) -> None: """Gets the latest release notes if between bumping the version and tagging the release.""" session.log("Getting release notes...") -<<<<<<< ours - session.install("-e", ".", "--group", "dev") - session.install("typing_extensions") - session.run("python", SCRIPTS_FOLDER / "get-release-notes.py", external=True) -======= session.run("python", SCRIPTS_FOLDER / "get-release-notes.py", *session.posargs, external=True) ->>>>>>> theirs @nox.session(python=False, tags=[RELEASE]) From 213a067adea8838c865db36bdaf0d726e5167953 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Tue, 8 Jul 2025 22:27:03 -0400 Subject: [PATCH 14/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- scripts/util.py | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index 7dfe4d4..0842ee3 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "3fe6276285c66293f418a38abcdb8785d8fe5012", + "_commit": "a77aa4d78cc34e55b4a187437d067ccd14657730", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index 6445551..0540d21 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "3fe6276285c66293f418a38abcdb8785d8fe5012", + "commit": "a77aa4d78cc34e55b4a187437d067ccd14657730", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "3fe6276285c66293f418a38abcdb8785d8fe5012" + "_commit": "a77aa4d78cc34e55b4a187437d067ccd14657730" } }, "directory": null diff --git a/scripts/util.py b/scripts/util.py index 8698766..65a16f4 100644 --- a/scripts/util.py +++ b/scripts/util.py @@ -7,17 +7,17 @@ from pathlib import Path from typing import Any from typing import Callable -from typing import Literal from typing import Optional +<<<<<<< ours print(sys.version_info) print(sys.executable) from typing_extensions import TypeAlias +======= +>>>>>>> theirs REPO_FOLDER: Path = Path(__file__).resolve().parent.parent -Increment: TypeAlias = Literal["MAJOR", "MINOR", "PATCH", "PRERELEASE"] - class MissingDependencyError(Exception): """Exception raised when a depedency is missing from the system running setup-repo.""" @@ -72,7 +72,7 @@ def get_package_version() -> str: return result.stdout.decode("utf-8").strip() -def get_bumped_package_version(increment: Optional[Increment] = None) -> str: +def get_bumped_package_version(increment: Optional[str] = None) -> str: """Gets the bumped package version.""" args: list[str] = ["uvx", "cz", "bump", "--get-next", "--yes", "--dry-run"] if increment is not None: @@ -92,7 +92,7 @@ def create_release_branch(new_version: str) -> None: subprocess.run(command, cwd=REPO_FOLDER, capture_output=True, check=True) -def bump_version(increment: Optional[Increment] = None) -> None: +def bump_version(increment: Optional[str] = None) -> None: """Bumps the package version.""" bump_cmd: list[str] = ["uvx", "cz", "bump", "--yes", "--files-only", "--changelog"] if increment is not None: From f9a6f8cb4cbc2be110b6a31436f16026ed6550e7 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Tue, 8 Jul 2025 22:29:16 -0400 Subject: [PATCH 15/44] fix: resolve conflicts --- scripts/util.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/scripts/util.py b/scripts/util.py index 65a16f4..ca7d986 100644 --- a/scripts/util.py +++ b/scripts/util.py @@ -3,17 +3,10 @@ import argparse import stat import subprocess -import sys from pathlib import Path from typing import Any from typing import Callable from typing import Optional -<<<<<<< ours -print(sys.version_info) -print(sys.executable) -from typing_extensions import TypeAlias -======= ->>>>>>> theirs REPO_FOLDER: Path = Path(__file__).resolve().parent.parent From eca20a3998ee8480a1a613cfb00aee50f3eb5182 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Tue, 8 Jul 2025 22:32:26 -0400 Subject: [PATCH 16/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- scripts/setup-release.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index 0842ee3..d3202ff 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "a77aa4d78cc34e55b4a187437d067ccd14657730", + "_commit": "753f227596fe689bb47dedc3de057d7dfa04e730", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index 0540d21..d4439fb 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "a77aa4d78cc34e55b4a187437d067ccd14657730", + "commit": "753f227596fe689bb47dedc3de057d7dfa04e730", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "a77aa4d78cc34e55b4a187437d067ccd14657730" + "_commit": "753f227596fe689bb47dedc3de057d7dfa04e730" } }, "directory": null diff --git a/scripts/setup-release.py b/scripts/setup-release.py index 8e4331b..3968658 100644 --- a/scripts/setup-release.py +++ b/scripts/setup-release.py @@ -41,7 +41,7 @@ def setup_release(increment: Optional[str] = None) -> None: Sets up a release branch from the branch develop, bumps the version, and creates a release commit. Does not tag the release or push any changes. """ - check_dependencies(path=REPO_FOLDER, dependencies=["git", "cz"]) + check_dependencies(path=REPO_FOLDER, dependencies=["git"]) current_version: str = get_package_version() new_version: str = get_bumped_package_version(increment=increment) From 9340c9500dc52677f5acb25be6383f2ff36cdab8 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Tue, 8 Jul 2025 22:39:32 -0400 Subject: [PATCH 17/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- scripts/util.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index d3202ff..ec94bd1 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "753f227596fe689bb47dedc3de057d7dfa04e730", + "_commit": "5b41872fc9214be197fe0973ccd870589ce18f77", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index d4439fb..a7e6058 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "753f227596fe689bb47dedc3de057d7dfa04e730", + "commit": "5b41872fc9214be197fe0973ccd870589ce18f77", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "753f227596fe689bb47dedc3de057d7dfa04e730" + "_commit": "5b41872fc9214be197fe0973ccd870589ce18f77" } }, "directory": null diff --git a/scripts/util.py b/scripts/util.py index ca7d986..e7bff75 100644 --- a/scripts/util.py +++ b/scripts/util.py @@ -67,7 +67,7 @@ def get_package_version() -> str: def get_bumped_package_version(increment: Optional[str] = None) -> str: """Gets the bumped package version.""" - args: list[str] = ["uvx", "cz", "bump", "--get-next", "--yes", "--dry-run"] + args: list[str] = ["uvx", "--with", "commitizen", "cz", "bump", "--get-next", "--yes", "--dry-run"] if increment is not None: args.extend(["--increment", increment]) result: subprocess.CompletedProcess = subprocess.run(args, cwd=REPO_FOLDER, capture_output=True) From e2028fcfe93d12f74d98fd663ef4990d6bcf94cd Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Tue, 8 Jul 2025 22:43:12 -0400 Subject: [PATCH 18/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- scripts/util.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index ec94bd1..e5ab255 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "5b41872fc9214be197fe0973ccd870589ce18f77", + "_commit": "8cc5fcc6ded1cd4e6fc748b0ed0acb7e664df367", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index a7e6058..08ca8a5 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "5b41872fc9214be197fe0973ccd870589ce18f77", + "commit": "8cc5fcc6ded1cd4e6fc748b0ed0acb7e664df367", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "5b41872fc9214be197fe0973ccd870589ce18f77" + "_commit": "8cc5fcc6ded1cd4e6fc748b0ed0acb7e664df367" } }, "directory": null diff --git a/scripts/util.py b/scripts/util.py index e7bff75..450412b 100644 --- a/scripts/util.py +++ b/scripts/util.py @@ -67,7 +67,7 @@ def get_package_version() -> str: def get_bumped_package_version(increment: Optional[str] = None) -> str: """Gets the bumped package version.""" - args: list[str] = ["uvx", "--with", "commitizen", "cz", "bump", "--get-next", "--yes", "--dry-run"] + args: list[str] = ["uvx", "--from", "commitizen", "cz", "bump", "--get-next", "--yes", "--dry-run"] if increment is not None: args.extend(["--increment", increment]) result: subprocess.CompletedProcess = subprocess.run(args, cwd=REPO_FOLDER, capture_output=True) From f144fec245e19a26ad8ca86b25eb292e53aa0cc5 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Tue, 8 Jul 2025 22:45:46 -0400 Subject: [PATCH 19/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- scripts/util.py | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index e5ab255..8e3d229 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "8cc5fcc6ded1cd4e6fc748b0ed0acb7e664df367", + "_commit": "25270e77695521310ba772b545dc194eeea1cb78", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index 08ca8a5..fe8647f 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "8cc5fcc6ded1cd4e6fc748b0ed0acb7e664df367", + "commit": "25270e77695521310ba772b545dc194eeea1cb78", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "8cc5fcc6ded1cd4e6fc748b0ed0acb7e664df367" + "_commit": "25270e77695521310ba772b545dc194eeea1cb78" } }, "directory": null diff --git a/scripts/util.py b/scripts/util.py index 450412b..3da8573 100644 --- a/scripts/util.py +++ b/scripts/util.py @@ -78,8 +78,7 @@ def create_release_branch(new_version: str) -> None: """Creates a release branch.""" commands: list[list[str]] = [ ["git", "status", "--porcelain"], - ["git", "branch", "-b", f"release/{new_version}", "develop"], - ["git", "checkout", f"release/{new_version}"], + ["git", "checkout", "-b", f"release/{new_version}", "develop"], ] for command in commands: subprocess.run(command, cwd=REPO_FOLDER, capture_output=True, check=True) From 6b9da7027bd9b8a19ddc6cb1abbb7e130778fffe Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Tue, 8 Jul 2025 22:50:29 -0400 Subject: [PATCH 20/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- scripts/util.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index 8e3d229..fa8487b 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "25270e77695521310ba772b545dc194eeea1cb78", + "_commit": "9a676e5ee83ad4144a0b988d63d9b7776cedbb5b", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index fe8647f..d178181 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "25270e77695521310ba772b545dc194eeea1cb78", + "commit": "9a676e5ee83ad4144a0b988d63d9b7776cedbb5b", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "25270e77695521310ba772b545dc194eeea1cb78" + "_commit": "9a676e5ee83ad4144a0b988d63d9b7776cedbb5b" } }, "directory": null diff --git a/scripts/util.py b/scripts/util.py index 3da8573..bf037b5 100644 --- a/scripts/util.py +++ b/scripts/util.py @@ -86,7 +86,7 @@ def create_release_branch(new_version: str) -> None: def bump_version(increment: Optional[str] = None) -> None: """Bumps the package version.""" - bump_cmd: list[str] = ["uvx", "cz", "bump", "--yes", "--files-only", "--changelog"] + bump_cmd: list[str] = ["uvx", "--from", "commitizen", "cz", "bump", "--yes", "--files-only", "--changelog"] if increment is not None: bump_cmd.extend(["--increment", increment]) subprocess.run(bump_cmd, cwd=REPO_FOLDER, check=True) @@ -122,7 +122,7 @@ def get_latest_release_notes() -> str: rev_range: str = latest_version if latest_tag is None else f"{latest_tag}..{latest_version}" result: subprocess.CompletedProcess = subprocess.run( - ["uvx", "cz", "changelog", rev_range, "--dry-run"], + ["uvx", "--from", "commitizen", "cz", "changelog", rev_range, "--dry-run"], cwd=REPO_FOLDER, check=True ) @@ -131,4 +131,4 @@ def get_latest_release_notes() -> str: def tag_release() -> None: """Tags the release using commitizen bump with tag only.""" - subprocess.run(["uvx", "cz", "bump", "--tag-only", "--yes"], cwd=REPO_FOLDER, check=True) + subprocess.run(["uvx", "--from", "commitizen", "cz", "bump", "--tag-only", "--yes"], cwd=REPO_FOLDER, check=True) From 20567e5ee2b10217fad24f5c46129801237d0805 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Tue, 8 Jul 2025 23:00:22 -0400 Subject: [PATCH 21/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- scripts/util.py | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index fa8487b..754e9e8 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "9a676e5ee83ad4144a0b988d63d9b7776cedbb5b", + "_commit": "eb9b7dd453b9adc532f8e331392aa186b4e4b0b7", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index d178181..bb27857 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "9a676e5ee83ad4144a0b988d63d9b7776cedbb5b", + "commit": "eb9b7dd453b9adc532f8e331392aa186b4e4b0b7", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "9a676e5ee83ad4144a0b988d63d9b7776cedbb5b" + "_commit": "eb9b7dd453b9adc532f8e331392aa186b4e4b0b7" } }, "directory": null diff --git a/scripts/util.py b/scripts/util.py index bf037b5..999f7e4 100644 --- a/scripts/util.py +++ b/scripts/util.py @@ -58,7 +58,7 @@ def remove_readonly(func: Callable[[str], Any], path: str, _: Any) -> None: def get_package_version() -> str: """Gets the package version.""" result: subprocess.CompletedProcess = subprocess.run( - ["uvx", "version", "-p"], + ["uvx", "--with", "commitizen", "cz", "version", "-p"], cwd=REPO_FOLDER, capture_output=True ) @@ -124,6 +124,7 @@ def get_latest_release_notes() -> str: result: subprocess.CompletedProcess = subprocess.run( ["uvx", "--from", "commitizen", "cz", "changelog", rev_range, "--dry-run"], cwd=REPO_FOLDER, + capture_output=True, check=True ) return result.stdout.decode("utf-8") From 59a1de90cc3c57392512b64c16a57ee5fe035a7f Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Tue, 8 Jul 2025 23:02:16 -0400 Subject: [PATCH 22/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- scripts/util.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index 754e9e8..8751cf0 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "eb9b7dd453b9adc532f8e331392aa186b4e4b0b7", + "_commit": "910ef114f9677264f7359f8cf24d8f50f69626dd", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index bb27857..94fce36 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "eb9b7dd453b9adc532f8e331392aa186b4e4b0b7", + "commit": "910ef114f9677264f7359f8cf24d8f50f69626dd", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "eb9b7dd453b9adc532f8e331392aa186b4e4b0b7" + "_commit": "910ef114f9677264f7359f8cf24d8f50f69626dd" } }, "directory": null diff --git a/scripts/util.py b/scripts/util.py index 999f7e4..7161b02 100644 --- a/scripts/util.py +++ b/scripts/util.py @@ -58,7 +58,7 @@ def remove_readonly(func: Callable[[str], Any], path: str, _: Any) -> None: def get_package_version() -> str: """Gets the package version.""" result: subprocess.CompletedProcess = subprocess.run( - ["uvx", "--with", "commitizen", "cz", "version", "-p"], + ["uvx", "--from", "commitizen", "cz", "version", "-p"], cwd=REPO_FOLDER, capture_output=True ) From ebaf40d506bb6b99c11337a177a7f77e2d3c2838 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Tue, 8 Jul 2025 23:09:56 -0400 Subject: [PATCH 23/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- scripts/util.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index 8751cf0..7656b4f 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "910ef114f9677264f7359f8cf24d8f50f69626dd", + "_commit": "4c9c5cede6ae82e1ccd704a2b34d8d90c5c82b60", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index 94fce36..cc650a8 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "910ef114f9677264f7359f8cf24d8f50f69626dd", + "commit": "4c9c5cede6ae82e1ccd704a2b34d8d90c5c82b60", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "910ef114f9677264f7359f8cf24d8f50f69626dd" + "_commit": "4c9c5cede6ae82e1ccd704a2b34d8d90c5c82b60" } }, "directory": null diff --git a/scripts/util.py b/scripts/util.py index 7161b02..b2a1a3a 100644 --- a/scripts/util.py +++ b/scripts/util.py @@ -119,7 +119,7 @@ def get_latest_release_notes() -> str: raise ValueError( "The latest tag and version are the same. Please ensure the release notes are taken before tagging." ) - rev_range: str = latest_version if latest_tag is None else f"{latest_tag}..{latest_version}" + rev_range: str = "" if latest_tag is None else f"{latest_tag}..{latest_version}" result: subprocess.CompletedProcess = subprocess.run( ["uvx", "--from", "commitizen", "cz", "changelog", rev_range, "--dry-run"], From add6f61ceb9a79ae27478e5e1072f7f4b2fba6a3 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Tue, 8 Jul 2025 23:11:23 -0400 Subject: [PATCH 24/44] chore: update demo to the latest cookiecutter-robust-python --- body.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 body.md diff --git a/body.md b/body.md new file mode 100644 index 0000000..de35644 --- /dev/null +++ b/body.md @@ -0,0 +1,25 @@ +## Unreleased + +### Feat + +- initial commit +- remove unneeded python venvs from noxfile.py +- run pre-commit autoupdate +- initial commit +- initial commit +- initial commit +- add new pre-commit hooks for validating the pyproject.toml +- initial commit +- initial commit +- initial commit +- initial commit +- initial commit +- initial commit +- initial commit + +### Fix + +- resolve conflicts +- resolve conflicts +- fix path syntax in build-python.yml + From 3bbf5bf25b925b6da07e6b897ca9778e2733bada Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Tue, 8 Jul 2025 23:11:53 -0400 Subject: [PATCH 25/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- scripts/setup-release.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index 7656b4f..508919c 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "4c9c5cede6ae82e1ccd704a2b34d8d90c5c82b60", + "_commit": "0f3242a23658c1f9e43d56d1cb4770f315452b97", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index cc650a8..2f5ee3a 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "4c9c5cede6ae82e1ccd704a2b34d8d90c5c82b60", + "commit": "0f3242a23658c1f9e43d56d1cb4770f315452b97", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "4c9c5cede6ae82e1ccd704a2b34d8d90c5c82b60" + "_commit": "0f3242a23658c1f9e43d56d1cb4770f315452b97" } }, "directory": null diff --git a/scripts/setup-release.py b/scripts/setup-release.py index 3968658..30a5f1a 100644 --- a/scripts/setup-release.py +++ b/scripts/setup-release.py @@ -50,7 +50,7 @@ def setup_release(increment: Optional[str] = None) -> None: commands: list[list[str]] = [ ["git", "add", "."], - ["git", "commit", "-m", f"bump: version {current_version} → {new_version}"] + ["git", "commit", "-m", f"bump: version {current_version} → {new_version}", "--no-verify"] ] for command in commands: From e78d70f33ea7c6666ba6891019ff5e3dcaa45b64 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Tue, 8 Jul 2025 23:12:03 -0400 Subject: [PATCH 26/44] Revert "chore: update demo to the latest cookiecutter-robust-python" This reverts commit 3bbf5bf25b925b6da07e6b897ca9778e2733bada. --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- scripts/setup-release.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index 508919c..7656b4f 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "0f3242a23658c1f9e43d56d1cb4770f315452b97", + "_commit": "4c9c5cede6ae82e1ccd704a2b34d8d90c5c82b60", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index 2f5ee3a..cc650a8 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "0f3242a23658c1f9e43d56d1cb4770f315452b97", + "commit": "4c9c5cede6ae82e1ccd704a2b34d8d90c5c82b60", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "0f3242a23658c1f9e43d56d1cb4770f315452b97" + "_commit": "4c9c5cede6ae82e1ccd704a2b34d8d90c5c82b60" } }, "directory": null diff --git a/scripts/setup-release.py b/scripts/setup-release.py index 30a5f1a..3968658 100644 --- a/scripts/setup-release.py +++ b/scripts/setup-release.py @@ -50,7 +50,7 @@ def setup_release(increment: Optional[str] = None) -> None: commands: list[list[str]] = [ ["git", "add", "."], - ["git", "commit", "-m", f"bump: version {current_version} → {new_version}", "--no-verify"] + ["git", "commit", "-m", f"bump: version {current_version} → {new_version}"] ] for command in commands: From 3fa42b34c0eb5c1d2bdac946341e33bab474d6bd Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Tue, 8 Jul 2025 23:13:23 -0400 Subject: [PATCH 27/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- .gitignore | 3 +++ scripts/setup-release.py | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index 7656b4f..9b2dbdf 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "4c9c5cede6ae82e1ccd704a2b34d8d90c5c82b60", + "_commit": "070054fefc76f9dd6152e6c3c3e47f2d6e700b82", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index cc650a8..130722a 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "4c9c5cede6ae82e1ccd704a2b34d8d90c5c82b60", + "commit": "070054fefc76f9dd6152e6c3c3e47f2d6e700b82", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "4c9c5cede6ae82e1ccd704a2b34d8d90c5c82b60" + "_commit": "070054fefc76f9dd6152e6c3c3e47f2d6e700b82" } }, "directory": null diff --git a/.gitignore b/.gitignore index 9508269..9fced39 100644 --- a/.gitignore +++ b/.gitignore @@ -71,3 +71,6 @@ nohup.out # Prettier dependencies node_modules/ + +# Release Notes +body.md diff --git a/scripts/setup-release.py b/scripts/setup-release.py index 3968658..30a5f1a 100644 --- a/scripts/setup-release.py +++ b/scripts/setup-release.py @@ -50,7 +50,7 @@ def setup_release(increment: Optional[str] = None) -> None: commands: list[list[str]] = [ ["git", "add", "."], - ["git", "commit", "-m", f"bump: version {current_version} → {new_version}"] + ["git", "commit", "-m", f"bump: version {current_version} → {new_version}", "--no-verify"] ] for command in commands: From 59c7a59a168ea26f19c8da4b8ae11371464eee44 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Wed, 9 Jul 2025 00:21:25 -0400 Subject: [PATCH 28/44] Revert "chore: update demo to the latest cookiecutter-robust-python" This reverts commit add6f61ceb9a79ae27478e5e1072f7f4b2fba6a3. --- body.md | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 body.md diff --git a/body.md b/body.md deleted file mode 100644 index de35644..0000000 --- a/body.md +++ /dev/null @@ -1,25 +0,0 @@ -## Unreleased - -### Feat - -- initial commit -- remove unneeded python venvs from noxfile.py -- run pre-commit autoupdate -- initial commit -- initial commit -- initial commit -- add new pre-commit hooks for validating the pyproject.toml -- initial commit -- initial commit -- initial commit -- initial commit -- initial commit -- initial commit -- initial commit - -### Fix - -- resolve conflicts -- resolve conflicts -- fix path syntax in build-python.yml - From f2464be578e0496ea20dee1b1b8cd07b9f2da5e9 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Wed, 9 Jul 2025 00:45:09 -0400 Subject: [PATCH 29/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- .github/workflows/bump-version.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index 9b2dbdf..73a8baf 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "070054fefc76f9dd6152e6c3c3e47f2d6e700b82", + "_commit": "89c528b34bcdcdbb5c3e7c0d5213c1702bfdfa38", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index 130722a..193990a 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "070054fefc76f9dd6152e6c3c3e47f2d6e700b82", + "commit": "89c528b34bcdcdbb5c3e7c0d5213c1702bfdfa38", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "070054fefc76f9dd6152e6c3c3e47f2d6e700b82" + "_commit": "89c528b34bcdcdbb5c3e7c0d5213c1702bfdfa38" } }, "directory": null diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 5935fec..fba5f08 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -23,7 +23,7 @@ jobs: changelog_increment_filename: body.md generate-release-notes: - name: "Generate Release Notes" + name: "Get Release Notes" if: "startsWith(github.event.head_commit.message, 'bump:')" runs-on: ubuntu-latest steps: @@ -39,7 +39,7 @@ jobs: python-version-file: ".github/workflows/.python-version" - name: Get Release Notes - run: uvx -s + run: uvx nox -s get-release-notes generate-release-draft: name: "Generate Release Draft" From 5009bc77535e943b64ca18598c66a5ca774a06fe Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Fri, 11 Jul 2025 19:23:58 -0400 Subject: [PATCH 30/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- .github/workflows/bump-version.yml | 32 +++++++++++++++++------------- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index 73a8baf..988048e 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "89c528b34bcdcdbb5c3e7c0d5213c1702bfdfa38", + "_commit": "f93aa52be4b1117a977ca88e27f03b44b3ae8e67", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index 193990a..4cfcc47 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "89c528b34bcdcdbb5c3e7c0d5213c1702bfdfa38", + "commit": "f93aa52be4b1117a977ca88e27f03b44b3ae8e67", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "89c528b34bcdcdbb5c3e7c0d5213c1702bfdfa38" + "_commit": "f93aa52be4b1117a977ca88e27f03b44b3ae8e67" } }, "directory": null diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index fba5f08..3504ce8 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -6,8 +6,8 @@ on: - "release/*" jobs: - bump-version: - name: "Bump version and create changelog with commitizen" + bump-version-and-draft-release: + name: Bump Version and Draft Release if: "!startsWith(github.event.head_commit.message, 'bump:')" runs-on: ubuntu-latest steps: @@ -16,14 +16,24 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} fetch-depth: 0 + - name: Create bump and changelog uses: commitizen-tools/commitizen-action@master with: github_token: ${{ secrets.GITHUB_TOKEN }} changelog_increment_filename: body.md - generate-release-notes: - name: "Get Release Notes" + - name: Create Release Draft + uses: softprops/action-gh-release@v1 + with: + body_path: body.md + tag_name: ${{ env.REVISION }} + draft: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + draft-release: + name: Draft Release if: "startsWith(github.event.head_commit.message, 'bump:')" runs-on: ubuntu-latest steps: @@ -36,22 +46,16 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version-file: ".github/workflows/.python-version" + python-version-file: .github/workflows/.python-version - name: Get Release Notes run: uvx nox -s get-release-notes - generate-release-draft: - name: "Generate Release Draft" - if: always() - needs: [bump-version, generate-release-notes] - runs-on: ubuntu-latest - steps: - - name: Release + - name: Create Release Draft uses: softprops/action-gh-release@v1 with: - body_path: "body.md" + body_path: body.md tag_name: ${{ env.REVISION }} - draft: "true" + draft: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From fa6b6f83d744db94c5ca78ea63e032feb8e40bae Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Fri, 11 Jul 2025 22:02:17 -0400 Subject: [PATCH 31/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- .github/workflows/bump-version.yml | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index 988048e..2cbbd6c 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "f93aa52be4b1117a977ca88e27f03b44b3ae8e67", + "_commit": "e531aea86f62d31d6db6759e3c8d3ce56fbd7da6", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index 4cfcc47..cb6387a 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "f93aa52be4b1117a977ca88e27f03b44b3ae8e67", + "commit": "e531aea86f62d31d6db6759e3c8d3ce56fbd7da6", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "f93aa52be4b1117a977ca88e27f03b44b3ae8e67" + "_commit": "e531aea86f62d31d6db6759e3c8d3ce56fbd7da6" } }, "directory": null diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 3504ce8..fd63c31 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -5,6 +5,9 @@ on: branches: - "release/*" +permissions: + contents: write + jobs: bump-version-and-draft-release: name: Bump Version and Draft Release From 5d7ebd04f6165e2c2ce724f946988ae39295ccec Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Fri, 11 Jul 2025 22:54:41 -0400 Subject: [PATCH 32/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- .github/workflows/bump-version.yml | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index 2cbbd6c..2e25e09 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "e531aea86f62d31d6db6759e3c8d3ce56fbd7da6", + "_commit": "3bb543e9c4ea543fa92dcc1892dcf89049aebf0a", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index cb6387a..415cd5a 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "e531aea86f62d31d6db6759e3c8d3ce56fbd7da6", + "commit": "3bb543e9c4ea543fa92dcc1892dcf89049aebf0a", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "e531aea86f62d31d6db6759e3c8d3ce56fbd7da6" + "_commit": "3bb543e9c4ea543fa92dcc1892dcf89049aebf0a" } }, "directory": null diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index fd63c31..58f1af7 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -30,7 +30,6 @@ jobs: uses: softprops/action-gh-release@v1 with: body_path: body.md - tag_name: ${{ env.REVISION }} draft: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -58,7 +57,6 @@ jobs: uses: softprops/action-gh-release@v1 with: body_path: body.md - tag_name: ${{ env.REVISION }} draft: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 1fbc97190b17481ba6821390ccd2953ed58dbdab Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Sat, 12 Jul 2025 17:56:10 -0400 Subject: [PATCH 33/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 +- .github/workflows/bump-version.yml | 62 --------------------------- .github/workflows/prepare-release.yml | 50 +++++++++++++++++++++ .github/workflows/release-python.yml | 48 --------------------- scripts/get-release-notes.py | 3 +- scripts/util.py | 6 +-- 7 files changed, 57 insertions(+), 118 deletions(-) delete mode 100644 .github/workflows/bump-version.yml create mode 100644 .github/workflows/prepare-release.yml diff --git a/.cookiecutter.json b/.cookiecutter.json index 2e25e09..9434089 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "3bb543e9c4ea543fa92dcc1892dcf89049aebf0a", + "_commit": "31a98e1a58496fdcd6f5eabee09440d27dc2ebcb", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index 415cd5a..5cda793 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "3bb543e9c4ea543fa92dcc1892dcf89049aebf0a", + "commit": "31a98e1a58496fdcd6f5eabee09440d27dc2ebcb", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "3bb543e9c4ea543fa92dcc1892dcf89049aebf0a" + "_commit": "31a98e1a58496fdcd6f5eabee09440d27dc2ebcb" } }, "directory": null diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml deleted file mode 100644 index 58f1af7..0000000 --- a/.github/workflows/bump-version.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: Bump version - -on: - push: - branches: - - "release/*" - -permissions: - contents: write - -jobs: - bump-version-and-draft-release: - name: Bump Version and Draft Release - if: "!startsWith(github.event.head_commit.message, 'bump:')" - runs-on: ubuntu-latest - steps: - - name: Check out - uses: actions/checkout@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - fetch-depth: 0 - - - name: Create bump and changelog - uses: commitizen-tools/commitizen-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - changelog_increment_filename: body.md - - - name: Create Release Draft - uses: softprops/action-gh-release@v1 - with: - body_path: body.md - draft: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - draft-release: - name: Draft Release - if: "startsWith(github.event.head_commit.message, 'bump:')" - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up uv - uses: astral-sh/setup-uv@v6 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version-file: .github/workflows/.python-version - - - name: Get Release Notes - run: uvx nox -s get-release-notes - - - name: Create Release Draft - uses: softprops/action-gh-release@v1 - with: - body_path: body.md - draft: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml new file mode 100644 index 0000000..c09e755 --- /dev/null +++ b/.github/workflows/prepare-release.yml @@ -0,0 +1,50 @@ +name: Prepare Release + +on: + push: + branches: + - "release/*" + +permissions: + contents: write + +jobs: + prepare-release: + name: Prepare Release + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up uv + uses: astral-sh/setup-uv@v6 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version-file: .github/workflows/.python-version + + - name: Get Current Version + id: current_version + run: echo "CURRENT_VERSION=$(uvx --from commitizen cz version -p)" >> $GITHUB_OUTPUT + + - name: Get New Release Version + id: new_version + run: echo "NEW_VERSION=${GITHUB_REF_NAME#release/}" >> $GITHUB_OUTPUT + + - name: Bump Version + if: ${{ steps.current_version.outputs.CURRENT_VERSION != steps.new_version.outputs.NEW_VERSION }} + run: uvx nox -s bump-version ${{ steps.new_version.outputs.NEW_VERSION }} + + - name: Get Release Notes + id: changelog + run: echo "CHANGELOG=$(uvx nox -s get-release-notes)" >> $GITHUB_OUTPUT + + - name: Create Release Draft + uses: softprops/action-gh-release@v1 + with: + body_path: body.md + draft: true + tag_name: ${{ steps.new_version.outputs.NEW_VERSION }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index 3352110..4524c21 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -53,18 +53,6 @@ jobs: TWINE_PASSWORD: ${{ secrets.TESTPYPI_API_TOKEN }} run: uvx nox -s publish-package -- --repository testpypi - - name: Get Release Notes from Changelog - id: changelog - uses: simple-changelog/action@v3 - with: - path: CHANGELOG.md - tag: ${{ github.event_name == 'push' && github.ref_name || github.event.inputs.tag }} - - outputs: - changelog_body: - description: "Release notes body extracted from CHANGELOG.md" - value: ${{ steps.changelog.outputs.changes }} # Output the extracted changelog body - publish_pypi: name: Publish to Production PyPI runs-on: ubuntu-latest @@ -91,39 +79,3 @@ jobs: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} run: uvx nox -s publish-python - - create_github_release: - name: Create GitHub Release - runs-on: ubuntu-latest - needs: build_and_testpypi - - if: "github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')" - - steps: - - name: Download package artifacts # Get built artifacts for release assets - uses: actions/download-artifact@v4 - with: - name: distribution-packages - - - name: Get tag name - id: get_tag - run: echo "tag=${{ github.ref_name }}" >> $GITHUB_OUTPUT - - - name: Generate Release Notes - run: | - if [ -z "${{ steps.previous_tag.outputs.previous }}" ]; then - echo "No previous tag found: generating changelog for all commits." - cz changelog --dry-run > RELEASE_NOTES.md - else - echo "Previous tag found: generating changelog diff." - cz changelog --dry-run --rev-range ${{ steps.previous_tag.outputs.previous }}..${GITHUB_REF_NAME} > RELEASE_NOTES.md - fi - - - name: Create GitHub Release - uses: softprops/action-gh-release@v2 - with: - tag_name: ${{ steps.get_tag.outputs.tag }} - name: Release ${{ steps.get_tag.outputs.tag }} - body: ${{ needs.build_and_testpypi.outputs.changelog_body }} - files: dist/* - prerelease: ${{ contains(steps.get_tag.outputs.tag, '-') }} # Checks if tag contains hyphen (e.g. v1.0.0-rc.1) diff --git a/scripts/get-release-notes.py b/scripts/get-release-notes.py index f33475e..d89c013 100644 --- a/scripts/get-release-notes.py +++ b/scripts/get-release-notes.py @@ -9,8 +9,7 @@ def main() -> None: """Parses args and passes through to bump_version.""" - release_notes: str = get_latest_release_notes() - RELEASE_NOTES_PATH.write_text(release_notes) + get_latest_release_notes() if __name__ == "__main__": diff --git a/scripts/util.py b/scripts/util.py index b2a1a3a..d23857a 100644 --- a/scripts/util.py +++ b/scripts/util.py @@ -108,7 +108,7 @@ def get_latest_tag() -> Optional[str]: return tag -def get_latest_release_notes() -> str: +def get_latest_release_notes() -> None: """Gets the release notes. Assumes the latest_tag hasn't been applied yet. @@ -124,10 +124,10 @@ def get_latest_release_notes() -> str: result: subprocess.CompletedProcess = subprocess.run( ["uvx", "--from", "commitizen", "cz", "changelog", rev_range, "--dry-run"], cwd=REPO_FOLDER, - capture_output=True, check=True ) - return result.stdout.decode("utf-8") + if result.returncode != 0: + raise ValueError("Unable to get release notes.") def tag_release() -> None: From 1f74cddd3b8740cc353e0c057c3c480537baaf67 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Sat, 12 Jul 2025 18:01:13 -0400 Subject: [PATCH 34/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- .github/workflows/prepare-release.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index 9434089..87cb5d3 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "31a98e1a58496fdcd6f5eabee09440d27dc2ebcb", + "_commit": "df849a252373db8335a33553601b8275c9577142", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index 5cda793..64bfbff 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "31a98e1a58496fdcd6f5eabee09440d27dc2ebcb", + "commit": "df849a252373db8335a33553601b8275c9577142", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "31a98e1a58496fdcd6f5eabee09440d27dc2ebcb" + "_commit": "df849a252373db8335a33553601b8275c9577142" } }, "directory": null diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index c09e755..9d15307 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -38,7 +38,7 @@ jobs: - name: Get Release Notes id: changelog - run: echo "CHANGELOG=$(uvx nox -s get-release-notes)" >> $GITHUB_OUTPUT + run: echo "CHANGELOG=$(python ./scripts/get-release-notes.py)" >> $GITHUB_OUTPUT - name: Create Release Draft uses: softprops/action-gh-release@v1 From 8da1be8188a2fbdbbebb652a7775e80098c1b897 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Sat, 12 Jul 2025 18:05:24 -0400 Subject: [PATCH 35/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- .github/workflows/prepare-release.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index 87cb5d3..fb8de63 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "df849a252373db8335a33553601b8275c9577142", + "_commit": "c1a3e502eb467fc01581d51078cf66379009bf4e", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index 64bfbff..1e0cba2 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "df849a252373db8335a33553601b8275c9577142", + "commit": "c1a3e502eb467fc01581d51078cf66379009bf4e", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "df849a252373db8335a33553601b8275c9577142" + "_commit": "c1a3e502eb467fc01581d51078cf66379009bf4e" } }, "directory": null diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index 9d15307..ce5241e 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -43,7 +43,7 @@ jobs: - name: Create Release Draft uses: softprops/action-gh-release@v1 with: - body_path: body.md + body: ${{ steps.changelog.outputs.CHANGELOG }} draft: true tag_name: ${{ steps.new_version.outputs.NEW_VERSION }} env: From a8392ed372ee074f7043b5cd2d790003117d5b8d Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Sat, 12 Jul 2025 18:11:24 -0400 Subject: [PATCH 36/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- .github/workflows/prepare-release.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index fb8de63..d590468 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "c1a3e502eb467fc01581d51078cf66379009bf4e", + "_commit": "897b90176c5ba388c031d48db3140b63cb3e2bc2", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index 1e0cba2..7a18130 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "c1a3e502eb467fc01581d51078cf66379009bf4e", + "commit": "897b90176c5ba388c031d48db3140b63cb3e2bc2", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "c1a3e502eb467fc01581d51078cf66379009bf4e" + "_commit": "897b90176c5ba388c031d48db3140b63cb3e2bc2" } }, "directory": null diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index ce5241e..5576d6a 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -38,12 +38,12 @@ jobs: - name: Get Release Notes id: changelog - run: echo "CHANGELOG=$(python ./scripts/get-release-notes.py)" >> $GITHUB_OUTPUT + run: echo "CHANGELOG=$(python ./scripts/get-release-notes.py | base64)" >> $GITHUB_OUTPUT - name: Create Release Draft uses: softprops/action-gh-release@v1 with: - body: ${{ steps.changelog.outputs.CHANGELOG }} + body: ${{ steps.changelog.outputs.CHANGELOG }} | base64 --decode draft: true tag_name: ${{ steps.new_version.outputs.NEW_VERSION }} env: From 0b44ebdfd05064860cf5e9e75a10fdc4c7aea955 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Sat, 12 Jul 2025 18:24:58 -0400 Subject: [PATCH 37/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- .github/workflows/prepare-release.yml | 7 +++---- scripts/get-release-notes.py | 21 ++++++++++++++++++++- scripts/util.py | 6 +++--- 5 files changed, 29 insertions(+), 11 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index d590468..2ec42ce 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "897b90176c5ba388c031d48db3140b63cb3e2bc2", + "_commit": "abd971947cb3c090dc6ed7141ba21c9a0e83fda1", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index 7a18130..030cb64 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "897b90176c5ba388c031d48db3140b63cb3e2bc2", + "commit": "abd971947cb3c090dc6ed7141ba21c9a0e83fda1", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "897b90176c5ba388c031d48db3140b63cb3e2bc2" + "_commit": "abd971947cb3c090dc6ed7141ba21c9a0e83fda1" } }, "directory": null diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index 5576d6a..f260c47 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -37,13 +37,12 @@ jobs: run: uvx nox -s bump-version ${{ steps.new_version.outputs.NEW_VERSION }} - name: Get Release Notes - id: changelog - run: echo "CHANGELOG=$(python ./scripts/get-release-notes.py | base64)" >> $GITHUB_OUTPUT + run: uvx nox -s get-release-notes ${{ github.workspace }}-CHANGELOG.md - name: Create Release Draft - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: - body: ${{ steps.changelog.outputs.CHANGELOG }} | base64 --decode + body_path: ${{ github.workspace }}-CHANGELOG.md draft: true tag_name: ${{ steps.new_version.outputs.NEW_VERSION }} env: diff --git a/scripts/get-release-notes.py b/scripts/get-release-notes.py index d89c013..74b7271 100644 --- a/scripts/get-release-notes.py +++ b/scripts/get-release-notes.py @@ -1,4 +1,5 @@ """Script responsible for getting the release notes of the robust-python-demo package.""" +import argparse from pathlib import Path from util import get_latest_release_notes @@ -9,7 +10,25 @@ def main() -> None: """Parses args and passes through to bump_version.""" - get_latest_release_notes() + parser: argparse.ArgumentParser = get_parser() + args: argparse.Namespace = parser.parse_args() + release_notes: str = get_latest_release_notes() + path: Path = RELEASE_NOTES_PATH if args.path is None else args.path + path.write_text(release_notes) + + +def get_parser() -> argparse.ArgumentParser: + """Creates the argument parser for prepare-release.""" + parser: argparse.ArgumentParser = argparse.ArgumentParser( + prog="get-release-notes", usage="python ./scripts/get-release-notes.py" + ) + parser.add_argument( + "path", + type=Path, + metavar="PATH", + help="Path the changelog will be written to.", + ) + return parser if __name__ == "__main__": diff --git a/scripts/util.py b/scripts/util.py index d23857a..b2a1a3a 100644 --- a/scripts/util.py +++ b/scripts/util.py @@ -108,7 +108,7 @@ def get_latest_tag() -> Optional[str]: return tag -def get_latest_release_notes() -> None: +def get_latest_release_notes() -> str: """Gets the release notes. Assumes the latest_tag hasn't been applied yet. @@ -124,10 +124,10 @@ def get_latest_release_notes() -> None: result: subprocess.CompletedProcess = subprocess.run( ["uvx", "--from", "commitizen", "cz", "changelog", rev_range, "--dry-run"], cwd=REPO_FOLDER, + capture_output=True, check=True ) - if result.returncode != 0: - raise ValueError("Unable to get release notes.") + return result.stdout.decode("utf-8") def tag_release() -> None: From fa55f88afd53cde172c8b65472190185be49a058 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Sat, 12 Jul 2025 18:29:53 -0400 Subject: [PATCH 38/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- .github/workflows/prepare-release.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index 2ec42ce..2aa8c25 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "abd971947cb3c090dc6ed7141ba21c9a0e83fda1", + "_commit": "ba54473a85c9ea61eaf6e65c3e57bd37bc2d4e89", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index 030cb64..67ac3e5 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "abd971947cb3c090dc6ed7141ba21c9a0e83fda1", + "commit": "ba54473a85c9ea61eaf6e65c3e57bd37bc2d4e89", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "abd971947cb3c090dc6ed7141ba21c9a0e83fda1" + "_commit": "ba54473a85c9ea61eaf6e65c3e57bd37bc2d4e89" } }, "directory": null diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index f260c47..5c217dc 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -37,7 +37,7 @@ jobs: run: uvx nox -s bump-version ${{ steps.new_version.outputs.NEW_VERSION }} - name: Get Release Notes - run: uvx nox -s get-release-notes ${{ github.workspace }}-CHANGELOG.md + run: uvx nox -s get-release-notes -- ${{ github.workspace }}-CHANGELOG.md - name: Create Release Draft uses: softprops/action-gh-release@v2 From 3143c874465772d3325b1b51a05416bb08a472d1 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Mon, 14 Jul 2025 01:32:39 -0400 Subject: [PATCH 39/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- .github/workflows/release-python.yml | 9 +++++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index 2aa8c25..6965818 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "ba54473a85c9ea61eaf6e65c3e57bd37bc2d4e89", + "_commit": "b3e8970d19722387b647d9eba165e948e1b7c41a", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index 67ac3e5..82aa63d 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "ba54473a85c9ea61eaf6e65c3e57bd37bc2d4e89", + "commit": "b3e8970d19722387b647d9eba165e948e1b7c41a", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "ba54473a85c9ea61eaf6e65c3e57bd37bc2d4e89" + "_commit": "b3e8970d19722387b647d9eba165e948e1b7c41a" } }, "directory": null diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index 4524c21..a5ac741 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -53,8 +53,8 @@ jobs: TWINE_PASSWORD: ${{ secrets.TESTPYPI_API_TOKEN }} run: uvx nox -s publish-package -- --repository testpypi - publish_pypi: - name: Publish to Production PyPI + publish_pypi_and_github: + name: Publish to Production PyPI and GitHub runs-on: ubuntu-latest needs: build_and_testpypi @@ -79,3 +79,8 @@ jobs: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} run: uvx nox -s publish-python + + - name: Publish to GitHub + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh release upload ${{ github.event.inputs.tag }} dist/ From f57de81e0b29487ae3ee11d608777b8e083289af Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Wed, 16 Jul 2025 21:11:55 -0400 Subject: [PATCH 40/44] chore: remove accidentally tracked files --- build/lib/robust_python_demo/__init__.py | 1 - build/lib/robust_python_demo/__main__.py | 15 --------------- build/lib/robust_python_demo/py.typed | 0 3 files changed, 16 deletions(-) delete mode 100644 build/lib/robust_python_demo/__init__.py delete mode 100644 build/lib/robust_python_demo/__main__.py delete mode 100644 build/lib/robust_python_demo/py.typed diff --git a/build/lib/robust_python_demo/__init__.py b/build/lib/robust_python_demo/__init__.py deleted file mode 100644 index 40f1b5d..0000000 --- a/build/lib/robust_python_demo/__init__.py +++ /dev/null @@ -1 +0,0 @@ -"""Robust Python Demo.""" diff --git a/build/lib/robust_python_demo/__main__.py b/build/lib/robust_python_demo/__main__.py deleted file mode 100644 index 83d387b..0000000 --- a/build/lib/robust_python_demo/__main__.py +++ /dev/null @@ -1,15 +0,0 @@ -"""Command-line interface.""" - -import typer - - -app: typer.Typer = typer.Typer() - - -@app.command(name="robust-python-demo") -def main() -> None: - """Robust Python Demo.""" - - -if __name__ == "__main__": - app() # pragma: no cover diff --git a/build/lib/robust_python_demo/py.typed b/build/lib/robust_python_demo/py.typed deleted file mode 100644 index e69de29..0000000 From 2c9e91ae956eada00ba85556b824a262be0a71a4 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Wed, 16 Jul 2025 21:13:29 -0400 Subject: [PATCH 41/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 +-- .github/workflows/release-python.yml | 46 +++++++++++++++++++++------- 3 files changed, 38 insertions(+), 14 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index 6965818..9bf72f9 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "b3e8970d19722387b647d9eba165e948e1b7c41a", + "_commit": "8b33de78451ca2e4cdb06bd2da3db5cf5d74ae2c", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index 82aa63d..4f12a65 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "b3e8970d19722387b647d9eba165e948e1b7c41a", + "commit": "8b33de78451ca2e4cdb06bd2da3db5cf5d74ae2c", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "b3e8970d19722387b647d9eba165e948e1b7c41a" + "_commit": "8b33de78451ca2e4cdb06bd2da3db5cf5d74ae2c" } }, "directory": null diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index a5ac741..5777997 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -5,21 +5,41 @@ name: Release Python Package on: push: - tags: - - "v[0-9]+.[0-9]+.[0-9]+" - - "v[0-9]+.[0-9]+.[0-9]+-*" # Include pre-release tags + branches: + - main + - master workflow_dispatch: - inputs: - tag: - description: "Git tag to build and release (e.g., v1.2.3). Must already exist." - required: true jobs: + get_tag: + name: Get Tag + runs-on: ubuntu-latest + outputs: + tag: ${{ steps.current_version.outputs.CURRENT_VERSION }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up uv + uses: astral-sh/setup-uv@v6 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version-file: ".github/workflows/.python-version" + + - name: Get Current Version + id: current_version + run: echo "CURRENT_VERSION=$(uvx --from commitizen cz version -p)" >> $GITHUB_OUTPUT + + build_and_testpypi: name: Build & Publish to TestPyPI runs-on: ubuntu-latest - + needs: get_tag + outputs: + tag: ${{ needs.get_tag.outputs.tag }} steps: - name: Checkout code uses: actions/checkout@v4 @@ -44,7 +64,7 @@ jobs: - name: Download built package artifacts uses: actions/download-artifact@v4 with: - name: distribution-packages-${{ github.event.inputs.tag }} + name: distribution-packages-${{ needs.get_tag.outputs.tag }} path: dist/ - name: Publish to TestPyPI @@ -58,7 +78,6 @@ jobs: runs-on: ubuntu-latest needs: build_and_testpypi - if: "github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')" steps: - name: Download package artifacts uses: actions/download-artifact@v4 @@ -74,6 +93,11 @@ jobs: - name: Set up uv uses: astral-sh/setup-uv@v6 + - name: Create Tag + run: | + git tag ${{ needs.build_and_testpypi.outputs.tag }} + git push origin ${{ needs.build_and_testpypi.outputs.tag }} + - name: Publish to PyPI env: TWINE_USERNAME: __token__ @@ -83,4 +107,4 @@ jobs: - name: Publish to GitHub env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: gh release upload ${{ github.event.inputs.tag }} dist/ + run: gh release upload ${{ needs.build_and_testpypi.outputs.tag }} dist/ From 395d8eb19f4b99f51c3e96ff834975628afbadb8 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Wed, 16 Jul 2025 21:36:30 -0400 Subject: [PATCH 42/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- .github/workflows/prepare-release.yml | 3 +++ scripts/util.py | 6 ++++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index 9bf72f9..31acc9a 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "8b33de78451ca2e4cdb06bd2da3db5cf5d74ae2c", + "_commit": "d7435dd1e6da0c644771ce635b32487492c42954", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index 4f12a65..f18f442 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "8b33de78451ca2e4cdb06bd2da3db5cf5d74ae2c", + "commit": "d7435dd1e6da0c644771ce635b32487492c42954", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "8b33de78451ca2e4cdb06bd2da3db5cf5d74ae2c" + "_commit": "d7435dd1e6da0c644771ce635b32487492c42954" } }, "directory": null diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index 5c217dc..d380342 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -15,6 +15,9 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true - name: Set up uv uses: astral-sh/setup-uv@v6 diff --git a/scripts/util.py b/scripts/util.py index b2a1a3a..44dd7ae 100644 --- a/scripts/util.py +++ b/scripts/util.py @@ -120,9 +120,11 @@ def get_latest_release_notes() -> str: "The latest tag and version are the same. Please ensure the release notes are taken before tagging." ) rev_range: str = "" if latest_tag is None else f"{latest_tag}..{latest_version}" - + command: list[str] = [ + "uvx", "--from", "commitizen", "cz", "changelog", rev_range, "--dry-run", "--unreleased-version", latest_version + ] result: subprocess.CompletedProcess = subprocess.run( - ["uvx", "--from", "commitizen", "cz", "changelog", rev_range, "--dry-run"], + command, cwd=REPO_FOLDER, capture_output=True, check=True From 800aa28cf28ead307f8e4db325e41922ae220999 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Wed, 16 Jul 2025 21:37:01 -0400 Subject: [PATCH 43/44] =?UTF-8?q?bump:=20version=200.0.0=20=E2=86=92=200.1?= =?UTF-8?q?.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 24 ++++++++++++++++++++++++ pyproject.toml | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..52aea68 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,24 @@ +## v0.1.0 (2025-07-16) + +### Feat + +- initial commit +- remove unneeded python venvs from noxfile.py +- run pre-commit autoupdate +- initial commit +- initial commit +- initial commit +- add new pre-commit hooks for validating the pyproject.toml +- initial commit +- initial commit +- initial commit +- initial commit +- initial commit +- initial commit +- initial commit + +### Fix + +- resolve conflicts +- resolve conflicts +- fix path syntax in build-python.yml diff --git a/pyproject.toml b/pyproject.toml index 4cca1be..3a8d4d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "robust-python-demo" -version = "0.0.0" +version = "0.1.0" description = "robust-python-demo" authors = [ { name = "Kyle Oliver", email = "56kyleoliver+cookiecutter-robust-python@gmail.com" }, From 1f22704cc6c1b7e0789a3c3240043909cf835a66 Mon Sep 17 00:00:00 2001 From: Kyle Oliver Date: Wed, 16 Jul 2025 21:42:24 -0400 Subject: [PATCH 44/44] chore: update demo to the latest cookiecutter-robust-python --- .cookiecutter.json | 2 +- .cruft.json | 4 ++-- .ruff.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.cookiecutter.json b/.cookiecutter.json index 31acc9a..7fbc729 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -1,5 +1,5 @@ { - "_commit": "d7435dd1e6da0c644771ce635b32487492c42954", + "_commit": "e75916b0cb7d49cc8b12acaf0af9098ec3ccca28", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", "add_rust_extension": false, "author": "Kyle Oliver", diff --git a/.cruft.json b/.cruft.json index f18f442..b2e1bf5 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "commit": "d7435dd1e6da0c644771ce635b32487492c42954", + "commit": "e75916b0cb7d49cc8b12acaf0af9098ec3ccca28", "checkout": null, "context": { "cookiecutter": { @@ -18,7 +18,7 @@ "license": "MIT", "development_status": "Development Status :: 1 - Planning", "_template": "C:\\Users\\56kyl\\source\\repos\\cookiecutter-robust-python", - "_commit": "d7435dd1e6da0c644771ce635b32487492c42954" + "_commit": "e75916b0cb7d49cc8b12acaf0af9098ec3ccca28" } }, "directory": null diff --git a/.ruff.toml b/.ruff.toml index d932030..2ab3056 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -98,7 +98,7 @@ max-complexity = 10 ] "exceptions.py" = ["D107"] "noxfile.py" = ["S101"] -"scripts/*" = ["S603"] +"scripts/*" = ["S603", "S607"] [lint.pydocstyle] convention = "google"