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

Apply code style to project #3231

Merged
merged 5 commits into from
Oct 30, 2023
Merged

Apply code style to project #3231

merged 5 commits into from
Oct 30, 2023

Conversation

justinmayer
Copy link
Member

@justinmayer justinmayer commented Oct 29, 2023

  • Remove upper version caps
  • Update the minimum version of most of Pelican's runtime deps
  • Replace Black with Ruff as a formatter for Pelican
  • Add a cache step to the docs CI task so that the docs can be
    downloaded and inspected.
  • Run pre-commit on all files during CI test job

Resolves #3217
Resolves #3227
Closes #3123

offbyone and others added 4 commits October 29, 2023 22:11
- remove upper version caps
- updated the minimum version of most of Pelican's runtime deps
- replaced black with ruff as a formatter for pelican
- added a cache step to the docs CI task so that the docs can be
  downloaded and inspected.
@justinmayer
Copy link
Member Author

Assuming the SHA doesn't change for the commit titled Apply code style to project via: ruff format ., before this PR is merged, the following commit hash should be added to the .git-blame-ignore-revs file so that blame will be correct: cabdb26cee66e1173cf16cb31d3fe5f9fa4392e7

Copy link
Contributor

@offbyone offbyone left a comment

Choose a reason for hiding this comment

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

Ship it!

@boxydog
Copy link
Contributor

boxydog commented Oct 30, 2023

Oof, the double quotes. I don't object, but this really rules out any automated resolution of any existing PRs. But, I approve of forward motion!

pyproject.toml Outdated
"flake8>=6.1.0",
"flake8-import-order>=0.18.2",
"invoke>=2.2.0",
"isort>=5.12.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't isort be removed then?

Suggested change
"isort>=5.12.0",

Copy link
Member Author

Choose a reason for hiding this comment

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

I believe so, and for that matter I think Flake8 and Black should also be removed, right @offbyone?

Copy link
Contributor

Choose a reason for hiding this comment

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

I am not @offbyone, but I don't see black or isort in .pre-commit-config.yaml, so I agree.

Copy link
Contributor

Choose a reason for hiding this comment

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

Correct; I left them in on the chance that someone ran them by hand, but yeah, they should be yeeted.

Copy link
Member

@pauloxnet pauloxnet left a comment

Choose a reason for hiding this comment

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

LGTM

@justinmayer
Copy link
Member Author

Many thanks to @boxydog, @offbyone, @lioman, and @pauloxnet for helping with this endeavor. Much appreciated! 🤗

@justinmayer justinmayer merged commit a20cd8d into master Oct 30, 2023
29 checks passed
@justinmayer justinmayer deleted the enforce-code-style branch October 30, 2023 18:50
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.

Replace Flake8 & isort with Ruff
5 participants