I made some edits throughout the scripts and notebooks to minimize the warnings when running pytest. This can help future-proof the repo against upcoming deprecations
Pandas Related
Address pandas' SettingWithCopyWarning warning by creating a copy when applicable
Replacing instances of using pandas operations that use inplace to use instead use standard assignment for consistency since some instances of using inplace are deprecated
Replaced usage of np.array_split on a dataframe to be a straightforward list comprehension due to a pandas/geopandas warning
Raster Zonal Stats Related
Added a CRS check for both the rasterstats and exactextract implementations of raster zonal stats
Made new tests and fixed existing tests in test_raster_zonal_stats.py
Overall cleanup
Used nbdev_clean to remove metadata from notebooks (that's why so many notebooks are affected lol)
Slight edits for readability (e.g. .format to f-string etc.)
How to check for reviewers
As for the scripts, you only need to check test_raster_zonal_stats.py and test_raster_process.py
For the notebooks, use ReviewNB to review so it's easier since it skips notebooks with only metadata edits from nbdev_clean
I made some edits throughout the scripts and notebooks to minimize the warnings when running pytest. This can help future-proof the repo against upcoming deprecations
Pandas Related
SettingWithCopyWarning
warning by creating a copy when applicableinplace
to use instead use standard assignment for consistency since some instances of usinginplace
are deprecatednp.array_split
on a dataframe to be a straightforward list comprehension due to a pandas/geopandas warningRaster Zonal Stats Related
test_raster_zonal_stats.py
Overall cleanup
nbdev_clean
to remove metadata from notebooks (that's why so many notebooks are affected lol)How to check for reviewers
test_raster_zonal_stats.py
andtest_raster_process.py
nbdev_clean