Commit Graph

39 Commits

Author SHA1 Message Date
Stephen Finucane 20bf587d68 Only hide top-level duplicated title
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>
2023-02-23 21:29:53 +01:00
Stephen Finucane e2d40fa030 tox: Toggle 'usedevelop'
I want the latest changes picked up always.

Change-Id: I03c5b549730dd2ad79a314fc17d013322768fa8e
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-05-31 16:45:40 +01:00
Hervé Beraud 3020abdfb8 Use TOX_CONSTRAINTS_FILE
UPPER_CONSTRAINTS_FILE is old name and deprecated
This allows to use upper-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.

[1] https://review.opendev.org/#/c/722814/
[2] https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file

Change-Id: I1e1e39f39c6b0bb957d48d0f9a6cf7753a8d1258
2020-11-04 10:54:32 +01:00
Hervé Beraud ff156664e6 Adding pre-commit
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>
2020-09-15 14:46:10 +02:00
Andreas Jaeger 6e74d8b418 Enable parallel building
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
2020-05-16 12:26:53 +02:00
Andreas Jaeger cd956ce134 Update hacking for Python3
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
2020-03-30 12:01:30 +00:00
Andreas Jaeger 1fe4f02915 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Remove cruft from setup.cfg.

Change-Id: Ic719c1f15120b68de97f0e20702b03baeb02f5e9
2020-02-05 19:42:12 +01:00
Akihiro Motoki 3e97737e5a Fetch generated PDF files correctly
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
2019-09-18 09:51:07 +09:00
Andreas Jaeger 2d76fd9cff Update for OpenDev change
Use the new OpenDev URLs everywhere, follow move of repositories.

Change-Id: I3dd8c6deff91c4cc3b8958977e73f371bdeb82a0
2019-04-21 14:27:39 +00:00
Sean McGinnis 4e53cdb5aa
Remove setup.py check from pep8 job
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>
2018-10-30 10:37:58 -05:00
Dean Troyer 4ed01cd69c Make a bare-bones starlingxdocs theme
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>
2018-10-16 11:23:23 -05:00
Dean Troyer b0166265a8 Add starlingxdocs theme support
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>
2018-10-05 06:32:51 +00:00
Andreas Jaeger 8dd6535d4c Fix build jobs
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
2018-08-18 15:46:15 +02:00
Andreas Jaeger beef54c139 Use sphinx-build everywhere
Using 'python setup.py build_sphinx' is deprecated, use sphinx-build
everywhere in tox.ini.

Change-Id: Ia1ce85ff2ee75718c79c84d58b496348d5327b7f
2018-08-18 11:43:16 +02:00
Nguyen Hung Phuong 4fb78b7ead fix tox python3 overrides
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
2018-07-09 13:36:30 +07:00
Andreas Jaeger 31868c9120 Check RST as part of linting
Check our RST files so that uploading to PyPI works fine with a linter
check.

Change-Id: Id35de317908918d890f152d62221997b484ba4a8
2018-06-06 16:12:43 +02:00
Ian Y. Choi 70fb84d71e Adds -p option in mkdir for buildpdf tox env
This commit is intended not to see the following error message.
- /bin/mkdir: cannot create directory ‘publish-docs’: File exists

Change-Id: I824a68ff46f0bb2a520644ed455d45e19b19a2bf
2017-12-07 06:55:35 +00:00
Andreas Jaeger a58d778b7a Remove -U from pip install
'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
2017-12-02 19:30:49 +01:00
Andreas Jaeger 95aa5e0dc5 Avoid tox_install.sh for constraints support
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
2017-11-30 22:00:06 +01:00
Thomas Bechtold 8454efe607 Break cycle dependency with os-api-ref
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
2017-08-05 08:58:33 +02:00
Jenkins 725ec60d9c Merge "Enable some off-by-default checks" 2017-06-30 18:59:11 +00:00
Anne Gentle d6e6f20277 Change name of checkbuild testenv to buildpdf for clarity
Change-Id: I7c4b7b814a1e409d5333d4bd2a288f02dc28bb72
2017-06-29 20:22:22 +00:00
Anne Gentle 6c906c06d1 Working on integrating options from oslosphinx theme
- 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
2017-06-26 13:47:17 -05:00
blue55 6d816a90e3 Enable some off-by-default checks
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
2017-06-22 10:04:23 +08:00
Jenkins 29c8765bfe Merge "Add tox env for PDF building" 2017-03-13 06:01:21 +00:00
Ian Y. Choi adaf0b1132 PDF support for sample document with font
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>
2017-03-10 06:25:55 +00:00
Andreas Jaeger f9e4bfed1f Add tox env for PDF building
This is needed for change Ib2ca58105bfd1aad9508650e867a7e06892be719 to
test and upload to docs-draft PDF files.

Change-Id: I3b58c7535d9a16e87c4b71958f748df208bf01f0
2017-03-10 07:21:54 +01:00
Tony Breeds edec81e740 Add Constraints support
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
2016-12-21 12:01:20 +11:00
Jenkins 4370a362aa Merge "Fix tox setup" 2016-09-02 17:15:54 +00:00
Andreas Jaeger c72b624966 Fix tox setup
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
2016-09-02 15:33:05 +02:00
Andreas Jaeger d7fe40bd18 Install required packages
Document what is needed for testing and building  -and use this in
our CI.

This uses a bindep.txt file.

Change-Id: Ia5e9ea90e2fcb02d44c74c96a4bfe957b649a856
2016-09-01 20:56:42 +02:00
Karen Bradshaw 47149987c1 API References dropdown menu
- 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
2016-08-22 10:27:45 -05:00
Andreas Jaeger 681b186bed Use pep8 instead of linters
According to the PTI (=Python Test Interface,
http://governance.openstack.org/reference/cti/python_cti.html), pep8
is the interface for codestyle checks. Move all tests from linters to
pep8.

Change-Id: I9b53b091f69290e3bda43ee1d50122c39b054e1b
2016-02-11 17:17:16 +01:00
Andreas Jaeger de9834dff4 Rename pep8 to linters test
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
2016-01-20 21:38:29 +01:00
Ondřej Nový de938fd2ed Deprecated tox -downloadcache option removed
Caching is enabled by default from pip version 6.0

More info:
https://testrun.org/tox/latest/config.html#confval-downloadcache=path
https://pip.pypa.io/en/stable/reference/pip_install/#caching

Change-Id: Ic89af2a7dd05629a00a9dd4857866f6028afc9d5
2015-12-11 21:22:45 +01:00
Andreas Jaeger f5237c5f03 Add -W to sphinx invocation for release-notes build
Let's not ignore warnings.

Change-Id: Ie4793bb7c37d7f2d731cc1c15aacfb6ff762252c
2015-11-25 19:48:17 +01:00
Andreas Jaeger 7ab7dbe186 Add reno for release-notes
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
2015-11-10 08:37:48 +01:00
Doug Hellmann 61d080d52f Update flake8 commands 2015-01-28 16:21:43 -05:00
Anne Gentle 5150996122 Adds rearranged files for rename to openstackdocstheme 2015-01-28 13:56:35 -06:00