Skip to content

Commit

Permalink
Remove docs, tutorials, sphinx, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
ElePT committed Jul 18, 2023
1 parent 49bb306 commit be8f07b
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 377 deletions.
83 changes: 0 additions & 83 deletions .github/workflows/deploy-docs.yml

This file was deleted.

117 changes: 5 additions & 112 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ jobs:
- uses: ./.github/actions/install-algorithms
- name: Install Dependencies
run: |
pip install torchvision
sudo apt-get -y install pandoc graphviz
sudo apt-get -y install python3-enchant
sudo apt-get -y install hunspell-en-us
Expand All @@ -84,28 +83,9 @@ jobs:
shell: bash
- name: Style Check
run: |
make clean_sphinx
make style
if: ${{ !cancelled() }}
shell: bash
- name: Run make html
run: |
make clean_sphinx
make html
cd docs/_build/html
mkdir artifacts
tar -zcvf artifacts/documentation.tar.gz --exclude=./artifacts .
if: ${{ !cancelled() }}
shell: bash
- name: Run upload documentation
uses: actions/upload-artifact@v3
with:
name: documentation
path: docs/_build/html/artifacts/documentation.tar.gz
if: ${{ !cancelled() }}
- run: make doctest
if: ${{ !cancelled() }}
shell: bash
Algorithms:
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -154,107 +134,20 @@ jobs:
- name: Deprecation Messages
run: |
mkdir ./ci-artifact-data
python tools/extract_deprecation.py -file out.txt -output ./ci-artifact-data/ml.dep
python tools/extract_deprecation.py -file out.txt -output ./ci-artifact-data/alg.dep
shell: bash
- name: Coverage combine
run: |
coverage3 combine
mv .coverage ./ci-artifact-data/ml.dat
mv .coverage ./ci-artifact-data/alg.dat
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == 3.8 }}
shell: bash
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-${{ matrix.python-version }}
path: ./ci-artifact-data/*
- name: Algorithms Unit Tests without torch/sparse under Python ${{ matrix.python-version }}
env:
PYTHONWARNINGS: default
run: |
pip uninstall -y torch sparse
if [ "${{ github.event_name }}" == "schedule" ] || [ "${{ contains(github.event.pull_request.labels.*.name, 'run_slow') }}" == "true" ]; then
export QISKIT_TESTS="run_slow"
fi
stestr --test-path test run
if: ${{ !cancelled() }}
shell: bash
Tutorials:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.8, 3.11]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
setup.py
requirements.txt
requirements-dev.txt
- uses: ./.github/actions/install-main-dependencies
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
if: ${{ !startsWith(github.ref, 'refs/heads/stable') && !startsWith(github.base_ref, 'stable/') }}
- uses: ./.github/actions/install-algorithms
- name: Install Dependencies
run: |
pip install torchvision
sudo apt-get install -y pandoc graphviz
shell: bash
- name: Run Algorithms Tutorials
env:
QISKIT_PARALLEL: False
QISKIT_DOCS_BUILD_TUTORIALS: 'always'
run: |
echo "earliest_version: 0.1.0" >> releasenotes/config.yaml
make html
cd docs/_build/html
mkdir artifacts
tar -zcvf artifacts/tutorials.tar.gz --exclude=./artifacts .
shell: bash
- name: Run upload tutorials
uses: actions/upload-artifact@v3
with:
name: tutorials${{ matrix.python-version }}
path: docs/_build/html/artifacts/tutorials.tar.gz
- name: Run stable tutorials
env:
QISKIT_PARALLEL: False
QISKIT_DOCS_BUILD_TUTORIALS: 'always'
run: |
# clean last sphinx output
make clean_sphinx
# get current version
version=$(pip show qiskit-algorithms | awk -F. '/^Version:/ { print substr($1,10), $2-1 }' OFS=.)
# download stable version
wget https://codeload.github.com/qiskit-community/qiskit-algorithms/zip/stable/$version -O /tmp/repo.zip
unzip /tmp/repo.zip -d /tmp/
# copy stable tutorials to main tutorials
cp -R /tmp/qiskit-algorithms-stable-$version/docs/tutorials/* docs/tutorials
# run tutorials and zip results
echo "earliest_version: 0.1.0" >> releasenotes/config.yaml
# ignore unreleased/untagged notes
tools/ignore_untagged_notes.sh
make html
cd docs/_build/html
mkdir artifacts
tar -zcvf artifacts/tutorials.tar.gz --exclude=./artifacts .
if: ${{ matrix.python-version == 3.8 && !startsWith(github.ref, 'refs/heads/stable') && !startsWith(github.base_ref, 'stable/') }}
shell: bash
- name: Run upload stable tutorials
uses: actions/upload-artifact@v3
with:
name: tutorials-stable${{ matrix.python-version }}
path: docs/_build/html/artifacts/tutorials.tar.gz
if: ${{ matrix.python-version == 3.8 && !startsWith(github.ref, 'refs/heads/stable') && !startsWith(github.base_ref, 'stable/') }}
Deprecation_Messages_and_Coverage:
needs: [Checks, Algorithms, Tutorials]
needs: [Checks, Algorithms]
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -301,10 +194,10 @@ jobs:
shell: bash
- name: Combined Deprecation Messages
run: |
sort -f -u /tmp/u38/ml.dep /tmp/u39/ml.dep /tmp/u310/ml.dep /tmp/u311/ml.dep /tmp/m38/ml.dep /tmp/m311/ml.dep /tmp/w38/ml.dep /tmp/w311/ml.dep || true
sort -f -u /tmp/u38/alg.dep /tmp/u39/alg.dep /tmp/u310/alg.dep /tmp/u311/alg.dep /tmp/m38/alg.dep /tmp/m311/alg.dep /tmp/w38/alg.dep /tmp/w311/alg.dep || true
shell: bash
- name: Coverage combine
run: coverage3 combine /tmp/u38/ml.dat
run: coverage3 combine /tmp/u38/alg.dat
shell: bash
- name: Upload to Coveralls
env:
Expand Down
2 changes: 0 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@ include requirements.txt
include qiskit_algorithms/py.typed
recursive-include qiskit_algorithms *.txt
graft test
prune docs
prune tools
prune tutorials
global-exclude *.py[co] .DS_Store
23 changes: 5 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,20 @@ endif
# You can set this variable from the command line.
SPHINXOPTS =

.PHONY: lint mypy style black test test_ci spell copyright html doctest clean_sphinx coverage coverage_erase clean
.PHONY: lint style black test test_ci spell copyright coverage clean

all_check: spell style lint copyright mypy clean_sphinx html doctest
all_check: spell style lint copyright

lint:
pylint -rn qiskit_algorithms test tools
python tools/verify_headers.py qiskit_algorithms test tools
python tools/find_stray_release_notes.py

mypy:
mypy qiskit_algorithms test tools

style:
black --check qiskit_algorithms test tools docs
black --check qiskit_algorithms test tools

black:
black qiskit_algorithms test tools docs
black qiskit_algorithms test tools

test:
python -m unittest discover -v test
Expand All @@ -62,25 +59,15 @@ test_ci:

spell:
pylint -rn --disable=all --enable=spelling --spelling-dict=en_US --spelling-private-dict-file=.pylintdict qiskit_algorithms test tools
sphinx-build -M spelling docs docs/_build -W -T --keep-going $(SPHINXOPTS)

copyright:
python tools/check_copyright.py

html:
sphinx-build -M html docs docs/_build -W -T --keep-going $(SPHINXOPTS)

doctest:
sphinx-build -M doctest docs docs/_build -W -T --keep-going $(SPHINXOPTS)

clean_sphinx:
make -C docs clean

coverage:
coverage3 run --source qiskit_algorithms -m unittest discover -s test -q
coverage3 report

coverage_erase:
coverage erase

clean: clean_sphinx coverage_erase;
clean: coverage_erase;
6 changes: 5 additions & 1 deletion constraints.txt
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# There are currently no constraints for Qiskit Algorithms
# Numpy 1.25 deprecated some behaviours that we used, and caused the isometry
# tests to flake. See https://github.com/Qiskit/qiskit-terra/issues/10305,
# remove pin when resolving that.
numpy<1.25

7 changes: 0 additions & 7 deletions mypy.ini

This file was deleted.

9 changes: 1 addition & 8 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
coverage>=4.4.0,<7.0
matplotlib>=3.3
black[jupyter]~=22.0
black~=22.0
pylint>=2.15.0
pylatexenc>=1.4
stestr>=2.0.0
ddt>=1.2.0,!=1.4.0
reno>=3.4.0
Sphinx>=5.0
sphinx-design>=0.4.0
sphinxcontrib-spelling
jupyter-sphinx
discover
nbsphinx
qiskit_sphinx_theme~=1.12.0
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
qiskit-terra>=0.24
scipy>=1.4
numpy>=1.17
rustworkx>=0.13
30 changes: 0 additions & 30 deletions tools/deploy_documentation.sh

This file was deleted.

Loading

0 comments on commit be8f07b

Please sign in to comment.