Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions .ado/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,8 @@ jobs:
- script: |
cd $(Build.SourcesDirectory)/azure-quantum
pip install ".[cirq,qsharp,dev]"
pytest --numprocesses $(PYTEST_MAX_PARALLEL_TESTS) --cov-report term --cov=azure.quantum --junitxml test-output-azure-quantum.xml --ignore tests/unit/test_qiskit.py --ignore tests/unit/test_session_qiskit.py $(Build.SourcesDirectory)/azure-quantum --ignore tests/unit/local
displayName: Run azure-quantum unit tests

- script: |
cd $(Build.SourcesDirectory)/azure-quantum
# Run local-only tests explicitly to include nested path under unit/local
pytest --numprocesses $(PYTEST_MAX_PARALLEL_TESTS) --cov=azure.quantum --cov-append --junitxml test-output-azure-quantum-local.xml tests/unit/local
displayName: Run azure-quantum local unit tests
pytest --numprocesses $(PYTEST_MAX_PARALLEL_TESTS) --cov=azure.quantum --cov-append --junitxml test-output-azure-quantum.xml tests
displayName: Run azure-quantum tests

- script: |
cd $(Build.SourcesDirectory)/azure-quantum
Expand Down
10 changes: 2 additions & 8 deletions .ado/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,8 @@ extends:
- script: |
cd $(Build.SourcesDirectory)/azure-quantum
pip install ".[cirq,qsharp,dev]"
pytest --numprocesses $(PYTEST_MAX_PARALLEL_TESTS) --cov-report term --cov=azure.quantum --junitxml test-output-azure-quantum.xml --ignore tests/unit/test_qiskit.py --ignore tests/unit/test_session_qiskit.py $(Build.SourcesDirectory)/azure-quantum --ignore tests/unit/local
displayName: Run azure-quantum unit tests

- script: |
cd $(Build.SourcesDirectory)/azure-quantum
# Run local-only tests explicitly to include nested path under unit/local
pytest --numprocesses $(PYTEST_MAX_PARALLEL_TESTS) --cov=azure.quantum --cov-append --junitxml test-output-azure-quantum-local.xml tests/unit/local
displayName: Run azure-quantum local unit tests
pytest --numprocesses $(PYTEST_MAX_PARALLEL_TESTS) --cov=azure.quantum --cov-append --junitxml test-output-azure-quantum.xml tests
displayName: Run azure-quantum tests

- script: |
cd $(Build.SourcesDirectory)/azure-quantum
Expand Down
45 changes: 0 additions & 45 deletions .devcontainer/recordings/devcontainer.json

This file was deleted.

2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,6 @@ azure-quantum/azure/quantum/version.py
azure-quantum/dist
azure-quantum/temp
azure-quantum/build
!azure-quantum/tests/unit/recordings/*.yaml
!azure-quantum/tests/unit/aio/recordings/*.yaml
*.txt
!azure-quantum/requirements*.txt
[.][v]env/
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"testExplorer.showOnRun": true,
"testExplorer.addToEditorContextMenu": true,
"python.testing.pytestArgs": [
"./azure-quantum/tests/unit",
"./azure-quantum/tests",
"-n",
"auto",
"--dist",
Expand Down
12 changes: 3 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pytest
To run the a specific unit test class, run:

```bash
pytest ./tests/unit/test_job.py
pytest ./tests/test_job_results.py
```

To run the a specific unit test case, run:
Expand All @@ -54,12 +54,6 @@ To run the a specific unit test case, run:
pytest -k test_job_refresh
```

### Recordings

To read more about how to create and update recordings for testing code that interacts with a live API, see the [README](./azure-quantum/tests/README.md).

Before merging your code contribution to `main`, make sure that all new code is covered by unit tests and that the unit tests have up-to-date recordings. If you recorded your tests and then updated or refactored the code, remember to re-record the tests.

## Building the `azure-quantum` Package wheel

The Azure Quantum Python SDK uses a standard `setuptools`-based packaging strategy.
Expand Down Expand Up @@ -155,9 +149,9 @@ The `tox run -e generate` call will look for a `tsp-location.yaml` file in your

### After re-generating the client make sure to:

1. Re-run/Re-record all unit tests against the live-service (you can run [Record-Tests.ps1](./azure-quantum/eng/Record-Tests.ps1))
1. If necessary, adjust the convenience layer for breaking-changes or to expose new features
1. Add new unit-tests for new features and record them too
1. Add new unit-tests for new features
1. Update/add e2e tests in separate repo if necessary

## Environment Variables ###

Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ required to debug changes to any libraries licensed under the GNU Lesser General

qiskit-ionq helpers and exceptions (commit cea8f9874b992f82a35648582c06958869370c69) - Apache-2.0

Portions of azure.quantum.qiskit.backends._qiskit_ionq.py and azure-quantum/tests/unit/test_qiskit.py
Portions of azure.quantum.qiskit.backends._qiskit_ionq.py
are adapted from qiskit-community/qiskit-ionq (ionq_gates.py, helpers.py, and exceptions.py) to
support Qiskit BackendV2.
Copyright 2017-2018 IBM and 2020-2021 IonQ, Inc.
Expand Down
1 change: 0 additions & 1 deletion azure-quantum/eng/Clear-Env-Vars.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ $env:AZURE_QUANTUM_ENV = $null
$env:AZURE_CLIENT_ID = $null
$env:AZURE_CLIENT_SECRET = $null
$env:AZURE_TENANT_ID = $null
$env:AZURE_TEST_RUN_LIVE = $null
$env:AZURE_QUANTUM_WORKSPACE_RG = $null
$env:SUBSCRIPTION_ID = $null
$env:AZURE_QUANTUM_WORKSPACE_NAME = $null
Expand Down
42 changes: 0 additions & 42 deletions azure-quantum/eng/Record-Tests.ps1

This file was deleted.

18 changes: 0 additions & 18 deletions azure-quantum/pytest.ini

This file was deleted.

2 changes: 0 additions & 2 deletions azure-quantum/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
pytest>=7.1.2
pytest-xdist>=3.8.0,<4.0
vcrpy>=4.3.1 # fixes https://github.com/kevin1024/vcrpy/issues/688
azure-devtools>=1.2.0,<2.0
graphviz>=0.20.1
tox>=4.32.0
4 changes: 1 addition & 3 deletions azure-quantum/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
azure-core>=1.30,<2.0
azure-identity>=1.17,<2.0
# TODO: recent versions break recordings.
# More than one match for "https://mystorage.blob.core.windows.net/.../rawOutputData"
azure-storage-blob==12.20
azure-storage-blob>=12.20,<13.0
msrest>=0.7.1,<1.0
numpy>=1.21.0
deprecated>=1.2.12,<2.0
55 changes: 0 additions & 55 deletions azure-quantum/tests.live/Install-Artifacts.ps1

This file was deleted.

84 changes: 0 additions & 84 deletions azure-quantum/tests.live/Run.ps1

This file was deleted.

Loading