Skip to content

Conversation

@DanWaxman
Copy link

This PR adds continuous integration to the public branch, and fixes linting errors. This is mostly derived as a git cherry-picking of #3. The main difference from #3 is that this applies changes directly to public, without any regard for the under-development numpyro API (or related DPF features).

  • Add continuous integration, including linting and testing
    • Note: I didn't want to undertake significant refactors in dynamax, so these are ignored.
  • Makes many small edits for linting
    • Warning: these are mostly LLM-generated refactors, as the workload would be enormous otherwise, but almost always for very simple and explicitly specified issues (e.g., "Resolve the linting errors outputted in lint_output.txt, including: [E722] use the correct exception (usually an AssertionError), [E402] move imports to the top where needed, [F821] add imports where missing").
    • I've checked all by hand, but please do double-check these.

Remaining to-do:

  • Refactor tests to use pytest, be manageable on a CI machine, and make sure those pass.
  • Consider doing type checking with mypy. This might be very high-effort though.

In general, one may now use make clean to run relevant ruff format and ruff check --fix commands (excluding notebooks and dynamax), make lint to lint, and make test to test.

This mostly used Claude (with some hand-holding about how to handle particular errors) to fix linting errors, since there were over 600.
This ignores some files, e.g., notebooks, that seemed out of scope for now.
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