-
Notifications
You must be signed in to change notification settings - Fork 11
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
MNT: Refactor extraction code #367
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx @jsheunis .
Only one thing. Let's move the extractor_type
variable into the ExtractionArguments
-class (see comments in the code)
Co-authored-by: Christian Mönch <christian.moench@web.de>
Co-authored-by: Christian Mönch <christian.moench@web.de>
Co-authored-by: Christian Mönch <christian.moench@web.de>
Co-authored-by: Christian Mönch <christian.moench@web.de>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #367 +/- ##
=======================================
Coverage 86.28% 86.28%
=======================================
Files 88 88
Lines 4842 4828 -14
=======================================
- Hits 4178 4166 -12
+ Misses 664 662 -2
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 in Codecov by Sentry. |
Thanks, good suggestion. I committed some of your suggestions, added more changes in 9eb3a51, including updating tests to reflect the changed parameter. |
@christian-monch I'll leave the merging to you once you're happy with the state of the PR. |
Thx a lot @jsheunis |
This was supposed to be part of #367, but fell through the cracks. This addition ensures that the correct type is displayed in the metadata record output from `meta-extract`
This PR:
get_required_content
method to the base classMetadataExtractorBase
so that bothFileMetadataExtractor
andDatasetMetadataExtractor
can make use of it (addresses Shouldget_required_content()
also be available for file-level extractors? #287)extract.py
in order to deduplicate code, and updates related tests (addresses MNT: refactorextract.py
to deduplicate code #366):do_file_extraction()
anddo_dataset_extraction()
into a single functiondo_extraction()
, with a new argumentextractor_type
, which would be either'file'
or'dataset'
.perform_file_metadata_extraction()
andperform_dataset_metadata_extraction()
into a single functionperform_metadata_extraction()