Installation

Setup Python Environment

TSNet is tested against Python versions 3.5, 3.6, and 3.7. It can be installed on Windows, Linux, and Mac OS X operating systems. Python distributions, such as Anaconda, are recommended to manage the Python environment as they already contain (or easily support installation of) many Python packages (e.g. SciPy, NumPy, pandas, pip, matplotlib, etc.) that are used in the TSNet package. For more information on Python package dependencies, see Dependencies.

Stable Release (for users)

To install TSNet, run this command in your terminal:

$ pip install tsnet

This is the preferred method to install tsnet, as it will always install the most recent stable release.

If you don’t have pip installed, this Python installation guide can guide you through the process.

From Sources (for developers)

The sources for TSNet can be downloaded from the Github repo.

You can either clone the public repository:

$ git clone git://github.com/glorialulu/tsnet

Or download the tarball:

$ curl  -OL https://github.com/glorialulu/tsnet/tarball/master

Once you have a copy of the source, you can install it with:

$ python setup.py install

Dependencies

Requirements for TSNet include Python (3.5, 3.6, or 3.7) along with several Python packages. The following Python packages are required:

  1. Numpy [VaCV11]: the fundamental package needed for scientific computing with Python included in Anaconda distribution http://www.numpy.org/
  2. Matplotlib [Hunt07]: Python 2D plotting library included in Anaconda distribution http://matplotlib.org/
  3. NetworkX [HaSS08]: Network creation and manipulation engine, install on a python-enabled command line with pip install wntr https://networkx.github.io/
  4. WNTR [WNTRSi]: Water Network Tool for Resilience install on a python-enabled command line with pip install wntr http://wntr.readthedocs.io
  5. pytest: Unit Tests engine install on a python-enabled command line with pip install -U pytest https://docs.pytest.org/en/latest/