├── .travis.yml ├── LICENSE ├── README.md ├── linux └── env ├── osx └── env └── unix-common ├── build.sh └── install.sh /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | 3 | notifications: 4 | email: false 5 | 6 | matrix: 7 | include: 8 | - os: linux 9 | before_install: source linux/env 10 | 11 | - os: osx 12 | language: generic 13 | osx_image: xcode7.3 14 | before_install: source osx/env 15 | 16 | install: source unix-common/install.sh 17 | script: unix-common/build.sh 18 | 19 | before_script: 20 | - export VERSION=${TRAVIS_TAG:-$TRAVIS_COMMIT} 21 | - echo "Tagging with $VERSION" 22 | 23 | before_deploy: 24 | - export RELEASE_FILES=$(ls /tmp/snakestagram-*.tar.gz) 25 | - echo "Uploading $RELEASE_FILES to GitHub releases for tag $VERSION" 26 | 27 | deploy: 28 | skip_cleanup: true 29 | provider: releases 30 | file_glob: true 31 | api_key: 32 | secure: ZhSRBf3tg7e9Csx389VAdX5BzeKWH/P0ugYoBeoEraVFhcGUfgAOHo4I9tCt8S8AlJfq8r5tCoIkIPiqfVEsyfXNW0XCH5jM6HFBysbOUcCOZ31EDppsx6j1DaBxC7D9GirU+1/1df3p8nrzTBzbVuLKs1n7FHY+I4h6/CjeI/gr4gztMmwuWzL48zG4peqVXmM0PYPcWlKpt+YmG2uy6sbBbj9ibbxRSsJoksbYbitQN1/yP7n5J1tfyQny6uTWBanIXSlkntjol4nHOh5m0rAwHhGxNEERYiTz6slOLbfMJJb+W33ytYa0nUZJVbNxtWDvyNqp9VvNpyXbd6yxhUeOHw32sVjz1LQN96o5oQkg0Efg5EejKErFhtPsRMJanI36FANdkaPJdijFffuuuNeHIcyl0m5dR746ymFuqoLQIKEfG12SSVOahBzvYRIESeaJfLKyO1Vp7P6PHaf2eNtL8ZMyN5+51jDfZlCsE9FdDtIJYYk7jxanGSl3w+2LUfPLucHTvlVa8rxdpxrW3GCDXtKhpu2bVC61ZgJj/uoeelTIeMFL2EIot2Z6odGjE8nQ/kA3xF2X3JcAsnTsztJwZzfzQVG6Ab4EARy+26ve17o5pDF+0vOD2RrmwUjR+E0/Wv2gqNq8TzmVUH3uH6/Hhv1xgn+PcUg6kKtU0Xs= 33 | file: ${RELEASE_FILES} 34 | on: 35 | tags: true 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2017, nteract 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | * Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # snakestagram 2 | 3 | [![Build Status](https://travis-ci.org/nteract/snakestagram.svg?branch=master)](https://travis-ci.org/nteract/snakestagram) 4 | 5 | Snake in a box, conda environments to go 6 | 7 | ## Roadmap 8 | 9 | * Create a standalone 80% of the use cases conda environment 10 | * Deploy to GitHub releases for use as a bundled kernel in nteract/nteract 11 | 12 | ## Possible Tips / Resources 13 | 14 | * https://www.continuum.io/blog/developer-blog/conda-spark 15 | -------------------------------------------------------------------------------- /linux/env: -------------------------------------------------------------------------------- 1 | export CONDA_ARCH="Linux-x86_64" 2 | export PLATFORM="linux-x64" 3 | -------------------------------------------------------------------------------- /osx/env: -------------------------------------------------------------------------------- 1 | export CONDA_ARCH="MacOSX-x86_64" 2 | export PLATFORM="darwin-x64" 3 | -------------------------------------------------------------------------------- /unix-common/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -ev 3 | 4 | VERSION=${VERSION:-latest} 5 | PLATFORM=${PLATFORM:-$(uname | awk '{print tolower($0)}')-x64} 6 | 7 | rm -rf /tmp/snakestagram 8 | conda create -p /tmp/snakestagram --copy -y -q python=3 pandas scikit-learn ipykernel 9 | 10 | cd /tmp/ 11 | tar czf snakestagram-${VERSION}-${PLATFORM}.tar.gz ./snakestagram 12 | du -hs snakestagram* 13 | ls . 14 | -------------------------------------------------------------------------------- /unix-common/install.sh: -------------------------------------------------------------------------------- 1 | # Adapted shamelessly from https://github.com/scikit-learn-contrib/project-template/blob/master/ci_scripts/install.sh 2 | # Deactivate the travis-provided virtual environment and setup a 3 | # conda-based environment instead 4 | deactivate 5 | 6 | # Use the miniconda installer for faster download / install of conda 7 | # itself 8 | pushd . 9 | cd 10 | mkdir -p download 11 | cd download 12 | echo "Cached in $HOME/download :" 13 | ls -l 14 | echo 15 | if [[ ! -f miniconda.sh ]] 16 | then 17 | wget http://repo.continuum.io/miniconda/Miniconda3-latest-${CONDA_ARCH}.sh \ 18 | -O miniconda.sh 19 | fi 20 | chmod +x miniconda.sh && ./miniconda.sh -b 21 | cd .. 22 | export PATH="$HOME/miniconda3/bin:$PATH" 23 | conda config --add channels conda-forge 24 | conda update --yes conda 25 | popd 26 | --------------------------------------------------------------------------------