From dae3b5069105ee4f498f69a2d8c3ae0fbab1678a Mon Sep 17 00:00:00 2001 From: ***** <721466+soodoku@users.noreply.github.com> Date: Sun, 20 Sep 2026 16:57:23 -0700 Subject: [PATCH 1/2] Repair CI configuration for dependency updates --- .copier-answers.yml | 4 +- .github/workflows/ci.yml | 5 +++ .github/workflows/release.yml | 17 +++++++-- pyproject.toml | 27 +++++--------- uv.lock | 69 ++++++++++++++++++----------------- 5 files changed, 65 insertions(+), 57 deletions(-) diff --git a/.copier-answers.yml b/.copier-answers.yml index 8c4f8fc..095a10b 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,6 +1,6 @@ # Managed by copier — records template version for `copier update`. Do not edit. -_commit: v1 -_src_path: py-canon +_commit: v1.3.0 +_src_path: gh:gojiplus/py-canon author_email: gsood07@gmail.com author_name: Gaurav Sood coverage_floor: 0 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a64080..80a5f91 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,10 @@ on: pull_request: schedule: - cron: "17 6 * * 1" # weekly: surface ecosystem drift on quiet repos + # A merge made with GITHUB_TOKEN does not trigger workflows, so an + # auto-merged Dependabot PR leaves the default branch at a commit no CI run + # ever covered. The auto-merge sweep dispatches this after it lands one. + workflow_dispatch: permissions: contents: read @@ -20,3 +24,4 @@ jobs: with: wheel-import: simcheck coverage-floor: 0 + run-preen: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e407322..54fb0d1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: Release on: push: - tags: ["v*"] + tags: ["v*.*.*"] workflow_dispatch: inputs: publish: @@ -37,9 +37,8 @@ jobs: # here rather than in py-canon's reusable-release. publish: needs: release - # The version is derived from the tag, so anything built off a branch is a dev - # version (1.0.post3.dev0+abc1234). A PyPI upload cannot be withdrawn, so never - # publish a non-tag build, and make a manual run opt in explicitly. + # A PyPI upload cannot be withdrawn, so publish only from a tag. The reusable + # build rejects the tag unless it matches the version in pyproject.toml. if: >- startsWith(github.ref, 'refs/tags/') && (github.event_name == 'push' || inputs.publish) @@ -57,3 +56,13 @@ jobs: uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1 with: attestations: true + # The `if:` above decides *which builds may publish*. This decides what + # happens when one version is published twice, which that guard cannot + # see. The concurrency group serializes a manual dispatch and a tag + # push aimed at the same version, it does not deduplicate them, and + # cancel-in-progress is false -- so the queued run starts once the + # first finishes and uploads identical files. A completed run is not + # covered by concurrency at all, so a plain rerun does the same. PyPI + # answers with a 400 and the release goes red having already + # succeeded, which is the worst of both readings. + skip-existing: true diff --git a/pyproject.toml b/pyproject.toml index 884b598..4191b5e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,6 @@ license = "MIT" license-files = ["LICENSE"] authors = [{ name = "Gaurav Sood", email = "gsood07@gmail.com" }] requires-python = ">=3.11" -dynamic = ["version"] classifiers = [ "Intended Audience :: Developers", "Programming Language :: Python :: 3", @@ -14,6 +13,7 @@ classifiers = [ dependencies = [ "numpy>=2.4.6", ] +version = "0.1.0" [project.urls] Homepage = "https://github.com/finite-sample/simcheck" @@ -21,18 +21,8 @@ Documentation = "https://finite-sample.github.io/simcheck/" Repository = "https://github.com/finite-sample/simcheck" [build-system] -requires = ["hatchling", "uv-dynamic-versioning"] -build-backend = "hatchling.build" - -[tool.hatch.version] -source = "uv-dynamic-versioning" - -[tool.uv-dynamic-versioning] -vcs = "git" -style = "pep440" - -[tool.hatch.build.targets.wheel] -packages = ["src/simcheck"] +requires = ["uv_build>=0.12.5,<0.13"] +build-backend = "uv_build" [dependency-groups] dev = [ @@ -62,16 +52,15 @@ select = [ "PTH", "RET", "PIE", "FURB", "PERF", "DTZ", "LOG", "G", "TC", "FLY", "RSE", "SLOT", "FA", "A", "EXE", "ICN", "PGH", "PLE", "ARG", "SLF", ] -# D203/D213: the google convention this standard picks. W191/D206/D300: -# ruff's own docs list these as always incompatible with `ruff format`, -# which the standard also runs. +# D203/D213: the google convention the fleet standard picks. W191/D206/D300: +# ruff's own docs list these as always incompatible with `ruff format`, which +# the standard also runs. ignore = ["D203", "D213", "W191", "D206", "D300"] [tool.ruff.lint.pydocstyle] convention = "google" [tool.ruff.lint.per-file-ignores] -# Unused fixture arguments and private-member access are how tests are written. "tests/**" = ["S101", "D", "ARG", "SLF"] "docs/**" = ["D"] @@ -83,6 +72,7 @@ typeCheckingMode = "standard" style = "google" arg-type-hints-in-docstring = false check-return-types = false +check-yield-types = false check-class-attributes = false allow-init-docstring = true exclude = '\.venv|tests|docs' @@ -94,3 +84,6 @@ testpaths = ["tests"] source = ["src"] [tool.preen] + +[tool.uv.build-backend] +module-name = "simcheck" diff --git a/uv.lock b/uv.lock index 90f4d61..1d0ca21 100644 --- a/uv.lock +++ b/uv.lock @@ -883,6 +883,7 @@ wheels = [ [[package]] name = "simcheck" +version = "0.1.0" source = { editable = "." } dependencies = [ { name = "numpy", version = "2.4.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.12'" }, @@ -961,23 +962,23 @@ resolution-markers = [ "python_full_version < '3.12'", ] dependencies = [ - { name = "alabaster" }, - { name = "babel" }, - { name = "colorama", marker = "sys_platform == 'win32'" }, - { name = "docutils" }, - { name = "imagesize" }, - { name = "jinja2" }, - { name = "packaging" }, - { name = "pygments" }, - { name = "requests" }, - { name = "roman-numerals" }, - { name = "snowballstemmer" }, - { name = "sphinxcontrib-applehelp" }, - { name = "sphinxcontrib-devhelp" }, - { name = "sphinxcontrib-htmlhelp" }, - { name = "sphinxcontrib-jsmath" }, - { name = "sphinxcontrib-qthelp" }, - { name = "sphinxcontrib-serializinghtml" }, + { name = "alabaster", marker = "python_full_version < '3.12'" }, + { name = "babel", marker = "python_full_version < '3.12'" }, + { name = "colorama", marker = "python_full_version < '3.12' and sys_platform == 'win32'" }, + { name = "docutils", marker = "python_full_version < '3.12'" }, + { name = "imagesize", marker = "python_full_version < '3.12'" }, + { name = "jinja2", marker = "python_full_version < '3.12'" }, + { name = "packaging", marker = "python_full_version < '3.12'" }, + { name = "pygments", marker = "python_full_version < '3.12'" }, + { name = "requests", marker = "python_full_version < '3.12'" }, + { name = "roman-numerals", marker = "python_full_version < '3.12'" }, + { name = "snowballstemmer", marker = "python_full_version < '3.12'" }, + { name = "sphinxcontrib-applehelp", marker = "python_full_version < '3.12'" }, + { name = "sphinxcontrib-devhelp", marker = "python_full_version < '3.12'" }, + { name = "sphinxcontrib-htmlhelp", marker = "python_full_version < '3.12'" }, + { name = "sphinxcontrib-jsmath", marker = "python_full_version < '3.12'" }, + { name = "sphinxcontrib-qthelp", marker = "python_full_version < '3.12'" }, + { name = "sphinxcontrib-serializinghtml", marker = "python_full_version < '3.12'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/42/50/a8c6ccc36d5eacdfd7913ddccd15a9cee03ecafc5ee2bc40e1f168d85022/sphinx-9.0.4.tar.gz", hash = "sha256:594ef59d042972abbc581d8baa577404abe4e6c3b04ef61bd7fc2acbd51f3fa3", size = 8710502, upload-time = "2025-12-04T07:45:27.343Z" } wheels = [ @@ -992,23 +993,23 @@ resolution-markers = [ "python_full_version >= '3.12'", ] dependencies = [ - { name = "alabaster" }, - { name = "babel" }, - { name = "colorama", marker = "sys_platform == 'win32'" }, - { name = "docutils" }, - { name = "imagesize" }, - { name = "jinja2" }, - { name = "packaging" }, - { name = "pygments" }, - { name = "requests" }, - { name = "roman-numerals" }, - { name = "snowballstemmer" }, - { name = "sphinxcontrib-applehelp" }, - { name = "sphinxcontrib-devhelp" }, - { name = "sphinxcontrib-htmlhelp" }, - { name = "sphinxcontrib-jsmath" }, - { name = "sphinxcontrib-qthelp" }, - { name = "sphinxcontrib-serializinghtml" }, + { name = "alabaster", marker = "python_full_version >= '3.12'" }, + { name = "babel", marker = "python_full_version >= '3.12'" }, + { name = "colorama", marker = "python_full_version >= '3.12' and sys_platform == 'win32'" }, + { name = "docutils", marker = "python_full_version >= '3.12'" }, + { name = "imagesize", marker = "python_full_version >= '3.12'" }, + { name = "jinja2", marker = "python_full_version >= '3.12'" }, + { name = "packaging", marker = "python_full_version >= '3.12'" }, + { name = "pygments", marker = "python_full_version >= '3.12'" }, + { name = "requests", marker = "python_full_version >= '3.12'" }, + { name = "roman-numerals", marker = "python_full_version >= '3.12'" }, + { name = "snowballstemmer", marker = "python_full_version >= '3.12'" }, + { name = "sphinxcontrib-applehelp", marker = "python_full_version >= '3.12'" }, + { name = "sphinxcontrib-devhelp", marker = "python_full_version >= '3.12'" }, + { name = "sphinxcontrib-htmlhelp", marker = "python_full_version >= '3.12'" }, + { name = "sphinxcontrib-jsmath", marker = "python_full_version >= '3.12'" }, + { name = "sphinxcontrib-qthelp", marker = "python_full_version >= '3.12'" }, + { name = "sphinxcontrib-serializinghtml", marker = "python_full_version >= '3.12'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/cd/bd/f08eb0f4eed5c83f1ba2a3bd18f7745a2b1525fad70660a1c00224ec468a/sphinx-9.1.0.tar.gz", hash = "sha256:7741722357dd75f8190766926071fed3bdc211c74dd2d7d4df5404da95930ddb", size = 8718324, upload-time = "2025-12-31T15:09:27.646Z" } wheels = [ From 97f3d3de0c084dc76ba7ee6e2843735d479de995 Mon Sep 17 00:00:00 2001 From: ***** <721466+soodoku@users.noreply.github.com> Date: Sun, 20 Sep 2026 17:02:24 -0700 Subject: [PATCH 2/2] Complete strict pytest configuration --- pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 4191b5e..7fa6dcf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -78,6 +78,11 @@ allow-init-docstring = true exclude = '\.venv|tests|docs' [tool.pytest.ini_options] +minversion = "8" +log_level = "INFO" +xfail_strict = true +addopts = "-ra --strict-config --strict-markers" +filterwarnings = ["error"] testpaths = ["tests"] [tool.coverage.run]