Remove travis documentation deploy, other fixes (#1678)

* Remove documentation deploy

Remove documentation script and travis job.

* Remove deploy stage from travis

Remove the "deploy doc and pypi" stage entirely, and revise the
"subclassing" of the osx jobs.

* Fix travis script make invocation

* Fix extra lint script commands

* Pin numpy version to <1.16

Pin the numpy version to <1.16 until the potential incompatibilities
are fixed.

* Remove numpy from whitelist, ignore random instead

Remove `numpy` from the `extension-pkg-whitelist`, and instead manually
ignore the check for the members of  `numpy.random`, as it was the
only place where the check was significant.
This commit is contained in:
Diego M. Rodríguez 2019-01-14 13:03:54 +01:00 committed by Jay Gambetta
parent 36cb2e1901
commit a967fcd8e2
5 changed files with 14 additions and 110 deletions

View File

@ -33,7 +33,7 @@ unsafe-load-any-extension=no
# A comma-separated list of package or module names from where C extensions may # A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may # be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code # run arbitrary code
extension-pkg-whitelist=numpy extension-pkg-whitelist=
[MESSAGES CONTROL] [MESSAGES CONTROL]
@ -294,7 +294,7 @@ ignore-mixin-members=yes
# (useful for modules/projects where namespaces are manipulated during runtime # (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis. It # and thus existing member attributes cannot be deduced by static analysis. It
# supports qualified module names, as well as Unix pattern matching. # supports qualified module names, as well as Unix pattern matching.
ignored-modules=matplotlib.cm ignored-modules=matplotlib.cm,numpy.random
# List of class names for which member attributes should not be checked (useful # List of class names for which member attributes should not be checked (useful
# for classes with dynamically set attributes). This supports the use of # for classes with dynamically set attributes). This supports the use of

View File

@ -31,7 +31,7 @@ stage_generic: &stage_generic
- pip install qiskit-aer - pip install qiskit-aer
script: script:
# Compile the executables and run the tests. # Compile the executables and run the tests.
- make && ARGS="-V" make test - make test
stage_linux: &stage_linux stage_linux: &stage_linux
<<: *stage_generic <<: *stage_generic
@ -63,38 +63,6 @@ stage_osx: &stage_osx
source venv/bin/activate source venv/bin/activate
fi fi
stage_osx_python3_7: &stage_osx_python3_7
<<: *stage_osx
before_install:
|
if [ ${TRAVIS_OS_NAME} = "osx" ]; then
pyenv install 3.7.0
virtualenv --python ~/.pyenv/versions/3.7.0/bin/python venv
source venv/bin/activate
fi
# Other aliases: for convenience, keeping the "jobs" matrix defined later on
# less verbose.
deploy_ghpages: &deploy_ghpages
provider: script
skip_cleanup: true
script: tools/ghpages_documentation_deploy.sh
on:
branch: stable
deploy_pypi: &deploy_pypi
provider: pypi
skip_cleanup: true
user: "diegoplan9"
password:
secure: "QIhEDs+gec0XvmJnzO2USLOz6I0eGKKcjqFtFYDdw1tbFby8OpnVviT7mJLrBx5qTWeR2RfiiEkm9v+HmevZQEdhOZg2A9w98bHLdWh2sYfjSJgvorNUjXgxba+mvsov9nixTf/k2RK8K7IvY1nbAuAwmS3uSXUBNvbyj0MhwUactPCcjwX9QCjCGrhVeZ1IlwoHPhOG7+zBPJ99ws6g0UBwhszotKN+3yTSgNU/PhW7jG3bjpKOso/CKg7Nv+UIdO8IljbcoJpLNZC/SC9XyHEjd8i4MKNi+tDFdguHk5b54Qobx2x0UaisrIrrNVfGZQliel5DU3eYs2kUPjVetmByO7sK8mXXj5HvIFv9t+XDkQVb1Y9D5CcU+DiKQGl0chWP+ZJu5uzxGClzm8MPO2ChGSKoFbYx95QFSiLc3gKjd6Z6lM4e3HYjMQ4ANt7Hjrez9mHbmbZnElKsg2vJS3gttglxEq5rlZg3Xm/6rRQfcbn93JHG29vLKAe+FjHCs9aG1l+MHn9eRgLbEz2JvMowHU7Tua0YM54J59ERZu1008FCvA2UR6k3sF+htnRiXDmbj/777cGcqv8ckm+OXKSB1ujGRbekkHgR9pf7HNUXPsZ3bwuHyio3mPikFQqU6m3Lm1esTQWrA5QoFuImyXQxDcSFeEx3/bFPkJfMOSw="
server: "https://test.pypi.org/legacy/"
distributions: "sdist bdist_wheel"
on:
branch: stable
condition: '$TRAVIS_COMMIT_MESSAGE == "pip release: "*'
############################################################################### ###############################################################################
# Stage-related definitions # Stage-related definitions
@ -105,7 +73,6 @@ stages:
- lint and pure python test - lint and pure python test
- test - test
- ibmq - ibmq
- deploy doc and pypi
# Define the job matrix explicitly, as matrix expansion causes issues when # Define the job matrix explicitly, as matrix expansion causes issues when
# using it with stages and some variables/sections cannot be overridden. # using it with stages and some variables/sections cannot be overridden.
@ -116,7 +83,7 @@ jobs:
# Linter and style check (GNU/Linux, Python 3.5) # Linter and style check (GNU/Linux, Python 3.5)
- stage: lint and pure python test - stage: lint and pure python test
<<: *stage_linux <<: *stage_linux
script: make style VERBOSE="" && make lint VERBOSE="" script: make style && make lint
# Run the tests against without compilation (GNU/Linux, Python 3.5) # Run the tests against without compilation (GNU/Linux, Python 3.5)
- stage: lint and pure python test - stage: lint and pure python test
@ -147,7 +114,14 @@ jobs:
# OSX, Python 3.7 (via pyenv) # OSX, Python 3.7 (via pyenv)
- stage: test - stage: test
<<: *stage_osx_python3_7 <<: *stage_osx
before_install:
|
if [ ${TRAVIS_OS_NAME} = "osx" ]; then
pyenv install 3.7.0
virtualenv --python ~/.pyenv/versions/3.7.0/bin/python venv
source venv/bin/activate
fi
# "ibmq" stage # "ibmq" stage
########################################################################### ###########################################################################
@ -157,28 +131,3 @@ jobs:
if: branch = master and repo = Qiskit/qiskit-terra and type = push if: branch = master and repo = Qiskit/qiskit-terra and type = push
python: 3.6 python: 3.6
env: USE_ALTERNATE_ENV_CREDENTIALS=True env: USE_ALTERNATE_ENV_CREDENTIALS=True
# "deploy" stage.
###########################################################################
# github pages documentation update (GNU/Linux, Python 3.5)
- stage: deploy doc and pypi
<<: *stage_linux
if: branch = stable and repo = Qiskit/qiskit-terra and type = push
script: cd ..
deploy:
<<: *deploy_ghpages
# GNU/Linux, Python 3.5
- stage: deploy doc and pypi
<<: *stage_linux
if: branch = stable and repo = Qiskit/qiskit-terra and type = push
deploy:
<<: *deploy_pypi
# OSX, Python 3.latest (brew does not support versions)
- stage: deploy doc and pypi
<<: *stage_osx
if: branch = stable and repo = Qiskit/qiskit-terra and type = push
deploy:
<<: *deploy_pypi
distributions: "bdist_wheel"

View File

@ -2,7 +2,7 @@ jsonschema>=2.6,<2.7
marshmallow>=2.17.0,<3 marshmallow>=2.17.0,<3
marshmallow_polyfield>=3.2,<4 marshmallow_polyfield>=3.2,<4
networkx>=2.2 networkx>=2.2
numpy>=1.13 numpy>=1.13,<1.16
pillow>=4.2.1 pillow>=4.2.1
ply>=3.10 ply>=3.10
psutil>=5 psutil>=5

View File

@ -13,7 +13,7 @@ requirements = [
"marshmallow>=2.17.0,<3", "marshmallow>=2.17.0,<3",
"marshmallow_polyfield>=3.2,<4", "marshmallow_polyfield>=3.2,<4",
"networkx>=2.2", "networkx>=2.2",
"numpy>=1.13", "numpy>=1.13,<1.16",
"pillow>=4.2.1", "pillow>=4.2.1",
"ply>=3.10", "ply>=3.10",
"psutil>=5", "psutil>=5",

View File

@ -1,45 +0,0 @@
#!/bin/bash
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# Authors: Diego M. Rodriguez <diego.moreda@ibm.com>
# Script for generating the sphinx documentation and deploying it in the
# Github Pages repository. Please note that this depends on having the
# following variable set on travis containing a valid token with permissions
# for pushing into the Github Pages repository:
# GH_TOKEN
# Non-travis variables used by this script.
TARGET_REPOSITORY_USER="Qiskit"
TARGET_REPOSITORY_NAME="qiskit.github.io"
TARGET_DOC_DIR="documentation"
TARGET_DOC_DIR_DE="documentation/de"
TARGET_DOC_DIR_JA="documentation/ja"
SOURCE_DOC_DIR="doc/_build/html"
SOURCE_DOC_DIR_DE="doc/_build/de/html"
SOURCE_DOC_DIR_JA="doc/_build/ja/html"
SOURCE_DIR=`pwd`
# Build the documentation.
make -C out doc
echo "Cloning the Github Pages repository ..."
cd ..
git clone https://github.com/$TARGET_REPOSITORY_USER/$TARGET_REPOSITORY_NAME.git
cd $TARGET_REPOSITORY_NAME
echo "Replacing $TARGET_DOC_DIR with the new contents ..."
git rm -rf $TARGET_DOC_DIR/_* $TARGET_DOC_DIR/de/* $TARGET_DOC_DIR/ja/* $TARGET_DOC_DIR/*.html
mkdir -p $TARGET_DOC_DIR $TARGET_DOC_DIR_DE $TARGET_DOC_DIR_JA
cp -r $SOURCE_DIR/$SOURCE_DOC_DIR/* $TARGET_DOC_DIR/
cp -r $SOURCE_DIR/$SOURCE_DOC_DIR_DE/* $TARGET_DOC_DIR_DE/
cp -r $SOURCE_DIR/$SOURCE_DOC_DIR_JA/* $TARGET_DOC_DIR_JA/
git add $TARGET_DOC_DIR
echo "Commiting and pushing changes ..."
git commit -m "Automated documentation update from SDK" -m "Commit: $TRAVIS_COMMIT" -m "Travis build: https://travis-ci.org/$TRAVIS_REPO_SLUG/builds/$TRAVIS_BUILD_ID"
git push --quiet https://$GH_TOKEN@github.com/$TARGET_REPOSITORY_USER/$TARGET_REPOSITORY_NAME.git > /dev/null 2>&1