Skip to content

Commit

Permalink
Upgrade to qiskit_sphinx_theme 1.12 (#273)
Browse files Browse the repository at this point in the history
Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>
  • Loading branch information
Eric-Arellano and woodsp-ibm committed May 24, 2023
1 parent 50ad40a commit 25a6546
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 108 deletions.
Binary file removed docs/_static/no_image.png
Binary file not shown.
33 changes: 11 additions & 22 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,7 @@
sys.path.insert(0, os.path.abspath(".."))
sys.path.append(os.path.abspath("."))

"""
Sphinx documentation builder
"""

import qiskit_sphinx_theme
import qiskit_finance
from custom_directives import CustomCalloutItemDirective

# Set env flag so that we can doc functions that may otherwise not be loaded
# see for example interactive visualizations in qiskit.visualization.
Expand Down Expand Up @@ -95,14 +89,15 @@
"sphinx.ext.intersphinx",
"qiskit_sphinx_theme",
]
html_static_path = ["_static"]
templates_path = ["_templates"]

docs_url_prefix = "ecosystem/finance"

nbsphinx_timeout = 360
nbsphinx_execute = os.getenv("QISKIT_DOCS_BUILD_TUTORIALS", "never")
nbsphinx_widgets_path = ""
nbsphinx_thumbnails = {
"**": "_static/no_image.png",
"**": "_static/images/logo.png",
}

spelling_word_list_filename = "../.pylintdict"
Expand Down Expand Up @@ -139,15 +134,15 @@
# strings that are used for format of figure numbers. As a special character,
# %s will be replaced to figure number.
numfig_format = {"table": "Table %s"}
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = "en"

# For Adding Locale
locale_dirs = ["locale/"] # path is example but recommended.
translations_list = [
("en", "English"),
("bn_BN", "Bengali"),
("ja_JP", "Japanese"),
("es_UN", "Spanish"),
]
language = "en"
locale_dirs = ["locale/"]
gettext_compact = False # optional.

# List of patterns, relative to source directory, that match files and
Expand Down Expand Up @@ -199,9 +194,3 @@
}

html_context = {"analytics_enabled": True}
# -- Extension configuration -------------------------------------------------


def setup(app):
app.add_directive("customcalloutitem", CustomCalloutItemDirective)
app.setup_extension("versionutils")
4 changes: 2 additions & 2 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ specific to Qiskit Finance.

.. tab-item:: Start locally

The simplest way to get started is to follow the `getting started 'Start locally' guide for
The simplest way to get started is to follow the `getting started 'Start locally' guide for
Qiskit <https://qiskit.org/documentation/getting_started.html>`__

In your virtual environment where you installed Qiskit simply add ``finance`` to the
Expand Down Expand Up @@ -95,7 +95,7 @@ Ready to get going?...
<div class="tutorials-callout-container">
<div class="row">

.. customcalloutitem::
.. qiskit-call-to-action-item::
:description: Find out about Qiskit Finance.
:header: Dive into the tutorials
:button_link: ./tutorials/index.html
Expand Down
78 changes: 0 additions & 78 deletions docs/versionutils.py

This file was deleted.

4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.black]
line-length = 100
target-version = ['py37', 'py38', 'py39', 'py310']
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ qiskit-aer
mypy>=0.780
mypy-extensions>=0.4.3
nbsphinx
qiskit_sphinx_theme~=1.11.1
qiskit_sphinx_theme~=1.12.0
types-certifi
11 changes: 6 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ commands =
envdir = .tox/docs
basepython = python3
commands =
sphinx-build -W -T --keep-going -b html {posargs} docs/ docs/_build/html
sphinx-build -j auto -W -T --keep-going -b html {posargs} docs/ docs/_build/html

[testenv:gettext]
envdir = .tox/docs
Expand All @@ -61,7 +61,8 @@ commands =
sphinx-build -W -T --keep-going -b gettext docs/ docs/_build/gettext {posargs}
sphinx-intl -c docs/conf.py update -p docs/_build/gettext -l en -d docs/locale

[pycodestyle]
max-line-length = 105
# + E203 because of a difference of opinion with black
ignore = E121, E123, E126, E133, E226, E241, E242, E704, W503, W504, W505, E203
[testenv:docs-clean]
skip_install = true
deps =
allowlist_externals = rm
commands = rm -rf {toxinidir}/docs/stubs/ {toxinidir}/docs/_build

0 comments on commit 25a6546

Please sign in to comment.