To adhere to the [Pep 8 - Python Style](https://peps.python.org/pep-0008/) `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:
- [x] Group imports in [alphabetical ordered groups](https://peps.python.org/pep-0008/#imports) (standard library imports, related third party imports, local specific imports
- [x] [Class names](https://peps.python.org/pep-0008/#class-names) use CamelCase convention
- [x] [Function names](https://peps.python.org/pep-0008/#function-and-variable-names) are lowercase and snakecase
- [x] 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](https://github.com/cyschneck/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_