Skip to content

feat(ci): add GitHub Actions workflow and configure ruff + pytest#2

Merged
thanhndv212 merged 1 commit into
masterfrom
feat/ci-workflow
Jun 21, 2026
Merged

feat(ci): add GitHub Actions workflow and configure ruff + pytest#2
thanhndv212 merged 1 commit into
masterfrom
feat/ci-workflow

Conversation

@thanhndv212

Copy link
Copy Markdown
Owner

M1.2 — CI Workflow + Lint Configuration

.github/workflows/ci.yml

  • Runs on push to master and all PRs
  • Matrix: Python 3.10, 3.11, 3.12 (fail-fast: false)
  • Steps: checkout → setup-python → pip install -e ".[dev]"ruff check .pytest tests/ -v
  • MPLBACKEND=Agg for headless test runs

ruff + pytest config in pyproject.toml

  • ruff: line-length 100, py310 target, rules E/F/W/I/UP, ignore E501 (long lines)
  • pytest: testpaths, addopts, registered 'slow' marker
  • .gitignore: added .ruff_cache/

Lint cleanup (34 files)

  • Auto-sorted imports across all source/test/example files (I-rule)
  • Renamed ambiguous variables (E741): llink/label, II_mat
  • Removed unused variables (F841)
  • Added # noqa: F401 on all __init__.py re-exports
  • Moved mid-file import to top (E402 in test_sensor_models.py)
ruff check .   # ✅ All checks passed!
pytest tests/  # ✅ 70 passed

Part of M1 (Foundation Hardening).

Adds CI pipeline running on every push to master and all PRs:
  - Matrix: Python 3.10, 3.11, 3.12
  - Lint step with ruff
  - Test step with pytest (MPLBACKEND=Agg for headless)

Adds ruff and pytest configuration to pyproject.toml:
  - ruff: line-length 100, py310+, rules E/F/W/I/UP
  - pytest: testpaths, addopts, 'slow' marker

Lint cleanup across the codebase (ruff --fix):
  - Import sorting (I-rule) across 30+ files
  - Renamed ambiguous variables (E741): l→link, l→label, I→I_mat
  - Removed unused variables (F841)
  - Added # noqa: F401 on __init__.py re-exports
  - Moved mid-file import to top (E402 in test_sensor_models.py)

Adds .ruff_cache/ to .gitignore.
@thanhndv212 thanhndv212 merged commit d3fbfaf into master Jun 21, 2026
4 checks passed
@thanhndv212 thanhndv212 deleted the feat/ci-workflow branch June 21, 2026 11:43
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