Skip to content

Commit

Permalink
Merge pull request #1 from QCoDeS/master
Browse files Browse the repository at this point in the history
sync from QCodes master
  • Loading branch information
wpfff authored Dec 13, 2017
2 parents f86f51e + a7dbd3a commit 458281d
Show file tree
Hide file tree
Showing 62 changed files with 9,005 additions and 1,253 deletions.
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ install:
- pip install -r requirements.txt
- pip install -r test_requirements.txt --upgrade
- pip install -r docs_requirements.txt
# Install a new version of Sphinx that correctly handles forward refs once 1.7.0 is out that should
# be used instead
- pip install git+https://github.com/jenshnielsen/sphinx.git@working_forward_ref --upgrade
- pip install -e .

before_script: # configure a headless display to test plot generation
Expand All @@ -34,14 +37,16 @@ before_script: # configure a headless display to test plot generation
script:
- cd qcodes
- py.test --cov=qcodes --cov-report xml --cov-config=.coveragerc
# build docs with warnings as errors
- |
cd ../docs
make html-api
make SPHINXOPTS="-W" html-api
- cd ..

after_success:
# install dependencies for docs build
# upload code coverage
- python-codacy-coverage -r qcodes/coverage.xml
- codecov
# upload the docs
- |
if [[ $TRAVIS_REPO_SLUG == "QCoDeS/Qcodes" && $TRAVIS_BRANCH == "master" && $TRAVIS_PULL_REQUEST == "false" ]]; then
Expand Down
16 changes: 11 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,19 @@ Developer-pyenv

Core developers use virtualenv and pyenv to make sure all the system are the same,
this rules out issues and the usual "it works on my machine". Install pyenv
on your OS `see this <https://github.com/yyuu/pyenv>`__ .
on your OS `see this <https://github.com/pyenv/pyenv>`__ .

$QCODES_INSTALL_DIR is the folder where you want to have the source code.

.. code:: bash
git clone https://github.com/QCoDeS/Qcodes.git $QCODES_INSTALL_DIR
cd $QCODES_INSTALL_DIR
pyenv install 3.5.2
pyenv virtualenv 3.5.2 qcodes-dev
pyenv install 3.6.3
pyenv virtualenv 3.6.3 qcodes-dev
pyenv activate qcodes-dev
pip install -r requirements.txt
pip install coverage pytest-cov pytest --upgrade
pip install -r test_requirements.txt --upgrade
pip install -e .
py.test --cov=qcodes --cov-config=.coveragerc
Expand Down Expand Up @@ -112,11 +112,17 @@ Documentation is updated and deployed on every successful build in master.
We use sphinx for documentations, makefiles are provided both for
Windows, and \*nix.

Make sure that you have the extra dependencies required to install the docs

.. code:: bash
pip install -r docs_requirements.txt
Go to the directory ``docs`` and

.. code:: bash
make html
make html-api
This generate a webpage, index.html, in ``docs/_build/html`` with the
rendered html.
Expand Down
5 changes: 4 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ clean:
rm -rf $(BUILDDIR)/*
rm -rf _auto
rm -rf _notebooks
rm -rf api/generated

.PHONY: html
html:
Expand Down Expand Up @@ -228,8 +229,9 @@ dummy:
@echo
@echo "Build finished. Dummy builder generates no files."

.PHONY: html-api
html-api:
sphinx-apidoc -o _auto -d 10 ../qcodes/ ../qcodes/instrument_drivers/Spectrum/pyspcm.py ../qcodes/instrument_drivers/Spectrum/py_header/h2py.py
sphinx-apidoc -o _auto -d 10 ../qcodes/ ../qcodes/instrument_drivers/Spectrum/pyspcm.py ../qcodes/instrument_drivers/Spectrum/M4i.py ../qcodes/instrument_drivers/keysight
mkdir -p api/generated/
mkdir -p _notebooks
mkdir -p _notebooks/driver_examples
Expand All @@ -240,6 +242,7 @@ html-api:
jupyter-nbconvert --to rst 'examples/benchmarking/*.ipynb' --output-dir=_notebooks/benchmarking
make html

.PHONY: gh-pages
gh-pages:
git config --global user.email "[email protected]"
git config --global user.name "Documentation Bot"
Expand Down
10 changes: 3 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@
copyright = '2016, Giulio Ungaretti, Alex Johnson'
author = 'Giulio Ungaretti, Alex Johnson'


# Import matplotlib before qcodes import pyplot to set the backend
import matplotlib
matplotlib.use('Agg')
# auto versioning
import qcodes
version = '{}'.format(qcodes.__version__)
Expand Down Expand Up @@ -376,12 +378,6 @@
autodoc_default_flags = []
# we have to do this, do avoid sideeffects when importing matplotlib
autodoc_mock_imports = []
try:
import matplotlib
matplotlib.use('PS')
autodoc_mock_imports.append('matplotlib')
except ImportError as e:
print(e)
autodoc_mock_imports.append('pyspcm')
autodoc_mock_imports.append('zhinst')
autodoc_mock_imports.append('zhinst.utils')
Expand Down
Loading

0 comments on commit 458281d

Please sign in to comment.