pysal / spopt

Spatial Optimization
https://pysal.org/spopt/
BSD 3-Clause "New" or "Revised" License
305 stars 46 forks source link

resolve some warnings in CI #439

Closed jGaboardi closed 9 months ago

jGaboardi commented 9 months ago

xref #437

This PR resolves some current warnings being thrown from within the codebase and in CI itself.

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (58017dc) 77.8% compared to head (cc163de) 77.8%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/pysal/spopt/pull/439/graphs/tree.svg?width=650&height=150&src=pr&token=6DbcV5GVAc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal)](https://app.codecov.io/gh/pysal/spopt/pull/439?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal) ```diff @@ Coverage Diff @@ ## main #439 +/- ## ===================================== Coverage 77.8% 77.8% ===================================== Files 27 27 Lines 2638 2638 ===================================== Hits 2053 2053 Misses 585 585 ``` | [Files](https://app.codecov.io/gh/pysal/spopt/pull/439?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal) | Coverage Δ | | |---|---|---| | [spopt/region/azp.py](https://app.codecov.io/gh/pysal/spopt/pull/439?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal#diff-c3BvcHQvcmVnaW9uL2F6cC5weQ==) | `35.8% <100.0%> (ø)` | | | [spopt/region/util.py](https://app.codecov.io/gh/pysal/spopt/pull/439?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal#diff-c3BvcHQvcmVnaW9uL3V0aWwucHk=) | `63.7% <100.0%> (ø)` | |
jGaboardi commented 9 months ago

I had thought I had a nice solution here, but the new method still is being caught. So after checking, we are pulling geopandas==0.14.0+55.gfb3dd81 as dev from GitHub. But, of course, we can get geopandas==0.14.2 from PyPI.

@martinfleis I am wondering if you think we should change something on our end or if this is a tagging issue in the GeoPandas repo?

martinfleis commented 9 months ago

I am wondering if you think we should change something on our end or if this is a tagging issue in the GeoPandas repo?

How do you mean this would be an issue in GeoPandas?

jGaboardi commented 9 months ago

I am wondering if you think we should change something on our end or if this is a tagging issue in the GeoPandas repo?

How do you mean this would be an issue in GeoPandas?

This is not exactly related to the union_all functionality. It seems like maybe the tag isn't exactly catching when installing via GitHub:

$ mamba create -n geopandas_from_github python pip git
$ mamba activate geopandas_from_github
$ pip install git+https://github.com/geopandas/geopandas.git
$ python -c "import geopandas; print(geopandas.__version__)"
0.14.0+55.gfb3dd81

And we can see the same version from within our CI. Should this not be something like 0.14.2+##.###? Perhaps I am missing something?

martinfleis commented 9 months ago

This is expected since we cut minor patches from a branch with backported commits.

jGaboardi commented 9 months ago

@gegen07 & @martinfleis

The fixture I wrote combines all network instantiation stuff for testing and dramatically reduces warning thrown.