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

CLI refactoring #405

Merged
merged 17 commits into from
Dec 17, 2021
Merged

CLI refactoring #405

merged 17 commits into from
Dec 17, 2021

Conversation

christophe-david
Copy link
Contributor

This PR reworks the code for command line interface using click.

It makes the code much more simpler.

@codecov
Copy link

codecov bot commented Dec 14, 2021

Codecov Report

Merging #405 (e6d3e26) into master (025dde5) will increase coverage by 0.60%.
The diff coverage is 12.31%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #405      +/-   ##
==========================================
+ Coverage   90.29%   90.89%   +0.60%     
==========================================
  Files         200      201       +1     
  Lines        8195     8153      -42     
  Branches      854      854              
==========================================
+ Hits         7400     7411      +11     
+ Misses        641      586      -55     
- Partials      154      156       +2     
Impacted Files Coverage Δ
src/fastoad/cmd/cli.py 0.00% <0.00%> (ø)
src/fastoad/cmd/cli_utils.py 0.00% <0.00%> (ø)
src/fastoad/cmd/api.py 90.75% <73.91%> (-1.18%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 025dde5...e6d3e26. Read the comment docs.

@christophe-david christophe-david marked this pull request as draft December 15, 2021 13:39
@christophe-david christophe-david marked this pull request as ready for review December 15, 2021 13:39
Copy link
Contributor

@ScottDelbecq ScottDelbecq left a comment

Choose a reason for hiding this comment

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

Thanks for this PR! click looks very convenient.
Does it enable to add tests for cli.py?

@christophe-david
Copy link
Contributor Author

christophe-david commented Dec 17, 2021

Does it enable to add tests for cli.py?

Yes, click comes with a small API for testing that should ease the process. I did not want to take the time now to ad these tests, since we did not have tests for the previous solution, but it should definitely been done.
Issue #407 now states that.

@christophe-david christophe-david merged commit 4213a19 into master Dec 17, 2021
@christophe-david christophe-david deleted the cli-refactoring branch December 17, 2021 05:57
@christophe-david christophe-david mentioned this pull request Dec 17, 2021
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.

2 participants