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

Formatting via ruff #662

Merged
merged 6 commits into from
Dec 10, 2023
Merged

Formatting via ruff #662

merged 6 commits into from
Dec 10, 2023

Conversation

jGaboardi
Copy link
Member

This PR:

  • follows the example in xarray-contrib/xvec for swapping out black for ruff format in formatting
  • updates pyproject.toml of this
  • makes several minor linting and formatting corrections
  • updates contributing guidelines and docs/install for supported Python versions

xref #589

Copy link

codecov bot commented Nov 25, 2023

Codecov Report

Merging #662 (4bec45a) into main (f43f880) will not change coverage.
The diff coverage is 100.0%.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main    #662   +/-   ##
=====================================
  Coverage   85.0%   85.0%           
=====================================
  Files        139     139           
  Lines      14889   14889           
=====================================
  Hits       12663   12663           
  Misses      2226    2226           
Files Coverage Δ
libpysal/cg/standalone.py 91.3% <ø> (ø)
libpysal/graph/tests/test_contiguity.py 100.0% <100.0%> (ø)

@martinfleis
Copy link
Member

Do we want to switch to ruff-format? I think it deserves some discussion.

I am all for it. When doing that in xvec I was just curious but the ruff extension in VS Code is so good that I actually noticed a difference compared to black. And it is one less tool to deal with.

@jGaboardi
Copy link
Member Author

Do we want to switch to ruff-format? I think it deserves some discussion.

I am all for it. When doing that in xvec I was just curious but the ruff extension in VS Code is so good that I actually noticed a difference compared to black. And it is one less tool to deal with.

I am also all for it after realizing how simple the switch was, but also agree that we might want a broader discussion and approval. Shall we open an actual issue for this (and keep this PR open), or have more of a discussion in here?

@martinfleis
Copy link
Member

I think it is fine to have it here.

Copy link
Member

@martinfleis martinfleis left a comment

Choose a reason for hiding this comment

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

Giving a formal approval to show my support.

@knaaptime
Copy link
Member

interesting, hadnt seen xvec. We started doing something like that when geosnap started, but it became clear quickly that a long-form geodataframe was far better in our case (since vectors often have different geoms in different time slices...) anyway, another tangent :)

fine with the switch. I use the ruff extension in vscode locally

Copy link
Member

@gegen07 gegen07 left a comment

Choose a reason for hiding this comment

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

Looks good to me! Simplifying the environment is always a good enhancement.

@jGaboardi
Copy link
Member Author

fine with the switch. I use the ruff extension in vscode locally

@knaaptime Can you hit approve to make it more "formal?" 🤵‍♂️

@jGaboardi
Copy link
Member Author

Nows this PR has 3 approvals. @gegen07 @knaaptime @martinfleis Shall we wait another week or so to see if anyone else has opinions? I am perfectly fine taking even longer to make sure we aren't being too hasty.

@martinfleis
Copy link
Member

There's no rush. I'd wait for the next dev call next week.

@jGaboardi
Copy link
Member Author

The dev team in attendance at the 2023-12-7 meeting voted in favor of this implementation. Shall we go ahead and merge now or would it be better to wait longer?

@martinfleis martinfleis merged commit e24adfb into pysal:main Dec 10, 2023
10 checks passed
@jGaboardi jGaboardi deleted the formatting_via_ruff branch December 10, 2023 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants