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

Load_score select the correct parser based on the file extension #314

Merged
merged 2 commits into from
Sep 13, 2023

Conversation

fosfrancesco
Copy link
Member

Load_score select the correct parser based on the file extension instead of try except

Solved a for load_score for match files, which was not returning anything

load_score works based on the extension
@fosfrancesco fosfrancesco linked an issue Sep 8, 2023 that may be closed by this pull request
@fosfrancesco fosfrancesco added the enhancement New feature or request label Sep 8, 2023
@codecov-commenter
Copy link

Codecov Report

Patch coverage is 92.85% of modified lines.

Files Changed Coverage
partitura/io/__init__.py 90.00%
partitura/io/importmei.py 100.00%

📢 Thoughts on this report? Let us know!.

@fosfrancesco fosfrancesco changed the title fixed bug in case of match files Load_score select the correct parser based on the file extension Sep 8, 2023
Copy link
Member

@manoskary manoskary left a comment

Choose a reason for hiding this comment

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

This PR is a very useful addition, that should also avoid unnecessary import errors and speed up loading. However, a minor change is suggested.

partitura/io/__init__.py Outdated Show resolved Hide resolved
@fosfrancesco
Copy link
Member Author

Changed as requested

Copy link
Member

@manoskary manoskary left a comment

Choose a reason for hiding this comment

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

This PR changes from a try except loop to a file extension parse selecting method which yields a speed up and avoids parsing format mismatches.

@manoskary manoskary removed the request for review from CarlosCancino-Chacon September 13, 2023 10:08
@manoskary manoskary merged commit d453266 into develop Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

load_score based on file extension
3 participants