Skip to content

Contributing

Aaron Vinson edited this page Jan 16, 2018 · 4 revisions

Contributing

This document provides instructions for setting up a computer in preparation for contributing to the probabilistic computing stack.

Prerequisites

The probabilistic computing stack uses conda for package and environment management.

  1. Install the conda package manager and update it. Note that there are different instructions for systems that have other Python installations or packages. Choose the instructions that are right for your system.
  2. Install and update conda build, a tool for building conda packages.

Build individual packages

Any of the stack's packages can be built from source on linux-64:

  1. Check out the package repository.
  2. Change your working directory to the root of the package repository.
  3. Set the CONDA_PACKAGE_VERSION environment variable to a value that complies with the PEP 440 versioning scheme. Include a development release segment like to avoid confusion. The simplest way to do this is by appending dev to the version of the package you are branching off of.
  4. Build the package with conda build . -c probcomp.

Installing packages

Individual packages can be installed either in "development mode" via conda develop or from releases published to our channel on Anaconda Cloud.

To install a package in "development mode":

  1. Change your working directory to the root of the package you want to install in development mode.
  2. Install the package with conda develop ..

To install a pre-built version of a package from our channel on Anaconda Cloud:

  1. Install the package with conda install -c probcomp <package-name>.

By default this will install the latest version of that package available on our channel. To choose a specific version append =<version> to the package name.

Packages on our channel are organized by tag:

  • main contains only official releases.
  • edge contains releases from every commit on master.
  • dev contains releases from tags on non-master branches.

To filter by tag append /label/<tag> to -c probcomp. To install version 3.9.3rc3 from the dev channel you would write:

conda install -c probcomp/label/dev apsw=3.9.3rc3

Launching a notebook

  1. Install Jupyter with conda install jupyter.
  2. Start a notebook with jupyter notebook.

I'm on Linux, I don't care about the details, and I just want a Python environment with all the packages installed

wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
conda update conda
conda install conda-build
conda install -n python2 --quiet --yes -c probcomp -c cidermole -c fritzo -c ursusest \
    'apsw' \
    'bayeslite=0.3.2' \
    'cgpm=0.1.2' \
    'crosscat=0.1.56.1' \
    'distributions=2.2.1' \
    'libprotobuf=2.6.1' \
    'loom=0.2.10' \
    'iventure=0.2.2' \
    'venture=0.5.1.1'