Skip to content

Commit

Permalink
Remove doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb-johnson committed Sep 6, 2024
1 parent a5e144c commit 2c91c71
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 27 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test_development_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,3 @@ jobs:
toxpyversion=$(echo ${{ matrix.python-version }} | sed -E 's/^([0-9]+)\.([0-9]+).*$/\1\2/')
tox -epy${toxpyversion}
tox -epy${toxpyversion}-notebook
tox -edoctest
1 change: 0 additions & 1 deletion .github/workflows/test_latest_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ jobs:
toxpyversion=$(echo ${{ matrix.python-version }} | sed -E 's/^([0-9]+)\.([0-9]+).*$/\1\2/')
tox -epy${toxpyversion}
tox -epy${toxpyversion}-notebook
tox -edoctest
1 change: 0 additions & 1 deletion .github/workflows/test_minimum_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,3 @@ jobs:
toxpyversion=$(echo ${{ matrix.python-version }} | sed -E 's/^([0-9]+)\.([0-9]+).*$/\1\2/')
tox -epy${toxpyversion}
tox -epy${toxpyversion}-notebook
tox -edoctest
8 changes: 2 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies = [

[project.optional-dependencies]
dev = [
"qiskit-addon-sqd[test,doctest,nbtest,lint,docs]",
"qiskit-addon-sqd[test,nbtest,lint,docs]",
]
basetest = [
"tox>=4.0",
Expand All @@ -43,10 +43,6 @@ basetest = [
test = [
"qiskit-addon-sqd[basetest]",
]
doctest = [
"qiskit-addon-sqd[basetest,notebook-dependencies]",
"pytest-doctestplus>=1.2.1",
]
nbtest = [
"qiskit-addon-sqd[basetest]",
"nbmake>=1.5.0",
Expand All @@ -71,7 +67,7 @@ notebook-dependencies = [
"qiskit-ibm-runtime",
]
docs = [
"qiskit-addon-sqd[doctest]",
"qiskit-addon-sqd[basetest,notebook-dependencies]",
"qiskit-sphinx-theme~=2.0.0",
"jupyter-sphinx",
"sphinx-design",
Expand Down
2 changes: 1 addition & 1 deletion qiskit_addon_sqd/configuration_recovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def recover_configurations(
Refine bitstrings based on average orbital occupancy and a target hamming weight.
This function makes the assumption that bit ``i`` represents the same orbital as
bit ``i + # orbitals`` in all input bitstrings, s.t. i < # orbitals.
bit ``i + # orbitals`` in all input bitstrings, s.t. ``i < # orbitals``.
Args:
bitstring_matrix: A 2D array of ``bool`` representations of bit
Expand Down
9 changes: 0 additions & 9 deletions test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,6 @@ The `notebook` and `py##-notebook` environments invoke [nbmake] to ensure that a
$ tox -e py310-notebook
```

## Doctest environment

The `doctest` environment uses [doctest] to execute the code snippets that are embedded into the documentation strings. The tests get run using [pytest].

```sh
tox -e doctest
```

## Coverage environment

The `coverage` environment uses [Coverage.py] to ensure that the fraction of code tested by pytest is above some threshold (enforced to be 100% for new modules). A detailed, line-by-line coverage report can be viewed by navigating to `htmlcov/index.html` in a web browser.
Expand Down Expand Up @@ -97,7 +89,6 @@ If the build succeeds, it can be viewed by navigating to `docs/_build/html/index
[pylint]: https://github.com/PyCQA/pylint
[nbqa]: https://github.com/nbQA-dev/nbQA
[Jupyter]: https://jupyter.org/
[doctest]: https://docs.python.org/3/library/doctest.html
[pytest]: https://docs.pytest.org/
[unittest]: https://docs.python.org/3/library/unittest.html
[Coverage.py]: https://coverage.readthedocs.io/
Expand Down
8 changes: 0 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,6 @@ extras =
commands =
pytest --nbmake --nbmake-timeout=3000 {posargs} docs/tutorials/

[testenv:doctest]
basepython = python3.10
extras =
test
doctest
commands =
pytest --doctest-plus --doctest-only

[testenv:coverage]
deps =
coverage>=7.5
Expand Down

0 comments on commit 2c91c71

Please sign in to comment.