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

Ruff #23

Merged
merged 12 commits into from
Apr 17, 2024
Merged

Ruff #23

merged 12 commits into from
Apr 17, 2024

Conversation

isaaccorley
Copy link
Owner

Ruff appears to be an alternative to using separate black/flake8/isort/pyupgrade/pydocstyle. This PR transitions the repo to use ruff.

Copy link
Collaborator

@adamjstewart adamjstewart left a comment

Choose a reason for hiding this comment

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

I'm surprised there are no pydocstyle changes, given that the original pydocstyle contains a lot of bugs that prevent detection of issues. Do you need to add some kind of configuration setting to enable pydocstyle checking?

pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@isaaccorley
Copy link
Owner Author

I'm surprised there are no pydocstyle changes, given that the original pydocstyle contains a lot of bugs that prevent detection of issues. Do you need to add some kind of configuration setting to enable pydocstyle checking?

I'll do that in a separate PR. The library itself didn't have many docstrings for the classes and functions and I haven't had the time to go through and add all of them.

pyproject.toml Outdated Show resolved Hide resolved
@adamjstewart
Copy link
Collaborator

README still references the old tools

pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Apr 13, 2024
@isaaccorley
Copy link
Owner Author

@adamjstewart I made some updates and fixed the actions. Note that ruff format doesn't run isort you need to run ruff check --fix

pyproject.toml Outdated Show resolved Hide resolved
@github-actions github-actions bot removed the decoders label Apr 13, 2024
Copy link
Collaborator

@adamjstewart adamjstewart left a comment

Choose a reason for hiding this comment

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

Surprised no code changes were required, I guess the repo is just smaller and simpler than TorchGeo.

README.md Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@isaaccorley
Copy link
Owner Author

Surprised no code changes were required, I guess the repo is just smaller and simpler than TorchGeo.

It's because I don't have pydocstyle enabled. When I do that's going to be a huge PR to fix 305 errors lol

Copy link

@notprime notprime left a comment

Choose a reason for hiding this comment

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

it looks fine to me :D

Copy link
Collaborator

@adamjstewart adamjstewart left a comment

Choose a reason for hiding this comment

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

No remaining issues, just things that could theoretically be in a separate PR.

- name: Cache dependencies
uses: actions/cache@v4.0.0
uses: actions/cache@v4.0.2
Copy link
Collaborator

Choose a reason for hiding this comment

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

Most of these version bumps should be saved for another PR, probably by dependabot


#### Install dev dependencies

For development you can install the required dependencies using `pip install '.[all]'.
Copy link
Collaborator

Choose a reason for hiding this comment

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

These should really be in a separate PR too

split-on-trailing-comma = false

[tool.ruff.lint.pydocstyle]
convention = "google"
Copy link
Collaborator

Choose a reason for hiding this comment

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

This isn't being used yet

@isaaccorley isaaccorley merged commit 12497d8 into main Apr 17, 2024
14 checks passed
@isaaccorley isaaccorley deleted the tools/ruff branch April 17, 2024 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies documentation Improvements or additions to documentation testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants