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

Use context manager for reading Excel file #818

Merged
merged 5 commits into from
Feb 28, 2024

Conversation

phackstock
Copy link
Contributor

@phackstock phackstock commented Feb 27, 2024

Please confirm that this PR has done the following:

  • Tests Added
  • Documentation Added
  • Name of contributors Added to AUTHORS.rst
  • Description in RELEASE_NOTES.md Added

Description of PR

Closes #817.
Use a context manager to ensure that an Excel file is closed after reading.

FYI @adrivinca

Copy link
Member

@danielhuppmann danielhuppmann left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

Copy link

codecov bot commented Feb 28, 2024

Codecov Report

Attention: Patch coverage is 90.90909% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 94.8%. Comparing base (0762055) to head (e503e65).

Files Patch % Lines
pyam/utils.py 90.9% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main    #818   +/-   ##
=====================================
  Coverage   94.8%   94.8%           
=====================================
  Files         64      64           
  Lines       6089    6089           
=====================================
  Hits        5775    5775           
  Misses       314     314           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@phackstock
Copy link
Contributor Author

Pinned ixmp4==0.6.0 after a test broke when using ixmp4 version 0.7.0.

@phackstock phackstock merged commit 3d13de4 into IAMconsortium:main Feb 28, 2024
11 checks passed
@phackstock phackstock deleted the bugfix/read-excel branch February 28, 2024 10:38
@danielhuppmann danielhuppmann mentioned this pull request Mar 1, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pyam read Excel does not close file
2 participants