Skip to content

chore: align CI, tooling & branch ruleset with project templates - #5

Merged
YongboYu merged 1 commit into
mainfrom
chore/ci-tooling-alignment
Jul 25, 2026
Merged

chore: align CI, tooling & branch ruleset with project templates#5
YongboYu merged 1 commit into
mainfrom
chore/ci-tooling-alignment

Conversation

@YongboYu

Copy link
Copy Markdown
Owner

Aligns pmf-benchmark's CI/tooling with the canonical python-project-template and pmf-tsfm, and simplifies the main branch ruleset. Second of two follow-ups after the ER evaluation merge; a separate PR will fix the pre-existing lint debt in legacy top-level code.

Tooling / CI

  • Dev deps → [dependency-groups] (PEP 735), matching the template.
  • Commit uv.lock and switch CI to uv sync --frozen --group dev for reproducible installs (also un-ignored uv.lock).
  • Enrich ruff ruleset: add W, N, S (flake8-bandit — recovers the security linting we dropped with bandit), C4, RUF; add per-file-ignores and docstring-code-format.
  • Add .python-version (3.11); trim codecov.yml to the minimal template form.
  • Fix the handful of findings the richer ruleset surfaces in the ER code (pickle/pm4py security annotations, redundant int() casts, precedence parens, unused noqa).

Kept deliberately (avoid churn/risk): Python 3.11, setuptools backend, GitHub default CodeQL setup.

Branch ruleset (main-protection)

Applied via the API and documented under .github/rulesets/ (a reference export — GitHub doesn't auto-apply ruleset files):

  • Squash-only merge methods — resolves the linear-history vs merge-commit contradiction that produced the confusing blocked state.
  • Required status checks relaxed to non-strict.
  • Removed the over-strict Restrict updates rule (the cause of "Cannot update this protected ref") and the pointless Restrict creations rule — the PR requirement already gates main.
  • Deleted an empty, disabled leftover ruleset.

Aligns pmf-benchmark with pmf-tsfm and python-project-template.

Tooling / CI:
- pyproject: move dev deps to [dependency-groups] (PEP 735); enrich the
  ruff ruleset (add W, N, S security, C4, RUF) with per-file-ignores and
  docstring-code-format.
- Commit uv.lock and switch CI to `uv sync --frozen --group dev` for
  reproducible installs; stop ignoring uv.lock.
- Add .python-version (3.11); trim codecov.yml to the minimal template form.
- Fix the ruff findings the richer ruleset surfaces in the ER code (pickle
  and pm4py security annotations, redundant int() casts, precedence
  parentheses, unused noqa).

Branch ruleset (main-protection) — applied via API, documented under
.github/rulesets/:
- Restrict merge methods to squash-only (resolves the linear-history vs
  merge-commit contradiction that blocked PRs).
- Relax required status checks to non-strict.
- Remove the over-strict "Restrict updates" and "Restrict creations" rules;
  the pull-request requirement already gates changes to main.
- Delete an empty, disabled leftover ruleset.
@YongboYu
YongboYu merged commit 1ea21bc into main Jul 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant