Add action that runs backend linting and unit tests - #48
Merged
Conversation
willbarton
marked this pull request as draft
March 25, 2026 14:29
willbarton
force-pushed
the
actions
branch
2 times, most recently
from
March 25, 2026 15:36
2cb7b23 to
c9068e7
Compare
willbarton
marked this pull request as ready for review
March 25, 2026 15:43
schbetsy
approved these changes
Mar 25, 2026
schbetsy
left a comment
Collaborator
There was a problem hiding this comment.
Two small comments, but LGTM regardless.
All of the changes are very reasonable. Too bad the line length rule means adding ~900 lines
This adds a GitHub Action that runs our backend linting and unittests and reports test coverage in the action logs on pushes and PRs to `main`. The linting will require a set of changes to satisfy the linter that will come in a subsequent commit.
This is the result of running `ruff check --fix` to fix linting issues that ruff is able to automatically fix. The majority of these are import sorting and spacing fixes. There are a few fixes that remove superfluous `"r"` arguments to `open()` and unnecessary `class Classname()` parentheses. ruff has also converted some format strings to f-strings. It's also collapsed some combined `with as` blocks
These are changes I've made manually to satisfy `ruff check`. Most of them are line-length related, some are because ruff flags that it's most correct to `raise ... from err` when inside another exception, and some are to collapse multiple `with` or `if` statements.
schbetsy
approved these changes
Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a GitHub Action that runs our backend linting and unittests and reports test coverage in the action logs on pushes and PRs to
main. The linting requires a set of changes to satisfy the linter that are in the last two commits here.One of them performs automatic fixes by using
ruff check --fix. The majority of these are import sorting and spacing fixes. There are a few fixes that remove superfluous"r"arguments toopen()and unnecessaryclass Classname()parentheses. ruff has also converted some format strings to f-strings. It's also collapsed some combinedwith asblocksThe other is a set of manual fixes I've done. Most of them are line-length related, some are because ruff flags that it's most correct to
raise ... from errwhen inside another exception, and some are to collapse multiplewithorifstatements.These will run sequentially as written for now, linting first, then unittests, then coverage.
With these commits together, the actions should pass on this PR.
I would maybe recommend maybe reviewing this PR commit-by-commit, because there's a lot files it touches.
Checklist