Skip to content

Add OSS project infrastructure and CI/CD#1

Merged
tuyakhov merged 7 commits into
mainfrom
claude/clever-perlman-e6e468
Jun 13, 2026
Merged

Add OSS project infrastructure and CI/CD#1
tuyakhov merged 7 commits into
mainfrom
claude/clever-perlman-e6e468

Conversation

@tuyakhov

Copy link
Copy Markdown
Contributor

Summary

Establishes open-source best-practice tooling for the SDK, modeled on mature Python SDKs (Stripe et al.). No changes to runtime behavior — this is infrastructure, automation, and a formatting normalization.

CI/CD (GitHub Actions)

  • ci.ymlruff check + ruff format --check + mypy on 3.12; pytest with coverage across Python 3.10–3.13; a single aggregate CI status check to point branch protection at.
  • release.yml — build → twine check → publish to PyPI on a published GitHub Release via Trusted Publishing (OIDC) — no stored tokens. Guards that the release tag matches the package version.
  • codeql.yml — security/quality scanning per-PR and weekly.

Repo automation & community health

  • dependabot.yml — grouped weekly updates for pip and github-actions.
  • Issue forms (bug report / feature request) + config, PR template, CONTRIBUTING.md, SECURITY.md.

Developer tooling

  • .pre-commit-config.yaml mirroring the CI lint/format gates.
  • Makefile wrapping install / lint / format / typecheck / test / check / build.

pyproject.toml

  • Version is now dynamic, read from src/senderkit/_version.py (single source of truth) instead of a duplicated literal.
  • Coverage config (branch coverage, fail_under = 85) + stricter pytest opts.
  • Added pytest-cov, pre-commit, build, twine to the dev extra.

Reviewer notes

  • The 8 modified files under src/ and tests/ are purely ruff format normalization (the hand-written code had never been formatted) — needed so the new format gate is green. No logic changed.
  • Verified locally: ruff check, ruff format --check, mypy src, pytest (61 passed, 89.8% coverage), python -m build, and twine check all pass.

One-time setup required (maintainer, not in this PR)

  • Configure a PyPI Trusted Publisher for this repo → workflow release.yml → environment pypi, so release.yml can publish.
  • Optionally point branch protection on main at the CI check.

🤖 Generated with Claude Code

tuyakhov and others added 5 commits June 13, 2026 15:37
Establish open-source best-practice tooling for the SDK, modeled on
mature Python SDKs (Stripe et al.).

CI/CD (GitHub Actions):
- ci.yml: ruff lint + format gate and mypy on 3.12; pytest with coverage
  across Python 3.10-3.13; single `CI` status check for branch protection.
- release.yml: build + twine check + publish to PyPI on GitHub Release via
  Trusted Publishing (OIDC, no stored secrets); verifies tag matches version.
- codeql.yml: weekly + per-PR security/quality scanning.

Repo automation & community health:
- dependabot.yml for pip and github-actions (grouped, weekly).
- Issue forms (bug/feature) + config, PR template, CONTRIBUTING, SECURITY.

Developer tooling:
- .pre-commit-config.yaml mirroring the CI lint/format gates.
- Makefile wrapping install/lint/format/typecheck/test/check/build.

pyproject:
- Version is now dynamic, sourced from src/senderkit/_version.py (single
  source of truth) instead of a duplicated literal.
- Coverage config (branch, fail_under=85); stricter pytest opts.
- Add pytest-cov, pre-commit, build, twine to the dev extra.

Also normalized formatting across the codebase with `ruff format` so the
new CI format gate passes (no behavioral changes).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The CODE_OF_CONDUCT.md file will be added separately.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Job-level `permissions:` replaces the top-level block rather than
merging, so the analyze job only had `security-events: write` and its
token could not read the repo — actions/checkout failed with
"Repository not found". List the full scope set CodeQL needs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

tuyakhov and others added 2 commits June 13, 2026 16:09
Version/Python (PyPI), CI status, license, and ruff/mypy quality badges
for at-a-glance trust signals. The PyPI badges populate on first publish.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- README: add CodeQL workflow-status and Codecov coverage badges; drop
  the static MIT license badge.
- ci.yml: upload coverage.xml to Codecov from each matrix job (flagged
  per Python version). Non-fatal if upload fails so CI stays green.

Codecov badge/upload activate once the repo is added on codecov.io and
the CODECOV_TOKEN secret is set.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tuyakhov tuyakhov merged commit 30b223a into main Jun 13, 2026
8 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.

2 participants