Skip to content

pankababukova/allagash

 
 

Repository files navigation

Allagash build status

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

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 allagash locally pip install -e ./src --no-deps
  5. Install a solver that is supported by Pulp
    1. GLPK
    2. COIN-OR CBC
    3. CPLEX
    4. Gurobi
  6. Launch jupyter notebook jupyter notebook

You should now be able to run the example notebooks.

Installing with pip

You can install Allagash using pip but may need to manually configure certain dependencies if using Windows.

  1. Run pip install allagash

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"

About

A spatial optmization library for covering problems.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Jupyter Notebook 98.7%
  • Python 1.2%
  • Dockerfile 0.1%