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

Move to Ruff Formatting and Linting #498

Merged
merged 3 commits into from
Jun 11, 2024
Merged

Conversation

mshriver
Copy link
Contributor

@mshriver mshriver commented May 31, 2024

Move to ruff and ruff-format, include a few rules to replace previous pre-commit hooks for python.

Introduce hadolint, and adhere to (most) of it's rules.

Remaining work:

  • [ * ] Resolve build failures
  • [ * ] Local testing with built images

Trying to trace some history and purpose of the different image building scripts in the repo.

Handling Python updates and podman/compose/OCP template and script updates in another PR.

@mshriver mshriver changed the title BROKEN LINT: ruff lint/format implementations ruff lint/format implementations May 31, 2024
@mshriver mshriver added enhancement New feature or request styling python Pull requests that update Python code labels May 31, 2024
@mshriver mshriver force-pushed the move-to-ruff branch 2 times, most recently from 15ad5c0 to c2f1911 Compare May 31, 2024 17:48
@mshriver mshriver marked this pull request as ready for review June 3, 2024 12:44
@mshriver mshriver changed the title ruff lint/format implementations ruff lint+format implementations Jun 3, 2024
@mshriver mshriver force-pushed the move-to-ruff branch 2 times, most recently from d9ca8e3 to 5498d09 Compare June 3, 2024 17:19
Copy link
Collaborator

@LightOfHeaven1994 LightOfHeaven1994 left a comment

Choose a reason for hiding this comment

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

LGTM.

Note: I'm thinking that we need to have pinned packages instead of what we are doing now. As we had some issues in the past because packages randomly updated. This is out of scope of this PR, but we will need to do that to ensure that ibutsu will not break on prod because of some random package

backend/docker/Dockerfile.fuzz_testing Outdated Show resolved Hide resolved
@mshriver mshriver marked this pull request as draft June 6, 2024 10:49
@mshriver mshriver marked this pull request as ready for review June 10, 2024 13:37
.ruff.toml Show resolved Hide resolved
@mshriver mshriver changed the title ruff lint+format implementations Move to Ruff Formatting and Linting Jun 10, 2024
@mshriver mshriver force-pushed the move-to-ruff branch 3 times, most recently from c3e20b3 to 07bd9e3 Compare June 10, 2024 21:20
ruff lint/format implementations

Update dockerfiles for hadolint standards

add 3.11 to github matrix

Update podman_build.sh script
Track results a bit better, and use printf
Copy link
Collaborator

@LightOfHeaven1994 LightOfHeaven1994 left a comment

Choose a reason for hiding this comment

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

Tested it locally and seems everything works fine. Only one suggestion added

podman_build.sh Outdated Show resolved Hide resolved
Use getopts to implement help text and a flag for images with no
registry

Move default image tag back to quay.io/ibutsu prefix, use new flag to
control it
.pre-commit-config.yaml Show resolved Hide resolved
podman_build.sh Show resolved Hide resolved
@mshriver mshriver merged commit 19db09d into ibutsu:master Jun 11, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python Pull requests that update Python code styling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants