pysal / spreg

Spatial econometric regression in Python
https://pysal.org/spreg/
Other
67 stars 23 forks source link

`ruff` format repo #156

Closed jGaboardi closed 2 weeks ago

jGaboardi commented 2 weeks ago

This MR:

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 57.81041% with 316 lines in your changes missing coverage. Please review.

Project coverage is 67.6%. Comparing base (d92edcb) to head (8a0969d). Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
spreg/dgp.py 17.9% 69 Missing :warning:
spreg/error_sp_regimes.py 48.6% 35 Missing and 1 partial :warning:
spreg/error_sp.py 59.3% 20 Missing and 2 partials :warning:
spreg/error_sp_het.py 48.6% 18 Missing and 1 partial :warning:
spreg/utils.py 25.0% 16 Missing and 2 partials :warning:
spreg/error_sp_hom.py 65.8% 12 Missing and 1 partial :warning:
spreg/ols_regimes.py 38.1% 13 Missing :warning:
spreg/error_sp_hom_regimes.py 72.7% 11 Missing and 1 partial :warning:
spreg/twosls_sp_regimes.py 65.7% 11 Missing and 1 partial :warning:
spreg/error_sp_het_regimes.py 75.0% 10 Missing and 1 partial :warning:
... and 16 more
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/pysal/spreg/pull/156/graphs/tree.svg?width=650&height=150&src=pr&token=9VrJpIYIl3&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal)](https://app.codecov.io/gh/pysal/spreg/pull/156?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal) ```diff @@ Coverage Diff @@ ## main #156 +/- ## ===================================== Coverage 67.6% 67.6% ===================================== Files 41 41 Lines 9622 9622 Branches 1433 1433 ===================================== Hits 6504 6504 Misses 2704 2704 Partials 414 414 ``` | [Files with missing lines](https://app.codecov.io/gh/pysal/spreg/pull/156?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal) | Coverage Δ | | |---|---|---| | [spreg/diagnostics.py](https://app.codecov.io/gh/pysal/spreg/pull/156?src=pr&el=tree&filepath=spreg%2Fdiagnostics.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal#diff-c3ByZWcvZGlhZ25vc3RpY3MucHk=) | `87.0% <100.0%> (ø)` | | | [spreg/diagnostics\_panel.py](https://app.codecov.io/gh/pysal/spreg/pull/156?src=pr&el=tree&filepath=spreg%2Fdiagnostics_panel.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal#diff-c3ByZWcvZGlhZ25vc3RpY3NfcGFuZWwucHk=) | `96.0% <100.0%> (ø)` | | | [spreg/diagnostics\_sp.py](https://app.codecov.io/gh/pysal/spreg/pull/156?src=pr&el=tree&filepath=spreg%2Fdiagnostics_sp.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal#diff-c3ByZWcvZGlhZ25vc3RpY3Nfc3AucHk=) | `97.0% <100.0%> (ø)` | | | [spreg/diagnostics\_sur.py](https://app.codecov.io/gh/pysal/spreg/pull/156?src=pr&el=tree&filepath=spreg%2Fdiagnostics_sur.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal#diff-c3ByZWcvZGlhZ25vc3RpY3Nfc3VyLnB5) | `100.0% <100.0%> (ø)` | | | [spreg/diagnostics\_tsls.py](https://app.codecov.io/gh/pysal/spreg/pull/156?src=pr&el=tree&filepath=spreg%2Fdiagnostics_tsls.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal#diff-c3ByZWcvZGlhZ25vc3RpY3NfdHNscy5weQ==) | `87.9% <ø> (ø)` | | | [spreg/panel\_fe.py](https://app.codecov.io/gh/pysal/spreg/pull/156?src=pr&el=tree&filepath=spreg%2Fpanel_fe.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal#diff-c3ByZWcvcGFuZWxfZmUucHk=) | `94.5% <ø> (ø)` | | | [spreg/panel\_utils.py](https://app.codecov.io/gh/pysal/spreg/pull/156?src=pr&el=tree&filepath=spreg%2Fpanel_utils.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal#diff-c3ByZWcvcGFuZWxfdXRpbHMucHk=) | `49.2% <ø> (ø)` | | | [spreg/regimes.py](https://app.codecov.io/gh/pysal/spreg/pull/156?src=pr&el=tree&filepath=spreg%2Fregimes.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal#diff-c3ByZWcvcmVnaW1lcy5weQ==) | `81.1% <100.0%> (ø)` | | | [spreg/sp\_panels.py](https://app.codecov.io/gh/pysal/spreg/pull/156?src=pr&el=tree&filepath=spreg%2Fsp_panels.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal#diff-c3ByZWcvc3BfcGFuZWxzLnB5) | `87.0% <ø> (ø)` | | | [spreg/sur.py](https://app.codecov.io/gh/pysal/spreg/pull/156?src=pr&el=tree&filepath=spreg%2Fsur.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal#diff-c3ByZWcvc3VyLnB5) | `76.8% <ø> (ø)` | | | ... and [27 more](https://app.codecov.io/gh/pysal/spreg/pull/156?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal) | |
knaaptime commented 2 weeks ago

this looks like a lot of changes, but it's nothing but formatting. Everything's passing. Will wait for @pedrovma's approval, but this is ready to merge

jGaboardi commented 2 weeks ago

@pedrovma After this PR is reviewed and merged (like @knaaptime mentioned, it's only formatting changes), I will get started with #155, which will be more involved. However, both standardized formatting and implementing linting will result in a much more maintainable codebase.

pedrovma commented 2 weeks ago

This is great. The issue here is just that several of these files have already been modified in the private GeoDa repo, so some of the new formatting may be lost. But I will do my best to merge them appropriately! Many thanks, @jGaboardi!

jGaboardi commented 2 weeks ago

have already been modified in the private GeoDa repo

One thing you can do is also run ruff format spreg on the private repo side of things. That will make merging in much less painful later.

martinfleis commented 2 weeks ago

Just a question. Why do you have a private repo instead of developing in public like we do in any other package? It is super hard to make contributions to spreg if we don't know what is the current state of the codebase.

lanselin commented 2 weeks ago

That's by design. Pedro and I made that decision a long time ago to make development more efficient. The focus is on adding new methods and that is done most efficiently between the two of us without the overhead of the standard GitHub protocol. We're the gate keepers, so to speak. When the code is ready, it goes to the open repo, but for any substantive changes/contributions, people should contact us first.

martinfleis commented 2 weeks ago

Fair.

for any substantive changes/contributions, people should contact us first.

Shall we add a note on that to the Readme, so the contributing process is clear?

lanselin commented 2 weeks ago

Sure, great idea.