Skip to content

Latest commit

 

History

History
52 lines (33 loc) · 1.2 KB

development.md

File metadata and controls

52 lines (33 loc) · 1.2 KB

Python environment set up

Install Python 3 and pipenv

Install Python 3 if you don't have it already: https://www.python.org/downloads/

Install Pipenv to manage Python environments and pip dependencies

python3 -m pip install pipenv

(You may need to source .bash_profile)

Set up Pipenv Virtual Environment

Development should be done inside a Pipenv environment. Create and enter your Pipenv environment with:

PIPENV_VENV_IN_PROJECT=1 python3 -m pipenv install --dev
PIPENV_VENV_IN_PROJECT=1 python3 -m pipenv shell

PIPENV_VENV_IN_PROJECT will place the virtual environment in ./.venv/.

On macOS you may get an error if you don't have the needed developer tools. You can use xcode-select --install to fix that.

Add External Dependencies

Library dependencies must be listed in setup.py.

Dependencies for the development environment, such as development tools, should be listed in the Pipfile.

After adding new dependencies, run pipenv install to refresh the environment.

Test

Run the linter:

pylint netanalysis

Run the type checker:

mypy netanalysis

Run the unit tests:

python -m unittest -v