ubclaunchpad / rocket2

🚀 The official UBC Launch Pad Slack bot and team management platform
https://rocket2.readthedocs.io
Other
18 stars 6 forks source link

refactor: get_help in superclass, some cmd code cleanup #598

Closed chuck-sys closed 3 years ago

chuck-sys commented 3 years ago

Details

Developers no longer have to rewrite the get_help function when doing commands.

For users, when you want to get help for a subcommand (like you want to get a short list of subcommands that you can use), no longer do you have every single use case of the subcommand and parameters. You now get (if the subcommand supports it) a short list of subcommands, like how you would if you did /rocket help.

image

Affects #454 Affects #395

codecov[bot] commented 3 years ago

Codecov Report

Merging #598 (6de8b44) into master (2bf6df0) will decrease coverage by 0.15%. The diff coverage is 90.38%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #598      +/-   ##
==========================================
- Coverage   93.06%   92.91%   -0.16%     
==========================================
  Files          43       43              
  Lines        2524     2442      -82     
  Branches      337      328       -9     
==========================================
- Hits         2349     2269      -80     
+ Misses        117      115       -2     
  Partials       58       58              
Impacted Files Coverage Δ
app/controller/command/commands/export.py 82.75% <ø> (+1.57%) :arrow_up:
app/controller/command/commands/team.py 85.47% <82.14%> (-0.88%) :arrow_down:
app/controller/command/commands/iquit.py 100.00% <100.00%> (ø)
app/controller/command/commands/karma.py 92.10% <100.00%> (-0.92%) :arrow_down:
app/controller/command/commands/mention.py 100.00% <100.00%> (ø)
app/controller/command/commands/project.py 96.73% <100.00%> (-0.22%) :arrow_down:
app/controller/command/commands/token.py 100.00% <100.00%> (ø)
app/controller/command/commands/user.py 98.81% <100.00%> (-0.12%) :arrow_down:
app/controller/command/parser.py 97.18% <100.00%> (-2.82%) :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 2bf6df0...6de8b44. Read the comment docs.