Skip to content

Commit

Permalink
Merge pull request #4 from qutech-sd/upstream_update
Browse files Browse the repository at this point in the history
  • Loading branch information
CumulonimbusCalvus authored Feb 12, 2019
2 parents d6564c6 + bec01dc commit dcb1f30
Show file tree
Hide file tree
Showing 149 changed files with 20,081 additions and 5,306 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,6 @@ experiments.db
benchmarking/env/
benchmarking/html/
benchmarking/results/

# Ignore .db files that are generated for some tests
qcodes/tests/dataset/fixtures/db_files/*
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ python:
branches:
only:
- master
- DataStorageInterface

# command to install dependencies and qcodes
# We want to fail early if there is an installation problem, so
Expand All @@ -30,7 +31,7 @@ install:

before_script: # configure a headless display to test plot generation
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- sleep 3 # give xvfb some time to start

script:
Expand All @@ -40,12 +41,14 @@ script:
- |
pip uninstall -y qcodes
pip install -e .
cd qcodes/tests/dataset/legacy_DB_generation
cd ..
git clone https://github.com/QCoDeS/qcodes_generate_test_db.git
cd qcodes_generate_test_db
python generate_version_0.py
python generate_version_1.py
python generate_version_2.py
python generate_version_3.py
cd ../../../..
cd $TRAVIS_BUILD_DIR
pip uninstall -y qcodes
pip install .
- cd qcodes
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ To get a feeling of qcodes browse the Jupyter notebooks in `docs/examples
<https://github.com/QCoDeS/Qcodes/tree/master/docs/examples>`__ .


QCoDeS is compatible with Python 3.5+. It is primarily intended for use
QCoDeS is compatible with Python 3.6+. It is primarily intended for use
from Jupyter notebooks, but can be used from traditional terminal-based
shells and in stand-alone scripts as well. The features in
`qcodes.utils.magic` are exclusively for Jupyter notebooks.
Expand Down
29 changes: 21 additions & 8 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,36 @@ jobs:
mypy qcodes
displayName: "mypy"
- script: |
cd qcodes
python tests\dataset\legacy_DB_generation\generate_version_0.py
python tests\dataset\legacy_DB_generation\generate_version_1.py
python tests\dataset\legacy_DB_generation\generate_version_2.py
python tests\dataset\legacy_DB_generation\generate_version_3.py
cd ..
git clone https://github.com/QCoDeS/qcodes_generate_test_db.git
cd qcodes_generate_test_db
python generate_version_0.py
python generate_version_1.py
python generate_version_2.py
python generate_version_3.py
displayName: "Generate db fixtures"
- script: |
cd qcodes
pytest --junitxml=test-results.xml --cov=qcodes --cov-report=xml --cov-report=html --cov-config=.coveragerc
displayName: "Pytest"
- task: PublishTestResults@1
condition: always() # this step will always run, even if the pipeline is cancelled
inputs:
testResultsFiles: 'qcodes\test-*.xml'
testRunTitle: 'Publish test results'
- script: |
cd docs
REM Turn warnings into errors
set SPHINXOPTS=-W -v
make.bat htmlapi
displayName: "docsbuild"
- task: PublishTestResults@1
- task: PublishBuildArtifacts@1
inputs:
testResultsFiles: 'qcodes\test-*.xml'
testRunTitle: 'Publish test results'
pathtoPublish: 'docs/_build/html'
artifactName: 'qcodes_docs'
publishLocation: 'Container'
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)\qcodes\coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)\qcodes\htmlcov'
5 changes: 4 additions & 1 deletion docs/api/public.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ DataSet
qcodes.dataset.database.initialise_database
qcodes.dataset.database.initialise_or_create_database_at

qcodes.dataset.data_set.DataSet
qcodes.dataset.data_set.load_by_id
qcodes.dataset.data_set.load_by_guid

qcodes.dataset.plotting.plot_by_id

Expand All @@ -107,14 +109,15 @@ Instrument

Function
Parameter
StandardParameter
ParameterWithSetpoints
ArrayParameter
MultiParameter
ManualParameter
SweepFixedValues
SweepValues
combine
CombinedParameter
qcodes.instrument.parameter.expand_setpoints_helper


Instrument
Expand Down
2 changes: 1 addition & 1 deletion docs/community/objects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Rough linkages:

In **bold** the containing class creates this object. In *italics* the
container just holds this object (or class) as a default for derivatives
to use. Normal text the container includes and uses this object.
to use. Normal text shows the container includes and uses of this object.

- Station
- Instrument: IPInstrument, VisaInstrument, MockInstrument
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None),
'matplotlib': ('https://matplotlib.org/', None),
'python': ('https://docs.python.org/3.6', None),
'numpy': ('https://docs.scipy.org/doc/numpy', None),
Expand Down
2 changes: 1 addition & 1 deletion docs/dataset/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This page explains the basics of the QCoDeS dataset. Read here to figure out wha
Basics
======

The DataSet is directly linked to an SQLite database on the machine hard drive. Here we provide an overview of the layout of that database.
The DataSet is directly linked to an SQLite database on the host machine's hard drive. Here we provide an overview of the layout of that database.
The specifics of the python objects implementing the API on top of that can be found in the section :ref:`datasetdesign`.

The database holds a number of ``Experiments`` that each holds a number of ``DataSets``. One ``DataSet`` contains exactly one ``run``, and we may use the words ``DataSet`` and ``run`` interchangeably.
Expand Down
15 changes: 13 additions & 2 deletions docs/examples/Creating Instrument Drivers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,18 @@
" - Accepts get and/or set commands as either strings for the instrument's `ask` and `write` methods, or functions/methods. The set and get commands may also be set to `False` and `None`. `False` corresponds to \"no get/set method available\" (example: the reading of a voltmeter is not settable, so we set `set_cmd=False`). `None` corresponds to a manually updated parameter (example: an instrument with no remote interface).\n",
" - Has options for translating between instrument codes and more meaningful data values\n",
" - Supports software-controlled ramping\n",
"- Any other parameter class may be used in `add_parameter`, if it accepts `name` and `instrument` as constructor kwargs. Generally these should subclass `Parameter`, `ArrayParameter`, or `MultiParameter`."
"- Any other parameter class may be used in `add_parameter`, if it accepts `name` and `instrument` as constructor kwargs. Generally these should subclasses of `Parameter`, `ParameterWithSetpoints`, `ArrayParameter`, or `MultiParameter`."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"`ParameterWithSetpoints` is specifically designed to handle the situations where the instrument returns an array of data with assosiated setpoints. An example of how to use it can be found in the notebook [Simple Example of ParameterWithSetpoints](writing_drivers/Simple-Example-of-ParameterWithSetpoints.ipynb)\n",
"\n",
"`ArrayParameter` is an older alternative that does the same thing. However, it is significantly less flexible and much harder to use correct but used in a significant number of drivers. **It is not recommended for any new driver.**\n",
"\n",
"`MultiParameter` is designed to for the situation where multiple different types of data is captured from the same instrument command."
]
},
{
Expand Down Expand Up @@ -546,7 +557,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.7"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
918 changes: 827 additions & 91 deletions docs/examples/DataSet/Dataset Context Manager.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit dcb1f30

Please sign in to comment.