In change I48b923a67010c92945c46ab00de0b090ba7cd465, way back in 2016,
we started hiding duplicate titles caused by us including the first h1
title we found at the top of the page. Unfortunately, the fix for this
was to hide *all* h1 titles found in the main docs body. Sphinx doesn't
insist on only a single h1 title (in fact, the sphinx-quickstart tool
produces an index.rst with two h1 titles) which means we were hiding a
lot of information unwittingly. Fix this by only hiding the first title,
as originally intended.
Also replace deprecated whitelist_externals by allowlist_externals
in tox.ini.
Change-Id: Ic8fc5e1256b4ab8925401fe6781210729a68d2aa
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Introduced changes:
- pre-commit config and rules
- Add pre-commit to pep8 gate, Flake8 is covered in the pre-commit hooks.
- Applying fixes for pre-commit compliance in all code.
Also commit hash will be used instead of version tags in pre-commit to
prevend arbitrary code from running in developer's machines.
pre-commit will be used to:
- trailing whitespace;
- Replaces or checks mixed line ending (mixed-line-ending);
- Forbid files which have a UTF-8 byte-order marker (check-byte-order-marker);
- Checks that non-binary executables have a proper
shebang (check-executables-have-shebangs);
- Check for files that contain merge conflict strings (check-merge-conflict);
- Check for debugger imports and py37+ breakpoint()
calls in python source (debug-statements);
- Attempts to load all yaml files to verify syntax (check-yaml);
- Run flake8 checks (flake8) (local)
For further details about tests please refer to:
https://github.com/pre-commit/pre-commit-hooks
Change-Id: I9b979afcd45e6a51252ccccb686b01beeb9157f8
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
This theme provides a sphinx extension that is used with parallel
building, thus enable parallel building so that we can sure it works
everywhere.
The time benefit is not worth the work, this is for testing.
Change-Id: I4e8b7fdb5c4b8c6bd738211802567b532528ab9a
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Fix problems found by updated hacking version.
Change-Id: I881f5d020d0ea95afb0eab6828928bc386afc263
PDF files from openstackdocsstheme-tox-manuals-buildpdf(-starlingxpdf)
jobs were not fetched after recent changes in the related zuul jobs.
This commit merges 'buildpdf' tox env into the 'docs' tox env
following the OpenStack PDF community goal convention.
The same change is made for starlingxdocs theme.
The .zuul.yaml file is updated accordingly.
Change-Id: I0081f77a19b71b093b3debf91e85a42cf2053471
Using "python setup.py check -r -s" method of checking the package has
been deprecated with the new recommendation to build the sdist and
wheel, then running "twine check" against the output.
Luckily, there is already a job that covers this that only runs when the
README, setup.py, or setup.cfg files change, making running this in the
pep8 job redundant. This covered by the test-release-openstack-python3
that is defined in the publish-to-pypi-python3 template.
More details can be found in this mailing list post:
http://lists.openstack.org/pipermail/openstack-dev/2018-October/136136.html
Change-Id: I7c17371b9f43c50bf07a460e1a3a731bf6d6a793
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
We can use this as a starting point for further changes. These files
are copies of those from openstacdocs with most of the openstac-specific
bits removed. This way we can track additional changes made as we progress.
Change-Id: I41c2a7d63ba7796aa3cf3cc001e077d5de28a14d
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
At the PTG the Docs team and dhellmann decided that openstackdocstheme
was the proper place to keep the modifications required to build
a theme for StarlingX and other OpenStack Foundation-related projects.
This is a minimal set of changes to support a second theme with a couple
of visual changes thrown in to make obvious that the correct theme
is being used. The remainder of the visual work will follow.
Both PNG and SVG versions of the logo are included.
Add an additional jobs to build the docs and PDF with the new theme.
Modify the wording in README.rst and the docs index page regarding
the distinction between openstackdocstheme the module and openstackdocs
and starlingxdocs the themes and their intended uses.
There are a number of hard-coded OpenStack-isms that will eventually
need to be addressed.
Change-Id: I594136a0ea66d61f60dafc6a853137470efc7d42
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
The buildpdf did not run since the parent job was mistyped, fix parent
job name and rename to follow conventions on job names.
Cleanup jobs in tox.ini:
Docs environment is now run by PTI, so only run building the html for
docs directory.
Change-Id: Ibd0e731d9b090e0c444a8e18caa3ad3153f8aa4a
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
Change-Id: I73e9613bf96da80d4dfd53246a568d0de691ae01
This commit is intended not to see the following error message.
- /bin/mkdir: cannot create directory ‘publish-docs’: File exists
Change-Id: I824a68ff46f0bb2a520644ed455d45e19b19a2bf
'pip install -U' ugrades specified packages, this is not necessary
since we use constraints, remove the parameter '-U' from the line.
With tools/tox_install.sh - which a previous change of mine removed -
the -U was not harmful, but with the current set up, it might cause
upgrades, so remove it.
Change-Id: Ie46c216d73da31d5fdd2ff1301e2d21af6eab0df
Follow https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh, we can build without it.
Create new doc/requirements.txt file with doc requirements to make them
optional. We cannot use ".[test]" with pip, it would still install
project with constraints and fail.
Change-Id: I4f1fa1fd3139a763222b0a0f18394a7660c62497
openstackdocstheme requires os-api-ref for testing, but os-api-ref requires
openstackdocstheme. To break this, make os-api-ref an optional test
requirement.
Change-Id: Ibbd01f63a516a49133cd8cdd4cf0cfe69bbaecaf
- First patch only modifies tox.ini to add an html-only
build option to iterate quickly.
- Modify .gitignore for working on Mac OSX locally.
Next patches in series will take care of:
- Adds a Project-only search form in bottom of left-hand navigation bar
Trying to differentiate between project-scoped search and broad
site search.
- The "Project Home page" link renamed from "Contents" in nav.
- Build number now available in lines "Updated" also is
displayed. Shows a bulleted list with "Current" if that is the
only available version. Seems to have a lot of space, okay?
- Add a link to project source in sidebar.
Change-Id: Ic71c1f7c17048c521fce4b08989b0c57c175e043
Some of the available checks are disabled by default, like:
[H106] Don’t put vim configuration in source files
[H203] Use assertIs(Not)None to check for None
Change-Id: Icb3a3828dff23f3aafe9332c352b38ffbcf17a24
This commit enables the sample document to support
PDF builds with Liberation font.
Since current Jenkins gate has docs build but does not have
publish-docs build, PDF builds are done in docs tox build job.
Change-Id: I9d40ac0bf179075c102170f9560629989520e12f
Implements: blueprint build-pdf-from-rst-guides
Co-Authored-By: SeongSoo Cho <nexusz99@gmail.com>
This is needed for change Ib2ca58105bfd1aad9508650e867a7e06892be719 to
test and upload to docs-draft PDF files.
Change-Id: I3b58c7535d9a16e87c4b71958f748df208bf01f0
Adding constraints support to libraries is slightly more complex than
services as the libraries themselves are listed in upper-constraints.txt
which leads to errors that you can't install a specific version and a
constrained version.
This change adds constraints support by also adding a helper script to
edit the constraints to remove openstackdocstheme.
Change-Id: I4ed268e3fec3754a4344c57509ff6969406335ad
Use proper combination of tox settings so that we install our sources
and not install the latest release of openstackdocstheme from pip since
it's a dependency of os-api-ref.
This works around a regression in tox/virtualenv/setuptools.
Co-Authored-By: Jeremy Stanley <fungi@yuggoth.org>
Change-Id: I6b3bf39d517a757cfc7240c770f4da67cccc0a3e
Document what is needed for testing and building -and use this in
our CI.
This uses a bindep.txt file.
Change-Id: Ia5e9ea90e2fcb02d44c74c96a4bfe957b649a856
- Adds a theme variable, sidebar_dropdown, to set
a dropdown menu for the API references.
To test, uncomment the parameter html_theme_options in
doc/source/conf.py OR build the API Ref demo docs.
- Adds an API Ref docs demo integrating os-api-ref
and openstackdocstheme. Tested with webserver:
python -m SimpleHTTPServer <port_num>.
Change-Id: I346695cd407ecf4efc0a5e00f2c0ccc1ea099ec5
The pep8 tests often does more than calling pep8, rename it to use the new
linters standard job for all lint like jobs.
Change-Id: I5b8ce374b1c4de88dea0a44ee89c6b91690759df
Depends-On: I7cf4766642dc3e7d7652e6d26ab2f14f9fcd7861
Add reno to automatically generate release notes - the same way other
OpenStack projects do it.
For details see
http://lists.openstack.org/pipermail/openstack-dev/2015-November/078301.html
This adds a version.py file to request the version of the repo.
Change-Id: Ia009f4cf73bd4188af3a126123d688438b97c994