fast-aircraft-design / FAST-OAD

FAST-OAD: An open source framework for rapid Overall Aircraft Design
GNU General Public License v3.0
53 stars 26 forks source link

CLI refactoring #405

Closed christophe-david closed 2 years ago

christophe-david commented 2 years ago

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

It makes the code much more simpler.

codecov[bot] commented 2 years ago

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%) :arrow_down:

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 commented 2 years ago

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.