Skip to main content

A Python Spatial Optimization Library

Project description

Allagash

build status MIT License Install with conda

A spatial optimization library for covering problems. Full documentation is available here


Installing with conda

To install with geopandas run:

conda install -c conda-forge allagash geopandas

To install with arcgis run:

conda install -c conda-forge -c esri allagash arcgis

To install without a spatial library run:

conda install -c conda-forge allagash


Installing with pip

To install with geopandas run:

pip install allagash[geopandas]

To install with arcgis run:

pip install allagash[arcgis]

To install without a spatial library run:

pip install allagash


Running Locally

  1. Clone the repo git clone git@github.com:apulverizer/allagash.git
  2. Create the conda environment conda env create --file environment.yml
  3. Activate the new environment conda activate allagash
  4. Install pre-commit hooks pre-commit install
  5. Install allagash locally pip install -e . --no-deps
  6. Launch jupyter notebook jupyter notebook

You should now be able to run the example notebooks.

You can choose to install and use another solver that is supported by Pulp:


Running Tests Locally

  1. Run tests pytest --nbval

Building Documentation

  1. From the repo directory run sphinx-build -b html ./src-doc ./docs -a

This will deploy html documentation to the docs folder.


Running with Docker

You can build the local docker image that includes Allagash, Python, Jupyter, GLPK, and COIN-OR CBC.

  1. Builder the docker image docker build . -t apulverizer/allagash:latest
  2. Launch Jupyter notebook docker run -i -t --user=allagash -p 8888:8888 apulverizer/allagash:latest /bin/bash -c "jupyter notebook --ip='*' --port=8888 --no-browser"

You should now be able to run the example notebooks.

You can test the notebooks as well by running docker run --user=allagash apulverizer/allagash:latest /bin/bash -c "py.test --nbval"

If you'd like to mount a directory of local data/files into the container, you can add -v <your-local-dir>:/home/allagash/<dir-name> when running docker run


Running Tests with Docker

You can build a docker container that will run the tests (mounted into the container)

  1. docker build . --file build.Dockerfile --tag apulverizer/allagash:build
  2. docker run --user=allagash -v $PWD/tests:/home/allagash/tests -v $PWD/src-doc:/home/allagash/src-doc apulverizer/allagash:build /bin/bash -c "py.test --nbval"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Allagash-0.4.1.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Allagash-0.4.1-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file Allagash-0.4.1.tar.gz.

File metadata

  • Download URL: Allagash-0.4.1.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/0.0.0 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for Allagash-0.4.1.tar.gz
Algorithm Hash digest
SHA256 1b2b3e7cce40444d3078f0f7f791383cc03791e72922c5415c6aa94704b00781
MD5 2d840345279611df7b74a426517ded5e
BLAKE2b-256 17990e89407138798911778c5631d775152ea93784eeb18ff556ded50877675c

See more details on using hashes here.

File details

Details for the file Allagash-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: Allagash-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/0.0.0 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for Allagash-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7b4064b93c70b04e268683cb9fe9b7bd1ab25837ec727d0834e2dafdb03dcffa
MD5 9a5747a1f12abbb2755dae1119ff2280
BLAKE2b-256 ce690befbf3cb417ff7123b2a1bc0b6dd99a05f4214de8213236cf4b7d3d17b9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page