Skip to content

Test infra: pytest migration + tests / lint workflows (#23, #43, #44) - #50

Open
dbqpdb wants to merge 3 commits into
masterfrom
feature/test-infra
Open

Test infra: pytest migration + tests / lint workflows (#23, #43, #44)#50
dbqpdb wants to merge 3 commits into
masterfrom
feature/test-infra

Conversation

@dbqpdb

@dbqpdb dbqpdb commented May 14, 2026

Copy link
Copy Markdown
Owner

Summary

Sets up the test infrastructure in three commits so each can be reviewed independently:

  1. f77b51a — pytest migration (Unit testing #23): adds tests/test_rlm.py with one pytest function per TestRLM method. Bodies delegate to TestRLM for the moment to keep this PR small; inlining as pytest-idiomatic tests is a clean follow-up. Adds pytest to environment.yml and a minimal .gitignore.
  2. 599a9ea — tests CI workflow (CI: run unit tests on pull requests targeting master #43): .github/workflows/tests.yml. Runs on PRs to master and on push to master (post-merge). Installs pytest numpy pandas via pip and runs pytest -v.
  3. c75d163 — lint CI workflow (CI: lint for PEP 8 on pull requests targeting master (advisory) #44): .github/workflows/lint.yml. Runs on every push and every PR (not just master-targeted) so lint issues surface during development. flake8 is run with continue-on-error so findings are visible without blocking merge. Will flip to blocking after Cleanup: bring all code up to PEP 8 #45 (PEP 8 cleanup).

Test plan

Notes / known gaps

  • The push-trigger on tests.yml does not enable direct pushes to master — that's blocked by branch protection. It just runs tests on the merged state of master after a PR lands.
  • Required status checks (CI must pass before merge) are intentionally NOT enabled yet — give the workflows a few runs to prove themselves before tightening.
  • This PR is based on master, so the warning about the tuple-assert pattern will show up in CI output here. PR Quick bug bag: six independent small fixes (#29, #30, #31, #32, #33, #36) #49 (already open) fixes that and the warning will be gone once both PRs merge.

Closes #23, #43, #44.

🤖 Generated with Claude Code

dbqpdb and others added 3 commits May 14, 2026 17:33
Adds tests/test_rlm.py with one pytest function per TestRLM method.
Bodies are delegated to TestRLM for now to keep the migration minimal;
inlining as pytest-idiomatic tests can be a follow-up. Also adds pytest
to environment.yml and a minimal .gitignore for __pycache__ / pytest cache.

Verified locally with pytest 9.x: 5 passed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Runs on pull requests targeting master and on push events to master
(i.e. post-merge). Uses Python 3.11; installs pytest + the runtime deps
(numpy, pandas) via pip rather than reconstructing the full conda env.

Note: the push trigger does NOT enable direct pushes to master — that
is blocked by branch protection. The trigger only fires when a merge
commit lands on master via a PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…44)

Separate workflow file from tests.yml per the agreed CI convention.
Triggers on every push (any branch) and every pull_request so lint
issues surface during development rather than accumulating until a
final merge to master.

Uses continue-on-error so flake8 findings show up in CI without
blocking merge — meant to land before #45 (PEP 8 cleanup), then flip
to blocking once the codebase is clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

Unit testing

1 participant