Skip to content

fix(format): add formatting with pre-commit and CI#431

Merged
Shillaker merged 2 commits intoBoavizta:mainfrom
Shillaker:fix/format-all-code
Dec 31, 2025
Merged

fix(format): add formatting with pre-commit and CI#431
Shillaker merged 2 commits intoBoavizta:mainfrom
Shillaker:fix/format-all-code

Conversation

@Shillaker
Copy link
Copy Markdown
Collaborator

@Shillaker Shillaker commented Dec 30, 2025

Closes #429

Changes

  • Add make targets for formatting and checking formatting of code
  • Add CI step to check formatting
  • Add pre-commit hook to check formatting
  • Run formatting across all code (see ruff format)

Note: other than the changes to the CI and Makefile, all other changes are automatic formatting fixes applied by ruff format.

@jonperron
Copy link
Copy Markdown
Collaborator

jonperron commented Dec 30, 2025

@Shillaker nitpick: you should have made several commits (at least two, with one containing only the automatic formatting), only one make the review very difficult.

with:
python-version: 3.12

- name: Install pipenv
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

review: You are installing poetry, not pipenv next line

Copy link
Copy Markdown
Collaborator Author

@Shillaker Shillaker Dec 31, 2025

Choose a reason for hiding this comment

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

Ah good point, this is just copy-pasted from the other workflows. I fixed in all workflow files.

- dev

jobs:
format:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

question: I am wondering if we could not create two separate workflows for format and lint, in addition to test.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Sure, I split it into three separate workflows.

@Shillaker Shillaker merged commit 4235027 into Boavizta:main Dec 31, 2025
6 checks passed
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.

Apply code formatting

2 participants