Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use versioneer for git versioning and enable travis-ci.org build-and-test #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dataviewer/_version.py export-subst
32 changes: 32 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
language: python

sudo: false

addons:
apt:
packages:
- gcc
- gfortran
- libblas-dev
- liblapack-dev
- python-m2crypto
- swig

before_install:
- . .travis/build-nds2.sh
- pip install -q --upgrade pip

install:
- pip install -r requirements.txt
- python setup.py build

script:
- coverage run --source=dataviewer --omit="dataviewer/tests/*,dataviewer/*version*" -m py.test -v dataviewer/
- pip install .

after_success:
- coveralls

cache:
apt: true
pip: true
19 changes: 19 additions & 0 deletions .travis/build-nds2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

NDS2_CLIENT_VERSION="0.12.1"

# get
wget http://software.ligo.org/lscsoft/source/nds2-client-${NDS2_CLIENT_VERSION}.tar.gz -O nds2-client-${NDS2_CLIENT_VERSION}.tar.gz --quiet
# unpack
mkdir -p nds2-client-${NDS2_CLIENT_VERSION}
tar -zxf nds2-client-${NDS2_CLIENT_VERSION}.tar.gz --strip-components=1 -C nds2-client-${NDS2_CLIENT_VERSION}
# build
cd nds2-client-${NDS2_CLIENT_VERSION}
./configure --enable-silent-rules --quiet --prefix=`python -c "import sys; print(sys.prefix)"` --disable-swig-java --disable-mex-matlab
make
# install
make install
# clean up
cd -
rm -rf nds2-client-${NDS2_CLIENT_VERSION}/
rm -f nds2-client-${NDS2_CLIENT_VERSION}.tar.gz
4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include MANIFEST.in README.md LICENSE
include requirements.txt
include versioneer.py
include dataviewer/_version.py
8 changes: 5 additions & 3 deletions dataviewer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@

import nds2

from . import version
from gwpy.plotter import rcParams

from ._version import get_versions

__version__ = get_versions()['version']
__author__ = 'Duncan Macleod <[email protected]>'
__credits__ = 'The LIGO Laboratory, and the LIGO Scientific Collaboration'
__version__ = version.version

from gwpy.plotter import rcParams
del get_versions

# set default params
rcParams.update({
Expand Down
Loading