Skip to content

Commit

Permalink
Merge branch 'master' of github.com:cloudbrain/cloudbrain.new into ne…
Browse files Browse the repository at this point in the history
…w-master
  • Loading branch information
marionleborgne committed Aug 28, 2018
2 parents ebc8d6e + 3ce2ff7 commit 3219a30
Show file tree
Hide file tree
Showing 89 changed files with 6,168 additions and 0 deletions.
102 changes: 102 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# modules config
examples/*.marion.json

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# IPython Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# dotenv
.env

# virtualenv
venv/
ENV/

# Spyder project settings
.spyderproject

# Rope project settings
.ropeproject

# CloudBrain project configuration files
cloudbrain/conf
scripts/OSX/popy
popy.tar.gz
vagrant/osx/.vagrant
conf.local/

# JetBrains
.idea
37 changes: 37 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Not relying on Travis python distribution but using miniconda instead.
# See: https://github.com/travis-ci/travis-ci/issues/2312
# And: http://stackoverflow.com/questions/30588634/install-numpy-1-8-in-travis-ci
language:
- generic

os:
- linux
- osx

env:
global:
- NUMPY=$(bash .travis/get-py-pkg-version.sh numpy requirements/core.txt) SCIPY=$(bash .travis/get-py-pkg-version.sh scipy requirements/analytics.txt)
matrix:
- PYTHON_VERSION=2.7
- PYTHON_VERSION=3.5

before_install:
- chmod +x .travis/download-miniconda.sh
- travis_retry bash .travis/download-miniconda.sh
- chmod +x miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH=$HOME/miniconda/bin:$PATH
- conda update --yes conda

install:
# Create an environment with a specific version of python
# See: http://conda.pydata.org/docs/using/envs.html#create-an-environment
- conda create --yes -n test python=$PYTHON_VERSION
- source activate test
- chmod +x .travis/get-py-pkg-version.sh
- conda install --yes numpy=$NUMPY scipy=$SCIPY pip
- pip install setuptools
- pip install .[analytics]

script:
python setup.py test
7 changes: 7 additions & 0 deletions .travis/download-miniconda.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

if [[ $TRAVIS_OS_NAME == 'linux' ]]; then
wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
else
wget http://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh
fi
16 changes: 16 additions & 0 deletions .travis/get-py-pkg-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

# Usage: bash get-py-pkg-version.sh <package_name>
# Return: <version_number>

PACKAGE_NAME=$1
REQUIREMENTS_FILE=$2
while read line; do
if [[ $line == $PACKAGE_NAME* ]];
then
IFS='=' read -ra PKG <<<"$line"
VERSION="${PKG[2]}"
fi
done <$REQUIREMENTS_FILE

echo $VERSION
Loading

0 comments on commit 3219a30

Please sign in to comment.