Skip to content

Commit

Permalink
Preparations for pypi deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Seeholzer committed Feb 21, 2016
1 parent 4f02554 commit b38b9cc
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 29 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
*.gz
*.idea
*.pyc
neurodynex.egg-info/*
55 changes: 31 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
language: python
python:
- "2.7"
- "3.4"
- '2.7'
- '3.4'
install:
- sudo apt-get update
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION pep8 nose
- source activate test-environment
- conda install -c brian-team brian2
- conda install -c brian-team matplotlib
before_script: # needed for plotting
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
- sudo apt-get update
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh
-O miniconda.sh; else wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
-O miniconda.sh; fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION pep8 nose
- source activate test-environment
- conda install -c brian-team brian2
- conda install -c brian-team matplotlib
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sleep 3
script:
- pep8 neurodynex
- nosetests neurodynex --verbosity=2
- pep8 neurodynex
- nosetests neurodynex --verbosity=2
deploy:
provider: pypi
user: flinz
password:
secure: TxkbZxnyYCarEWi1fMS9P4lyzvNwDUdqeYtDDVzsXgoHHtoPKW8PsEXaHyx0iaA0oAUJ5mmC2pGVBotz8uTXiMMo7cdYdolewRB3dGQJ+djYpboPTK1BTO3BP21YUnoh7yDncfb8uFUhJ+q3AIkxbbEnsuLLnR55qsc6+y3PfGt+p6LJeLRRev5VnKNqEPq9OPc5FyIghhTg9y81dh5UYA64eFE09uBKRODnlrWFtBO3y8I/Mm/73OOviZeCL3TJthNIPk8cAIw77rnY8ezXyGaE4GhGdt3KJ9tqV9+QdSsLtElqfASTI1HpsS+ZOy+JqlZNnN5KQrwBU5sKM3BEJuQxbxp3DufiORzS+7hTp+iQAFA6LP2qZpwK88AWdDosUaC1rqEFM31PY/UmPBfL6EMWIocmq1Zx5mfzpsP+gAz6HcFhNiw5NRfk0WPk8KzwLo6kLiZypqWuNYDs+W25UizKOE8JLseYvttsjEUYKGg4SKimRkc70pCRijib+FUA7wCv123h/dUliJakg8l7N1T9wGSllF95W1GdrWE1w7RIx4Ql8svDI0MdnIrR+NmoQBUIQI4u+1Om7U0ofbE7tRTEL5fdCQ9UcYd6YxpPyd+coYtflQSGsxNGPqVldtuQbt3wYlbXYS5i7qB4l3qAYI5Fv1PVSs4AKau5KqNxT04=
on:
tags: true
distributions: sdist bdist_wheel
repo: EPFL-LCN/neuronaldynamics-exercises
File renamed without changes.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include LICENSE*
include requirements.txt
6 changes: 3 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.2.0'
from setuptools_scm import get_version
version = get_version()
# The full version, including alpha/beta/rc tags.
release = '0.2.0'
release = get_version()

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
3 changes: 2 additions & 1 deletion doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
mock
mock
setuptools_scm
1 change: 1 addition & 0 deletions neurodynex/leaky_integrate_and_fire/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__all__ = ['LIF']
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
matplotlib
numpy
scipy
brian2
brian2>=2.0b4
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[bdist_wheel]
universal = 1
29 changes: 29 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
from setuptools import setup, find_packages
from pip.req import parse_requirements

# get requirements from requirements.txt
install_reqs = parse_requirements('requirements.txt')
reqs = [str(ir.req) for ir in install_reqs]

setup(
name = 'neurodynex',
packages = ['neurodynex'], # this must be the same as the name above
version = '0.2.0',
description = 'Python exercises accompanying the book Neuronal Dynamics by Wulfram Gerstner, Werner M. Kistler, Richard Naud and Liam Paninski.',
author = 'LCN-EPFL',
author_email = 'alex.seeholzer@epfl.ch',
url = 'https://github.com/EPFL-LCN/neuronaldynamics-exercises', # use the URL to the github repo
download_url = 'https://github.com/peterldowns/mypackage/tarball/0.1', # I'll explain this in a second
keywords = ['compneuro', 'science', 'teaching', 'neuroscience', 'brian'], # arbitrary keywords
classifiers = [
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Topic :: Scientific/Engineering :: Medical Science Apps.'
],
use_scm_version=True,
setup_requires=['setuptools_scm'],
install_requires=reqs,
license='GPLv2',
)

0 comments on commit b38b9cc

Please sign in to comment.