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

More descriptive scene index error message. #458

Merged
merged 2 commits into from
Feb 9, 2023

Conversation

pgarrison
Copy link
Contributor

The issue

If you read a file with 49 scenes and try to use scene index 49 to get the last one, the error message doesn't make the off-by-one error clear, since 49 is not greater than 49.

The fix

Update the error message

Extra context

This issue came up because the AICS camera alignment service takes the scene index as user input through a web UI -- we should improve that UI, but this can help too.

@codecov-commenter
Copy link

codecov-commenter commented Feb 9, 2023

Codecov Report

Base: 94.00% // Head: 62.22% // Decreases project coverage by -31.79% ⚠️

Coverage data is based on head (2d8cef1) compared to base (b9925b3).
Patch has no changes to coverable lines.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #458       +/-   ##
===========================================
- Coverage   94.00%   62.22%   -31.79%     
===========================================
  Files          46       46               
  Lines        4021     4021               
===========================================
- Hits         3780     2502     -1278     
- Misses        241     1519     +1278     
Impacted Files Coverage Δ
aicsimageio/readers/reader.py 91.37% <ø> (-1.15%) ⬇️
aicsimageio/tests/test_aics_image.py 0.00% <0.00%> (-100.00%) ⬇️
aicsimageio/tests/test_dimensions.py 0.00% <0.00%> (-100.00%) ⬇️
aicsimageio/tests/utils/test_io_utils.py 0.00% <0.00%> (-100.00%) ⬇️
aicsimageio/tests/readers/test_glob_reader.py 0.00% <0.00%> (-100.00%) ⬇️
aicsimageio/tests/writers/test_ome_tiff_writer.py 0.00% <0.00%> (-100.00%) ⬇️
...icsimageio/tests/readers/test_array_like_reader.py 0.00% <0.00%> (-100.00%) ⬇️
aicsimageio/tests/readers/test_tiff_reader.py 0.00% <0.00%> (-99.04%) ⬇️
aicsimageio/tests/test_transforms.py 0.00% <0.00%> (-99.00%) ⬇️
...ts/readers/extra_readers/test_bioformats_reader.py 0.00% <0.00%> (-96.73%) ⬇️
... and 15 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@toloudis toloudis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One spelling typo but otherwise this change looks good!

@toloudis toloudis self-requested a review February 9, 2023 21:34
Copy link
Collaborator

@evamaxfield evamaxfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dan caught the typo. Looks good from me though

@toloudis toloudis merged commit dec7563 into main Feb 9, 2023
@toloudis toloudis deleted the bugfix/improved-scene-index-error-message branch February 9, 2023 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants