Skip to content

Add CI quality tooling: coverage, type checking, formatting, security#25

Merged
dkijania merged 2 commits intomasterfrom
dkijania/ci-quality-tooling
Apr 14, 2026
Merged

Add CI quality tooling: coverage, type checking, formatting, security#25
dkijania merged 2 commits intomasterfrom
dkijania/ci-quality-tooling

Conversation

@dkijania
Copy link
Copy Markdown
Member

Summary

Add comprehensive quality gates to the CI pipeline:

Job Tool What it checks
lint ruff check Expanded rules: pycodestyle, pyflakes, isort, naming, pyupgrade, bugbear, builtins, bandit, print, simplify, ruff
lint ruff format Consistent code formatting
typecheck mypy Type annotations, untyped defs
security bandit Security anti-patterns in source code
security pip-audit Known vulnerabilities in dependencies
test pytest-cov Test coverage with branch tracking (86%, threshold 70%)
build hatchling Only runs after all quality gates pass

New dev dependencies

  • pytest-cov -- coverage reporting
  • mypy -- static type checking
  • bandit -- security linter
  • pip-audit -- dependency vulnerability scanner

Config added to pyproject.toml

  • [tool.ruff.lint] -- expanded rule set with per-file ignores
  • [tool.ruff.format] -- double quotes, space indent
  • [tool.mypy] -- strict untyped defs, ignore missing imports
  • [tool.coverage] -- branch tracking, 70% minimum, show missing
  • [tool.bandit] -- exclude tests, skip B311 (non-crypto random)

Code changes

  • All source files reformatted by ruff format
  • Sorted __all__ in __init__.py
  • Sorted imports in examples

Test plan

  • ruff check passes with expanded rules
  • ruff format --check passes
  • mypy src/ passes
  • bandit -r src/ passes (0 issues)
  • pytest --cov reports 86% coverage
  • All 38 unit tests pass
  • CI

🤖 Generated with Claude Code

dkijania and others added 2 commits April 14, 2026 10:43
CI pipeline now runs 5 jobs:
- lint: ruff check + ruff format --check (expanded rules: bugbear,
  naming, security, simplify, pyupgrade)
- typecheck: mypy with strict untyped defs
- security: bandit scan + pip-audit dependency check
- test: pytest with coverage (86%, threshold 70%), across 3.10-3.13
- build: only after all quality gates pass

New dev dependencies: pytest-cov, mypy, bandit, pip-audit

pyproject.toml:
- Expanded ruff rules: N, UP, B, A, S, T20, SIM, RUF
- Added ruff format config
- Added mypy config
- Added coverage config with branch tracking
- Added bandit config

All existing code reformatted by ruff format.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Resolve merge conflicts in __init__.py and examples/basic_usage.py.
Sort __all__ alphabetically (RUF022), remove unused noqa directive,
suppress S105 false positive on "TOKEN" query variable names.
Reformat merged files with ruff format.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dkijania dkijania self-assigned this Apr 14, 2026
@dkijania dkijania merged commit dd408e0 into master Apr 14, 2026
9 checks passed
@dkijania dkijania deleted the dkijania/ci-quality-tooling branch April 14, 2026 09:02
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