Skip to content

Conversation

@tleonhardt
Copy link
Member

Thie PR converts cmd2 to a multi-file Python package with a __init__.py and source code located in the cmd2 directory.

All unit tests pass (at least on my system) and the Sphinx docs appear to build correctly.

Installation via pip and releasing to PyPI remains to be tested.

This closes #356.

kotfu and others added 6 commits April 16, 2018 23:21
Local py.test run of unit tests now passes.
Removed things which were only needed for unit tests from __init__.py
- Converted to importing from cmd2.cmd2.<foo> within the relevant unit tests
@tleonhardt tleonhardt added this to the 0.9.0 milestone Apr 18, 2018
@tleonhardt tleonhardt requested a review from kotfu April 18, 2018 02:38
@codecov
Copy link

codecov bot commented Apr 18, 2018

Codecov Report

Merging #360 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #360      +/-   ##
==========================================
+ Coverage   89.31%   89.33%   +0.02%     
==========================================
  Files           1        2       +1     
  Lines        1872     1876       +4     
==========================================
+ Hits         1672     1676       +4     
  Misses        200      200
Impacted Files Coverage Δ
cmd2/cmd2.py 89.32% <100%> (ø)
cmd2/__init__.py 100% <100%> (ø)

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 49f0212...9697bf1. Read the comment docs.

Copy link
Member

@kotfu kotfu left a comment

Choose a reason for hiding this comment

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

This looks good. No need to import all the internal stuff by default.

One question, should we import History and HistoryItem by default? I agree with how you've done it here. Most people aren't going to write their own history commands, and if they do, they can easily import the items. If you agree, then I think this is good to merge.

@tleonhardt
Copy link
Member Author

History and HistoryItem are mostly intended for internal use only. Anyone is welcome to use them, but I would view that as uncommon. I'll go ahead and merge.

@tleonhardt tleonhardt merged commit 01e4341 into master Apr 18, 2018
@tleonhardt tleonhardt deleted the package branch April 18, 2018 03:45
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.

Convert to a package directory structure

3 participants