Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

fmemuir
Copy link
Contributor

@fmemuir fmemuir commented Jun 10, 2024

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 2320sharon self-assigned this Jun 10, 2024
@2320sharon 2320sharon added the enhancement New feature or request label Jun 10, 2024
@2320sharon
Copy link
Collaborator

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!

@2320sharon 2320sharon merged commit 57135bb into SatelliteShorelines:master Jun 10, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants