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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -20,3 +24,4 @@ jobs:
with:
wheel-import: simcheck
coverage-floor: 0
run-preen: true
17 changes: 13 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release

on:
push:
tags: ["v*"]
tags: ["v*.*.*"]
workflow_dispatch:
inputs:
publish:
Expand Down Expand Up @@ -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)
Expand All @@ -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
32 changes: 15 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,23 @@ 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",
]
dependencies = [
"numpy>=2.4.6",
]
version = "0.1.0"

[project.urls]
Homepage = "https://github.com/finite-sample/simcheck"
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 = [
Expand Down Expand Up @@ -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"]

Expand All @@ -83,14 +72,23 @@ 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'

[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]
source = ["src"]

[tool.preen]

[tool.uv.build-backend]
module-name = "simcheck"
69 changes: 35 additions & 34 deletions uv.lock

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

Loading