Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/ijiraq/cadcVOFS
Browse files Browse the repository at this point in the history
  • Loading branch information
ijiraq committed Apr 22, 2020
2 parents a9a9ab4 + ac4ea28 commit b8a5457
Show file tree
Hide file tree
Showing 100 changed files with 6,448 additions and 3,206 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -10,7 +10,7 @@ __pycache__
*.c

# Other generated files
*/version.py
version.py
*/cython_version.py
htmlcov
.coverage
Expand Down
27 changes: 27 additions & 0 deletions .intTest
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
# Runs the integration tests for each module (if defined)

# work only with modules that have integration testing
# (test for presence of intTest directory)

[ -z "$TRAVIS_INTTEST_PROXY" ] && echo "TRAVIS_INTTEST_PROXY not set - skip integration tests" && exit 0

for cert in $(ls travis_inttest_proxy* | grep -v .pem); do
if [ ! -f $cert.pem ]; then
echo "$cert.pem not found"
openssl aes-256-cbc -pass "pass:$TRAVIS_INTTEST_PROXY" -in $cert -out $cert.pem -d -a
fi
done

for i in $(find . -type d -name intTest | awk -F '/' '{print $2}'); do
echo "Running integration tests for $i module"
cd $i
mkdir intTest/certs
for cert in $(ls ../*.pem); do
cp $cert intTest/certs
done
python setup.py intTest
cd -
echo "Done $i module"
done

37 changes: 37 additions & 0 deletions .publish.sh
@@ -0,0 +1,37 @@
#!/usr/bin/env bash
# Deploys a Python library or application

product=$(echo $TRAVIS_TAG | awk -F '=' '{print $1}')
version=$(echo $TRAVIS_TAG | awk -F '=' '{print $2}')
if [ -z "$product" ]; then
echo "Could not find name of product in TRAVIS_TAG: $TRAVIS_TAG";
exit -1
fi
if [ -z "$version" ]; then
echo "Could not find version of product in TRAVIS_TAG: $TRAVIS_TAG";
exit -1
fi

echo "Deploying $product, version $version..."
cd $product || { echo "Project $product does not exist in this repo"; exit -1; }
# check that the version in the tag and in setup.cfg match
sed 's/ //g' setup.cfg | grep "^version=$version" || { \
echo "Version in tag ($version) does not match version in setup.cfg \
($(sed 's/ //g' setup.cfg | grep '^version=' | awk -F '=' '{print $2}'))"; \
exit -1; }

# build
python setup.py clean sdist || { echo "Errors building $product"; exit -1; }
# upload to pypi
# generate the .pypirc file first
echo "[pypi]" > .pypirc
chmod 600 .pypirc
echo "username = Canadian.Astronomy.Data.Centre" >> .pypirc
echo "password = ${PYPI_PASSWORD}" >> .pypirc

echo "Publish on pypi"
twine upload --config-file .pypirc dist/* || { echo "Errors publishing $TRAVIS_TAG"; exit -1; }

# check version available
pip uninstall -y $product
pip install --upgrade --pre $product==$version || { echo "$TRAVIS_TAG not installed on pypi" ; exit -1; }
80 changes: 30 additions & 50 deletions .travis.yml
@@ -1,68 +1,48 @@
language: python


python:
- 2.7
- 3.3
- 3.4
- 3.5
- 3.6

# Setting sudo to false opts in to Travis-CI container-based builds.
sudo: false

# The apt packages below are needed for sphinx builds. A full list of packages
# that can be included can be found here:
#
# https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise

addons:
apt:
packages:
- libfuse-dev
# - graphviz
# - texlive-latex-extra
# - dvipng

env:
global:

- SETUP_CMD='test'

matrix:
# Make sure that egg_info works without dependencies
- SETUP_CMD='test'

matrix:
include:

# Do a coverage test in Python 2.
- python: 2.7
env: SETUP_CMD='coverage'

# Do a egg-info test in Python 2.
- python: 2.7
env: SETUP_CMD='egg_info'

# Check for sphinx doc build warnings - we do this first because it
# may run for a long time
#- python: 2.7
# env: SETUP_CMD='build_sphinx -w'

exclude:

#- python: 3.3
# env: SETUP_CMD='test'

install:
- cd vos; pip install -r dev_requirements.txt; cd ..;
- cd vofs; pip install -r dev_requirements.txt; cd ..;
- pip install -U pip
- if [[ $TRAVIS_PYTHON_VERSION == '3.7' ]]; then pip install twine; fi
- for i in $(ls -d */); do cd $i; pip install -r dev_requirements.txt; cd ..; done
- pip install coveralls

script:
- cd vos; python setup.py $SETUP_CMD || exit -1; cd ..
- cd vofs; python setup.py $SETUP_CMD || exit -1
- for i in $(ls -d */); do
cd $i;
pytest --cov $i || exit 1;
if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then
flake8 -v $i || exit -1;
fi;
cd ..;
done

after_success:
# If coveralls.io is set up for this package, uncomment the line
# below and replace "packagename" with the name of your package.
# The coveragerc file may be customized as needed for your package.
# - if [[ $SETUP_CMD == 'coverage' ]]; then coveralls; fi
# Run coverage for all Python versions but submit only once - 3.5
- if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then coverage combine $(ls -d */.coverage) || exit 1; coveralls; fi

jobs:
include:
#- stage: intTest
#python: 3.5
#script: ./.intTest
- stage: publish
python: 3.4
deploy:
provider: script
script: ./.publish.sh
on:
tags: true
condition: ${PYPI_PASSWORD+x} = x
branch: master
15 changes: 15 additions & 0 deletions README.rst
@@ -0,0 +1,15 @@
VOS - VOSpace tools


.. image:: https://img.shields.io/pypi/pyversions/vos.svg
:target: https://pypi.python.org/pypi/vos

.. image:: https://img.shields.io/travis/opencadc/vostools/master.svg
:target: https://travis-ci.org/opencadc/vostools?branch=master

.. image:: https://img.shields.io/coveralls/opencadc/vostools/master.svg
:target: https://coveralls.io/github/opencadc/vostools?branch=master

.. image:: https://img.shields.io/github/contributors/opencadc/vostools.svg
:target: https://github.com/opencadc/vostools/graphs/contributors

2 changes: 1 addition & 1 deletion vofs/MANIFEST.in
@@ -1,4 +1,4 @@
include README.md
include README.rst
include CHANGES.rst

include ez_setup.py
Expand Down
102 changes: 0 additions & 102 deletions vofs/README.md

This file was deleted.

0 comments on commit b8a5457

Please sign in to comment.