Skip to content

Commit

Permalink
Merge pull request #28 from alurban/noarch-python
Browse files Browse the repository at this point in the history
Modularize scripts to make gwvet noarch: python
  • Loading branch information
Alex L. Urban authored Mar 16, 2021
2 parents 2c16bc3 + 4303c13 commit 59c8b74
Show file tree
Hide file tree
Showing 11 changed files with 1,335 additions and 1,050 deletions.
62 changes: 47 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,60 @@
language: python
dist: xenial
language: minimal

python:
- '3.5'
- '3.6'
- '3.7'
os: linux

env:
global:
- COVERAGE_STORAGE="json"
- CONDA_PKGS_DIRS="${HOME}/.cache/conda/pkgs"

matrix:
fast_finish: true

include:
# conda builds
- name: "conda:3.6"
env: PYTHON_VERSION="3.6"
- name: "conda:3.7"
env: PYTHON_VERSION="3.7"
- name: "conda:3.8"
env: PYTHON_VERSION="3.8"
- name: "conda:3.9"
env: PYTHON_VERSION="3.9"

before_install:
- python -m pip install -q --upgrade pip
- python -m pip install -r requirements.txt
- curl -LO https://raw.githubusercontent.com/gwpy/gwpy/master/ci/parse-conda-requirements.py
- curl -o miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
- bash miniconda.sh -b -p ${HOME}/miniconda
- source "${HOME}/miniconda/etc/profile.d/conda.sh"
- conda config --set always_yes yes --set changeps1 no
- conda config --add channels conda-forge
- travis_retry conda update --quiet --yes conda
# Useful for debugging any issues with conda
- conda info --all

install:
# create a conda environment
- travis_retry conda create --quiet --yes --name gwvetci python=${PYTHON_VERSION} pip setuptools
- travis_retry conda activate gwvetci
- travis_retry python ./parse-conda-requirements.py requirements.txt -o conda-reqs.txt
- travis_retry conda install --quiet --yes --update-all --name gwvetci --file conda-reqs.txt
# clean up
- rm -f conda-reqs.txt parse-conda-requirements.py
# install this version
- python -m pip install .

script:
# run flake8
- python -m flake8 gwvet/**/*.py
- python -m flake8 bin/*
- python -m flake8 .
# test executables
- python -m coverage run --append $(which gwvet) --help
- python -m coverage run --append $(which gwvet-hug) --help
- python -m coverage run --append $(which gwvet-vdf) --help
- python -m coverage run --append --source gwvet -m gwvet --help
- python -m coverage run --append --source gwvet -m gwvet.hug --help
- python -m coverage run --append --source gwvet -m gwvet.vdf --help

cache:
pip: true
before_cache:
- travis_retry conda clean --quiet --yes --all
- rm -f $HOME/.cache/pip/log/debug.log
cache:
pip: true
directories:
- ${HOME}/.cache/conda/pkgs
163 changes: 0 additions & 163 deletions bin/gwvet

This file was deleted.

Loading

0 comments on commit 59c8b74

Please sign in to comment.