2.0.0 Future Warnings and Deprecations are Here!
To adhere to the Pep 8 - Python Style centerline-width
has undergone a large overhaul to user functions and class names. 2.0.0
will be the first version release to include deprecation warnings for older function/variable/class names. These functions will continue to work with their original names, but will start to throw FutureWarning
and eventually functionality from these original names will be dropped (but will include helpful tips to transition)
The PEP8 update includes changes to:
- Group imports in alphabetical ordered groups (standard library imports, related third party imports, local specific imports
- Class names use CamelCase convention
- Function names are lowercase and snakecase
- Back end function names preceded by underscore
Why?
These changes is being done to best maintain centerline-width
for future work and collaboration. centerline-width
was originally intended to function for personal academic work, but has been expanded to better serve the geoscience community. Many original decisions were made to maximize clarity, but ended up with verbose, non-ideal, and difficult to read naming conventions (i.e. centerlineEqualDistanceRelative
). As centerline-width
has been moving to a more complete stage, this seemed like a good time to clean up lingering tech debt before moving onto the next stage of river analysis development.
If you have any questions, feel free to submit it at the centerline-width/issues
Impacted Deprecations:
Functions and Variable Names:
extractPointsToTextFile() -> kml_to_csv()
convertColumnsToCSV() -> txt_to_csv()
plotCenterline() -> plot_centerline()
plotCenterlineWidth() -> plot_centerline_width()
riverWidthFromCenterline() -> width()
saveCenterlineCSV() -> save_centerline_csv()
saveCenterlineMAT() -> save_centerline_mat()
kml_to_csv() extra arg -> text_output_name (to be removed)
txt_to_csv() extra arg -> text_file (to be removed)
Class and Variable Names:
riverCenterline -> CenterlineWidth
optional_cutoff extra arg -> cutoff (to be removed)
Variables Names:
centerlineVoronoi -> centerline_voronoi
centerlineEqualDistance -> centerline_equal_distance
centerlineEvenlySpaced -> centerline_evenly_spaced
centerlineSmoothed -> centerline_smoothed
centerlineLength -> centerline_length
rightBankLength -> right_bank_length
leftBankLength -> left_bank_length
centerlineVoronoiRelative -> centerline_voronoi_relative
centerlineEqualDistanceRelative -> centerline_equal_distance_relative
centerlineEvenlySpacedRelative -> centerline_evenly_spaced_relative
centerlineSmoothedRelative -> centerline_smoothed_relative
save_plot_name extra arg -> save_plot (to be removed, plot_centerline, plot_centerline_width)
Additional work
Expanded codecov for new sinuosity functionality, deprecation, and future warnings
Bug fixes and README.md edits
Pytests: Tests for Python 3.10, 3.11, 3.12 against Ubuntu, macOS, Windows