Skip to content

Conversation

@tleonhardt
Copy link
Member

@tleonhardt tleonhardt commented Jul 6, 2019

This PR adds a Pipfile for using Pipenv for development.

Pipenv essentially combines the features of pip and virtualenv into a single tool. Adding this Pipfile makes it extremely easy to setup a cmd2 development environment using pipenv.

Also:

  • Added Pipfile.lock and .venv to .gitignore since cmd2 is a library, not an application and as such we do not intend to use pipenv for deployment purposes, only development
  • In setup.py, replaced pylint with flake8 in the dev section since we are using flake8 for linting as part of our CI process
  • Updated CONTRIBUTING.md within info about our support for Pipenv
  • Updated invoke task for flake8 to exclude unnecessary directories so that flake8 doesn't take forever when using a virtual environment embedded in the cmd2 directory

To create a virtual environment and install everything needed for cmd2 development, do the following from a GitHub checkout:

pipenv install --dev

To create a new virtualenv, using a specific version of Python you have installed (and on your PATH), use the --python VERSION flag, like so:

pipenv install --dev --python 3.7

Then you can enter that virtual environment with:

pipenv shell

@tleonhardt tleonhardt added this to the 0.9.15 milestone Jul 6, 2019
@tleonhardt tleonhardt requested review from kmvanbrunt and kotfu July 6, 2019 01:04
@tleonhardt tleonhardt self-assigned this Jul 6, 2019
@codecov
Copy link

codecov bot commented Jul 6, 2019

Codecov Report

Merging #710 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #710   +/-   ##
=======================================
  Coverage   96.03%   96.03%           
=======================================
  Files          12       12           
  Lines        3356     3356           
=======================================
  Hits         3223     3223           
  Misses        133      133

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 42bf56f...5f8599b. 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.

I suggest adding a note to CONTRIBUTING saying we have support for pipenv. You can probably just take the second half of the text from the body of the PR and paste it into a new section in CONTRIBUTING and call it good.

@tleonhardt
Copy link
Member Author

I added a section to CONTRIBUTING.md with info on our support for Pipenv

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.

Looks great to me.

@tleonhardt tleonhardt merged commit e18013e into master Jul 6, 2019
@tleonhardt tleonhardt deleted the pipenv branch July 6, 2019 20:17
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