SatelliteShorelines / coastsat_package

prototype pypi package for coastsat
https://pypi.org/project/coastsat-package/
GNU General Public License v3.0
6 stars 1 forks source link

Added ordinal function for correct number endings (1st 2nd 3rd) #13

Closed fmemuir closed 5 months ago

fmemuir commented 5 months ago

When image download messages are printing out (primarily in the CoastSeg messages cell beneath the main map in the ipynb), the same ordinal number ending is used for all numbers of images in a list. As a result, the first few printouts incorrectly read "Downloading 1th image ... Downloading 2th image ... Downloading 3th image". A short function ordinal(n) has been added to SDS_tools to return the correct ordinal ending (1st 2nd 3rd) for any number being used in update printouts. This function has then been implemented throughout SDS_download. This update looks like this in practice: desc=f"{inputs['sitename']}, {satname}: Downloading tif for {i}th image ", changed to desc=f"{inputs['sitename']}, {satname}: Downloading tif for {SDS_tools.ordinal(i)} image ",

2320sharon commented 5 months ago

Hi @fmemuir Thank you for this contributing the ordinal function it improves the readability of the download status messages. I will merge your pull request and include it in the next release, CoastSat_package version v0.1.69.

Thank you again for contributing!