Skip to content

Conversation

@anselor
Copy link
Contributor

@anselor anselor commented May 2, 2018

This will break anything calls commands through 'cmd'.

All commands using argparse can be accessed through a faux python API. All other commands can be accessed with raw strings.

Closes #368

anselor and others added 17 commits April 24, 2018 16:17
Doesn't handle all argparse argument options yet (nargs, append, flag, probably more)
For #368
Added some shared definitions to cmd2/__init__.py -> maybe there's a better place for these?
Figured out how to trick bash into showing argument hints. It's a bit weird.
Updated all of the tests and examples to import cmd2 resources from their new location without the automatic imports in cmd2/__init__.py
For #369
Updated argcomplete_bridge to use new constants/utils.
…ts into argparse command positional and flag arguments.

Added initial set of tests
…/bugs.python.org/issue15112

Added additional tests - now at 100% coverage of pyscript_bridge.py
Still need handling of special action types: StoreTrue/False, store_const, count
Removed all legacy pystate objects.
Changed default behavior to clear _last_result before each command
Added utility for creating named tuples with default values
Added tests to exercise new changes.
@anselor anselor requested a review from tleonhardt as a code owner May 2, 2018 17:59
@codecov
Copy link

codecov bot commented May 2, 2018

Codecov Report

Merging #379 into master will increase coverage by 0.78%.
The diff coverage is 86.87%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #379      +/-   ##
=========================================
+ Coverage   91.11%   91.9%   +0.78%     
=========================================
  Files           5       6       +1     
  Lines        2252    3420    +1168     
=========================================
+ Hits         2052    3143    +1091     
- Misses        200     277      +77
Impacted Files Coverage Δ
cmd2/argparse_completer.py 86.64% <72.79%> (-4.25%) ⬇️
cmd2/utils.py 92.3% <88.88%> (-7.7%) ⬇️
cmd2/cmd2.py 92.62% <95.65%> (+1.6%) ⬆️
cmd2/pyscript_bridge.py 98.02% <98.02%> (ø)

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 01e4e02...a95c8a0. Read the comment docs.

@anselor anselor added this to the 0.9.0 milestone May 2, 2018
@anselor anselor merged commit d37004d into master May 2, 2018
@tleonhardt tleonhardt deleted the pyscript branch May 3, 2018 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants