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

[tooling] Apply Python lint & formatting to entire repo #272

Merged
merged 4 commits into from
Oct 20, 2023

Conversation

BenjaminPelletier
Copy link
Member

This PR reduces complexity and number of invocations to lint and format the repository -- it removes all per-subfolder linting and formatting in favor of one repo-wide lint and format.

It could be argued that lint and format per subfolder might be useful to developers who want to focus on just that subfolder, ignoring everything else. I do not think this is a sufficiently valid use case, however, since we should generally be able to just autoformat everything and have it solve nearly all problems -- it is unlikely a developer will need to isolate formatting or linting attempts to just one portion of the repository. And, enabling that possibility introduces a substantial amount of complexity relative to the single repo-wide operations.

It could also be argued that it would be useful for a developer to not need to change folders in order to, e.g., make format -- if they're in the monitoring/uss_qualifier folder, they should be able to simply make format directly from there instead of changing back to the repo root to run the make format command. I agree this is not fully invalid, but I believe the developer cycles lost to maintaining the complexity of supporting multi-folder make targets far exceeds any time saved by avoiding a second terminal always in the repo root.

@BenjaminPelletier BenjaminPelletier marked this pull request as ready for review October 19, 2023 23:07
Copy link
Contributor

@barroco barroco left a comment

Choose a reason for hiding this comment

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

The main reason was to migrate progressively modules. Glad that we can now safely generalize it to the whole repo 🥳

@@ -30,15 +30,6 @@ jobs:
- name: Shell lint
run: make shell-lint

monitorlib-test:
Copy link
Contributor

@barroco barroco Oct 20, 2023

Choose a reason for hiding this comment

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

I think some tests are still run no?

@BenjaminPelletier BenjaminPelletier merged commit 929197c into interuss:main Oct 20, 2023
8 checks passed
@BenjaminPelletier BenjaminPelletier deleted the black-entire-repo branch October 20, 2023 18:17
github-actions bot added a commit that referenced this pull request Oct 20, 2023
* Apply Python lint & formatting to entire repo

* Remove null monitorlib test

* Remove dependency

* Remove reference to removed target 929197c
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