Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: restructure linting & formatting #252

Merged
merged 11 commits into from
Mar 6, 2024

Conversation

Archento
Copy link
Member

@Archento Archento commented Mar 5, 2024

  • changed black and pylint to ruff in poetry environment
  • changed linting & formatting CI workflow to use ruff
  • introduced pre-commit to local dev workflow for automatic linting&formatting before a commit
  • applied isort (which apparently hasn't happened so far)
  • applied a couple of small manual changes that were raised by ruff

I've run all tests and triple-checked the entire repo but please check again if possible for any braking changes.

@Archento
Copy link
Member Author

Archento commented Mar 5, 2024

The python/tests/test_config.py test crashes in Python3.9 due to the zip() method not supporting the strict keyword argument. We need to be careful how we set the tests up, since it was not the unit test that failed but the test code being invoked by all Python distributions in our matrix.

@Archento
Copy link
Member Author

Archento commented Mar 6, 2024

Based on the current runs this has been a 1/3 reduction in time needed for the linting&formatting workflow (~55s down to ~35s) + elimination of every workflow trigger based on a separate "I forgot linting & formatting" commit. 🎉

Copy link
Contributor

@jrriehl jrriehl left a comment

Choose a reason for hiding this comment

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

LGTM

@jrriehl jrriehl enabled auto-merge (squash) March 6, 2024 14:13
@jrriehl jrriehl merged commit a574efd into main Mar 6, 2024
9 checks passed
@jrriehl jrriehl deleted the chore/rethink-linting-formatting branch March 6, 2024 14:16
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