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
✨ Add Folder plugin for save result #620
Conversation
Codecov Report
@@ Coverage Diff @@
## main #620 +/- ##
=======================================
+ Coverage 77.8% 78.0% +0.1%
=======================================
Files 63 64 +1
Lines 3537 3564 +27
Branches 658 663 +5
=======================================
+ Hits 2753 2781 +28
+ Misses 655 654 -1
Partials 129 129
Continue to review full report at Codecov.
|
4c55102
to
59e3f41
Compare
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.
Tested OK.
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.
Please change 'pyglotaran-legacy' to 'legacy' in the context of pyglotaran plugins that should be sufficient.
If we decide to change the folder plugin we can still keep 'legacy' for compatibility or in the long run make it a stand alone plugin.
Added tests for folder plugin where result_path is an existing file without an extension.
That way it can be imported and by tests and there is less code duplication.
ba7d65f
to
826555e
Compare
Sourcery Code Quality Report✅ Merging this PR will increase code quality in the affected files by 4.85%.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Let us know what you think of it by mentioning @sourcery-ai in a comment. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Admittedly the importing of the fixture and that for added |
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.
LGTM. More✨ for pyglotaran
This plugin adds back the functionality from
glotaran.analysis.result.Result.save(result_path)
of pyglotaran0.3.x
.For
glotaran.io.save_result
it also adds inferring offormat_name=="folder"
if the providedresult_path
doesn't have an extension.If
result_path
is a file it will raise aValueError
.Usage equivalent to
result.save(result_path)
Also, the plugin is registered under the names
folder
andpyglotaran-legacy
, thus if we want to fundamentally change thefolder
-plugin we can keep the old implementation around aspyglotaran-legacy
for backward compatibility.Testing
Passing the tests is mandatory.
Closing issues
closes #619