pysal / momepy

Urban Morphology Measuring Toolkit
https://docs.momepy.org
BSD 3-Clause "New" or "Revised" License
465 stars 56 forks source link

API: allow silencing of FutureWarnings from legacy API #617

Closed martinfleis closed 4 weeks ago

martinfleis commented 4 weeks ago

This introduces an environment variable ALLOW_LEGACY_MOMEPY which, when set to True, silences all the deprecation warnings about the legacy API.

I am open to a discussion about the name of the variable but I'd say anything without a possibility of conflicts is good enough.

codecov[bot] commented 4 weeks ago

Codecov Report

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

Project coverage is 98.0%. Comparing base (4037c70) to head (cebb597). Report is 53 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/pysal/momepy/pull/617/graphs/tree.svg?width=650&height=150&src=pr&token=VNn0WR5JWT&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal)](https://app.codecov.io/gh/pysal/momepy/pull/617?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal) ```diff @@ Coverage Diff @@ ## main #617 +/- ## ======================================= + Coverage 97.4% 98.0% +0.6% ======================================= Files 26 38 +12 Lines 4328 6115 +1787 ======================================= + Hits 4214 5993 +1779 - Misses 114 122 +8 ``` | [Files](https://app.codecov.io/gh/pysal/momepy/pull/617?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal) | Coverage Δ | | |---|---|---| | [momepy/tests/test\_utils.py](https://app.codecov.io/gh/pysal/momepy/pull/617?src=pr&el=tree&filepath=momepy%2Ftests%2Ftest_utils.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal#diff-bW9tZXB5L3Rlc3RzL3Rlc3RfdXRpbHMucHk=) | `99.4% <100.0%> (+0.1%)` | :arrow_up: | | [momepy/utils.py](https://app.codecov.io/gh/pysal/momepy/pull/617?src=pr&el=tree&filepath=momepy%2Futils.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pysal#diff-bW9tZXB5L3V0aWxzLnB5) | `98.9% <100.0%> (+0.1%)` | :arrow_up: |