Skip to content

Conversation

rettigl
Copy link
Member

@rettigl rettigl commented Nov 19, 2024

Adds exception handling for incomplete files that raise an IOError upon opening.

Closes #522

@rettigl rettigl requested a review from zain-sohail November 21, 2024 12:41
Copy link
Member

@zain-sohail zain-sohail left a comment

Choose a reason for hiding this comment

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

Instead of printing the error, I'd put this as logger warning or info.
Secondly, I'd suggest using a more verbose error message, since you know the likely cause of this occurence: incomplete files.

@rettigl
Copy link
Member Author

rettigl commented Nov 27, 2024

Instead of printing the error, I'd put this as logger warning or info. Secondly, I'd suggest using a more verbose error message, since you know the likely cause of this occurence: incomplete files.

The logging will happen once merged to the v1 branch (here we don't use the logging system yet). I can enhance the error message, thanks.

@rettigl rettigl force-pushed the fix_mpes_incomplete_files branch from a783232 to 9e54ae8 Compare November 28, 2024 21:28
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 12075628220

Details

  • 15 of 30 (50.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 91.786%

Changes Missing Coverage Covered Lines Changed/Added Lines %
sed/loader/mpes/loader.py 15 30 50.0%
Totals Coverage Status
Change from base Build 11999262734: -0.1%
Covered Lines: 6515
Relevant Lines: 7098

💛 - Coveralls

@rettigl rettigl merged commit 1802e2d into main Nov 28, 2024
6 checks passed
@rettigl rettigl deleted the fix_mpes_incomplete_files branch November 28, 2024 21:37
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.

Skip bad h5 files in mpes loader

3 participants