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

Allow read_metadata kwargs to be passed to FileSet.__init__ #79

Merged
merged 7 commits into from
Sep 16, 2024

Conversation

tclose
Copy link
Contributor

@tclose tclose commented Sep 16, 2024

Changes the signature of FileSet.init to:

  • allow var kwargs, which will be interpreted as kwargs to be passed to read_metadata implementations
    • Note, metadata is the only reserved keyword, which can take explicit metadata
  • fspaths are now varargs so SetOf[Png]('/path/to/one/png.png', '/path/to/another/png.png') is now valid

load, save extras hooks and the new method (which uses save to create a new fileformat object) have been moved to base FileSet class.

Copy link

codecov bot commented Sep 16, 2024

Codecov Report

Attention: Patch coverage is 74.64789% with 18 lines in your changes missing coverage. Please review.

Project coverage is 92.14%. Comparing base (45ee936) to head (48aa15e).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
fileformats/core/extras.py 51.72% 9 Missing and 5 partials ⚠️
fileformats/core/mixin.py 77.77% 1 Missing and 1 partial ⚠️
fileformats/image/raster.py 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #79      +/-   ##
==========================================
- Coverage   92.37%   92.14%   -0.23%     
==========================================
  Files          45       45              
  Lines        5219     5234      +15     
  Branches      580      586       +6     
==========================================
+ Hits         4821     4823       +2     
- Misses        301      307       +6     
- Partials       97      104       +7     

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

@tclose tclose merged commit 5f8dd32 into main Sep 16, 2024
16 of 17 checks passed
@tclose tclose deleted the metadata-kwargs branch September 16, 2024 04:45
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.

1 participant