All strings are considered as unicode strings in python 3,
so we no longer need "u" prefix (u'...').
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I796d2fcdca066475bbf29d25cbf2aa67b2b2178b
Change I90d064e63baa5f067f38a881eb9a556dfb435e97 contained a few typos
which broke the PDF and "Report a bug" icons on
https://docs.openstack.org/horizon/latest/ .
Fix the typos.
Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.
Change-Id: Iab18f322331f13f85f64fb4730d276b9d351b8cc
Switch to openstackdocstheme 2.2.0 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* parallelizing building of documents
Update Sphinx version as well.
openstackdocstheme renames some variables, so follow the renames. A
couple of variables are also not needed anymore, remove them.
Set openstackdocs_pdf_link to link to PDF file.
Remove docs requirements from lower-constraints, they are not installed.
For more info. please refer [1].
[1] https://review.opendev.org/728938
Change-Id: I90d064e63baa5f067f38a881eb9a556dfb435e97
Some options are now automatically configured by the version 1.20:
- project
- html_last_updated_fmt
- latex_engine
- latex_elements
- version
- release.
This will shows the version selector of the doc, too.
Change-Id: I38f0385a1fd676a4ba18259af7ad384af31ebe5a
As result of the recent opendev migration, github repositories
for non-TC-governed OpenStack projects are not synced automatically.
group-based-policy-ui is such repository.
It is a good chance to point repositories on opendev.org.
This commit replaces github links to opendev links.
This commit also updates bug tracker links to more direct links
to the bug trackers.
sphinx extlink is now used to simplify the plugin registry doc.
Change-Id: Ib1a746e2cd6c7ed0c81c10e2767d6f76ad0203b9
As of now, when horizon plugins are configured in the horizon repo,
pep8 and docs tox env cannot run.
This is because openstack_dashboard.settings tries to load horizon plugins
but horizon plugins are not installed in tox env by default and
the jobs will fail as a result.
This commit changes to use openstack_dashboard.test.settings
as DJANGO_SETTINGS_MODULE for these tox environments by default.
Change-Id: I6a9d0c74271cc4addd8a0964b5955d7d3b6d8267
In reviews we usually check import grouping but it is boring.
By using flake8-import-order plugin, we can avoid this.
This flake8 plugin is already used in tempest.
It enforces loose checking so it sounds good to use.
Note that flake8-import-order version is pinned to avoid unexpected
breakage of pep8 job.
Change-Id: I8ccd05eb70350a2441cc2a4d1eafc09ee690b83b
Set some of the new config values and enable openstackdocstheme as an
extension so it will inject values into the page context as it writes
each documentation page. This ensures the pages link to the right bug
tracker, etc.
Change-Id: I36d400358b1b5e2c2423c43f43c775bafb0d4721
Depends-On: Icf3a40ed104cfd828f532f6f2b112ed02f996ff5
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
html_last_updated_fmt option is interpreted as a
byte string in python3, causing Sphinx build to break.
This patch makes it utf-8 string.
Changing Popen to .check_output because of 3 reasons:
1. check_output() will raise CalledProcessError if
the called process returns a non-zero return code.
2. For consistency with keystone [1] and cinder [2]
3. It makes the code look much better.
[1] https://review.openstack.org/#/c/457142/
[2] https://review.openstack.org/#/c/433081
Change-Id: Ia6721b3b2bdf8427e8c42b4f056f5fcb7c4b73ee
This patch is the first in a series improving Horizons documentation. It
aims to make the initial quick start section clearer, updates the
information to remove some redundant information, and updates the
appearance to match the rest of the openstack docs.
Change-Id: I942e62b6c2c272dc2b5c91bca42c77677bb4e09d
Implements: blueprint pike-docs-overhaul
There is no need to catch warnings from openstack_dashboard.settings
in the doc build job. This might be a bug of a recent Sphinx 1.6.x,
but I think it is useful to have this setting to avoid unexpected failures.
Change-Id: I9894622ba0f5fbb74e9dac016ed76ac9e3c2f733
horizon devref has both explicit autodoc directives and
automatically generated source references.
This causes a lot of 'WARNING: duplicate object description'.
I think that we don't need source code references for most modules
and it is better to have explicit API references of modules
for which we need references. Thus this commit removes the logic
to generate source references.
This contributes a lot to reduce the number of sphinx warnings.
Also reduces the required time of documentation build :-)
Partial-Bug: #1411719
Partial-Bug: #1486222
Change-Id: Iba2bf3723cad159f4cfd1fff47e8114d9867e040
This change addresses the warnings and errors that are displayed when the
docs are built, including:
* Add reference to previously unreferenced workflow_extend in index file
* Remove reference to a _static directory that doesn't exist
* Fix formatting issues within the workflow_extend document
Comments in the bug report discuss the need for warnings to be treated
as errors, but this does not seem to be possible using the setup.py build_sphinx
command.
Change-Id: Iccccb9d104df9847ecd8a52aa73a7aa450bb5f34
Partial-Bug: #1411719
When building packages if git is absent, then we should not set
html_last_updated_fmt. It can still be set via the -D switch
when building with sphinx-build.
Change-Id: I905736fc5f998385128b306c75bc8191b2797dc6
Closes-Bug: #1552251
There's no RST file that uses ".. math" and thus
the pngmath Sphinx extension is not used and can
get removed.
Change-Id: I3ea4b529025c8ac3c4092f3720124647861e6668
os.popen() is deprecated since version 2.6. Resolved with use of
subprocess module.
Change-Id: I6ac6eb8618dd3d7325b43c67c1cb294bd8bff702
Partial-Bug: #1529836
When building docs, there are a ton of errors in this format:
AppRegistryNotReady: The translation infrastructure cannot be
initialized before the apps registry is ready. Check that you don't make
non-lazy gettext calls at import time.
Starting in Django 1.7, standalone scripts, such as a sphinx build
require that django.setup() be called first. See:
https://docs.djangoproject.com/en/1.8/releases/1.7/#standalone-scripts
This should be added to the horizon/docs/source/conf.py
Doing so eliminates the errors.
Closes-Bug: #1486139
Change-Id: I0871be3d60d4d78cb430fabdb5725832559191d7
Sphinx was always using (h)orizon and (o)penstack_dashboard for the
prefix so the index wasn't very useful.
Change-Id: Ifbd86d8d12e6dd808646d3b0708ca98ec6428e26
* Exclude test files from source code index
* Add an index to jump to sub indexes in source code index
* Ensure the order of source code index by using an array
rather than a dict.
Change-Id: I5c28a3e29c9c0b0332732d3f598030a77536563a
Remove intersphinx from the docs build as it triggers network calls that
occasionally fail, and we don't really use intersphinx (links other
sphinx documents out on the internet)
This also removes the requirement for internet access during docs build.
This causes docs jobs to fail because we error out on warnings.
Change-Id: I71e941e2a639641a662a163c682eb86d51de42fb
Related-Bug: #1368910
This is the final fix to re-enable flake8/pep8 check in the gate.
E265 errors in doc/source/conf.py are also fixed.
Imports with "from xxxx import (xxxx)" style cannot pass "tox -e pep8"
though they pass "run_tests.sh -p". Newlines with backslash escape
is used in this commit to pass it.
The reason needs to be investigated later.
Change-Id: Ic0d765d404212d13f678b2a3aef7b9612bf5238d
Closes-Bug: #1347472
When building the documentation via run_tests.sh, doc/source/conf.py
explicitly sets the DJANGO_SETTINGS_MODULE environment variable,
overriding any existing value that it already has. Furthermore, it sets
it to point to a settings file that does not use keystone v3, which
is expected by the tests (and is the source of the warning). Note that
when running unit tests via run_tests.sh, a different settings file is
supplied which DOES use keystone v3.
Change the doc/source/conf.py to only set DJANGO_SETTINGS_MODULE if it
is not already set. Change tox.ini and run_tests.sh to set
DJANGO_SETTINGS_MODULE to the same settings file used by the unit tests,
with keystone v3 support.
Change-Id: Ib297e4188f2426cf575300998bc9d50f36e48f4f
Closes-Bug: #1257725
In python 3 print statement is not supported, so we should use
only print() functions.
Fixes bug 1226943
Change-Id: I721e67c917ba7018401ad40ef30081883dcec420
Now all files are properly licensed per OpenStack Hacking.
Change-Id: I223d983018568357197b0d9cf5dde12c135c53c9
Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
Use the new oslo.sphinx version of the OpenStack doc
theme instead of copying it into this repo.
blueprint oslo.sphinx
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Change-Id: I0bd91f7bb43f97b99051fed65b75fc05d5149cc8
To better facilitate the building and publishing of sphinx
documentation by Jenkins we are moving all openstack projects with
sphinx documentation to a common doc tree structure. Documentation
goes in project/doc and build results go in project/doc/build.
Change-Id: Ic523a716e4113198b777d6dc3db8bb8a729e7696
Implements blueprint extensible-architecture.
Implements blueprint improve-dev-documentation.
Implements blueprint gettext-everywhere.
Implements blueprint sphinx-docs.
Complete re-architecture of the dashboard to transform it from a standalone django-openstack app to a Horizon framework for building dashboards. See the docs for more information.
Incidentally fixes the following bugs:
Fixes bug 845868 -- no PEP8 violations.
Fixes bug 766096 -- the dashboard can now be installed at any arbitrary URL.
Fixes bug 879111 -- tenant id is now controlled solely by the tenant switcher, not the url (which was disregarded anyway)
Fixes bug 794754 -- output of venv installation is considerably reduced.
Due to the scale and scope of this patch I recommend reviewing it on github: https://github.com/gabrielhurley/horizon/tree/extensible_architecture
Change-Id: I8e63f7ea235f904247df40c33cb66338d973df9e