Skip to content

Untrack __pycache__ files and add CI workflow - #1

Merged
ctfle merged 2 commits into
mainfrom
chore/repo-hygiene
Oct 26, 2026
Merged

ctfle merged 2 commits into
mainfrom
chore/repo-hygiene

Conversation

@ctfle

@ctfle ctfle commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Untrack the 19 __pycache__/*.pyc files that were committed despite being listed in .gitignore.
  • Add .github/workflows/ci.yml (runs on pushes to main and on pull requests):
    • lint: ruff check --select E9,F63,F7,F82 (syntax errors and undefined names only; the full default rule set reports ~294 findings and is not gated yet).
    • test: serial pytest, then mpirun -n 2 pytest --with-mpi tests/mpi, on Python 3.10 with OpenMPI.

Not included

  • docs/html/ is still tracked, since the GitHub Pages site appears to be served from docs/.

Test plan

  • CI workflow runs green on this PR (the workflow has not run anywhere yet; the MPI step may need adjustments).

Generated by Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VDLtceXNvT4JLKotTJL5KN

@ctfle ctfle left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review of the diff (cannot approve my own PR). No blockers; the points below are things to check or tighten.

Pycache removal: exactly the 19 tracked .pyc files are deleted, and __pycache__/ and *.py[cod] are already in .gitignore. Fine.

.github/workflows/ci.yml

  • Unverified: no check runs are reported on the head commit yet, so the workflow has not run. Actions may need to be enabled for the repo. The first run decides whether the MPI step works (libopenmpi-dev build of mpi4py, --oversubscribe, pytest-mpi).
  • Token permissions: add permissions: contents: read at the top, since the jobs only read the repo.
  • Duplicated runs: the plain pytest step also collects tests/mpi. I expect the with_mpi tests to be skipped there, but check that on the first run. If they are not, add --ignore=tests/mpi to that step.
  • --allow-run-as-root: GitHub runners are not root, so this flag is probably unnecessary. Harmless, but can be dropped.
  • Speed: consider cache: pip on setup-python, and a concurrency group so superseded runs on a PR are cancelled.
  • Lint scope: the gate is limited to E9,F63,F7,F82 on purpose. The full default rule set reports ~294 findings and ruff format --check flags 4 files. Widening it is a follow-up.

Not covered: docs/html/ is still tracked (stated in the description).


Generated by Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VDLtceXNvT4JLKotTJL5KN
@ctfle
ctfle merged commit 824bfba into main Oct 26, 2026
1 of 2 checks passed
ctfle added a commit that referenced this pull request Nov 6, 2026
* Untrack committed __pycache__ files and add CI workflow

* CI: restrict workflow token to read-only contents
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