-
Notifications
You must be signed in to change notification settings - Fork 18
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
Fix/cli0.5 #765
Fix/cli0.5 #765
Conversation
Codecov Report
@@ Coverage Diff @@
## staging #765 +/- ##
=========================================
+ Coverage 80.8% 83.2% +2.3%
=========================================
Files 71 72 +1
Lines 4061 4081 +20
Branches 730 736 +6
=========================================
+ Hits 3285 3397 +112
+ Misses 645 550 -95
- Partials 131 134 +3
Continue to review full report at Codecov.
|
The CLI also should have some tests, so if it breaks again we actually see it. from glotaran import cli
from click.testing import CliRunner
def test_command_line_interface():
"""Test the CLI."""
runner = CliRunner()
result = runner.invoke(cli.main)
assert result.exit_code == 0
assert "glotaran.cli.main" in result.output
help_result = runner.invoke(cli.main, ["--help"])
assert help_result.exit_code == 0
assert "--help Show this message and exit." in help_result.output |
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.
There is still room for more fixes 😛
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.
Left some comments suggestion to avoid importing glotaran as gta
and to call the entrypoint of the CLI main.
Avoid using import glotaran as gta Replace calls to deprecated function
Sourcery Code Quality Report❌ Merging this PR will decrease code quality in the affected files by 0.09%.
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! Help us improve this quality report! |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
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.
I resolved the issues I found, so @joernweissenborn and @jsnel release review my changes.
Benchmark is done. Checkout the benchmark result page. Benchmark diffParametrized benchmark signatures: BenchmarkOptimize.time_optimize(index_dependent, grouped, weight)
|
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.
Still needs a bit better test coverage but otherwise ok for merge now.
Various fixes and improvements to the glotaran command line interface. * Changed CLI save plugin to folder * Added outputformat option to CLI * Added basic test for CLI * Rename CLI entrypoint to main and add more CLI tests * 👌 CLI use same default for non_negative_least_squares as scheme * 👌 CLI dedent pluginlist output * 🩹 CLI fixed result outformat accepting none supported formats Co-authored-by: Joris Snellenburg <[email protected]> Co-authored-by: s-weigand <[email protected]>
Various fixes and improvements to the glotaran command line interface. * Changed CLI save plugin to folder * Added outputformat option to CLI * Added basic test for CLI * Rename CLI entrypoint to main and add more CLI tests * 👌 CLI use same default for non_negative_least_squares as scheme * 👌 CLI dedent pluginlist output * 🩹 CLI fixed result outformat accepting none supported formats Co-authored-by: Joris Snellenburg <[email protected]> Co-authored-by: s-weigand <[email protected]>
Various fixes and improvements to the glotaran command line interface. * Changed CLI save plugin to folder * Added outputformat option to CLI * Added basic test for CLI * Rename CLI entrypoint to main and add more CLI tests * 👌 CLI use same default for non_negative_least_squares as scheme * 👌 CLI dedent pluginlist output * 🩹 CLI fixed result outformat accepting none supported formats Co-authored-by: Joris Snellenburg <[email protected]> Co-authored-by: s-weigand <[email protected]>
…ests The problem is that it seams to pick up the command script of an older version leading to the error: ImportError: cannot import name 'glotaran' from 'glotaran.cli.main' 'glotaran.cli.main.glotaran' was renamed to 'glotaran.cli.main.main' in this PR glotaran/pyglotaran#765
This PR fixes up the CLI.
Change summary
Checklist
Closes issues
closes #719