Commit Graph

607 Commits

Author SHA1 Message Date
Sean Mooney
f34b94a1b9 fix support for py39
Ica6524895e38e1e54ae3207a1e58a97f53481a12
addressed Sphinx 8.x warnings related to
representing paths as strings

on python 3.9 we clamp sphinx to <8 because
8.0.0 bumps the min python to 3.10
this change bumps the sphinx version check from >= 7.0
to >=8.0 to aling it with the versions we use on py3.9

Change-Id: I62784d7ea2a7c3bee4727bc4bc05d22699f7bbc7
2024-11-07 21:48:55 +00:00
Stephen Finucane
052ed8e119 Bump minimum Sphinx version
This is a little more realistic. Sphinx 6.0.0 was released in December
2022 [1]. In the absence of a lower-constraints job, I manually tested
that our own docs still build with this version.

[1] https://pypi.org/project/Sphinx/6.0.0/

Change-Id: I62dcc47b7053deb46139ca1f46c0d8e6fc2720d6
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-08-29 14:31:09 +00:00
Stephen Finucane
f00d211328 Resolve Sphinx 8.x warnings
Resolve the following warning:

  RemovedInSphinx90Warning: Sphinx 9 will drop support for representing
  paths as strings. Use "pathlib.Path" or "os.fspath" instead.

Change-Id: Ica6524895e38e1e54ae3207a1e58a97f53481a12
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-08-29 14:31:05 +00:00
Stephen Finucane
fe883a4de1 Make Sphinx a required dependency
We can't run without it.

Change-Id: If64af9f71117a16f174506ff3a0683219de16154
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-08-29 14:31:01 +00:00
Stephen Finucane
e7c48a5584 setup: Update Python classifiers
Change-Id: Ie4a79676ec57f2366dbcb1502bde443bf18ca387
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-08-29 14:30:56 +00:00
Stephen Finucane
2f49a663e6 pre-commit: Add ruff, ruff-format
Change-Id: Ic4e860a2517adecda8d15802bb2015c805869fa7
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-08-29 14:30:52 +00:00
Stephen Finucane
9baeee486a pre-commit: Bump dependencies
We migrate 'hacking' from a local plugin to hacking's native plugin,
which has been around for some time now. We also stop setting the
default Python version: everything is Python 3 nowadays.

Change-Id: I50d2f0c9ac5808c2c91ecae978c80212ea9e6859
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-08-29 14:30:43 +00:00
Zuul
85847394e7 Merge "Don't offer to show unmaintained versions" 2024-04-18 13:54:57 +00:00
Zuul
1fb72a1675 Merge "Fix series selection and sorting" 2024-04-18 13:54:56 +00:00
Takashi Kajinami
9145986dfd Replace deprecated perl-style regex
Zuul deprecated usage of perl-style regex.

```
  All regular expressions must conform to RE2 syntax, but an
  expression using the deprecated Perl-style syntax has been detected.
  Adjust the configuration to conform to RE2 syntax.
```

Change-Id: Id6b8fbf145b7e933ce2e82cebbe3d6c9531943b6
2024-04-16 12:19:22 +00:00
Dr. Jens Harbott
d0a1d47a55 Don't offer to show unmaintained versions
Versions older than Zed are now either Unmaintained or EOL. In order to
avoid readers selecting those versions by mistake, bump the default
value for earliest_published_series from mitake to zed. Documentation
for older versions is still published and accessible via direct links.

Projects that want their readers to still access older documentation via
the version selector can do so by overriding the
earliest_published_series value in their docs config.

Change-Id: I5a0cfcdc787f7fcf814526de761ea54479ab30db
2024-04-05 14:40:06 +02:00
Dr. Jens Harbott
5b20fd8baf Fix series selection and sorting
Currently series names like 2023.1 and later appear at the end of the
version selector, but they are the most recent releases and thus should
be sorted to appear at the beginning.

Also make sure that a series doesn't appear twice in the list, which can
currently happen if e.g. the stable/victoria and unmaintained/victoria
branches exist at the same time during the transition.

Change-Id: Ide82c6de41081b9adcea632e41a581db5bc340c4
2024-04-05 14:40:06 +02:00
Zuul
860e6fa0ca Merge "Updated nav links/texts" 2024-02-20 09:51:00 +00:00
Maksim Malchuk
73bb94525d Fix lack of the Yoga version in dropdown list
Since stable/yoga renamed to unmaintained/yoga the version is not
shown in the dropdown list of the available versions on the
https://docs.openstack.org in almost all projects. This change fixes
the issue.

Change-Id: I4f5f1bec04be3152c0f23ac17e450a1fd6fe91d4
Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
2024-02-11 22:27:18 +03:00
Stephen Finucane
ff0be4578e zuul: Add tips job
Change-Id: I302f468c6f7f18daf1c8d30577642c32e1a77823
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Depends-on: https://review.opendev.org/c/openstack/project-config/+/891679
2023-08-17 11:34:30 +01:00
Stephen Finucane
7e4e2b0c85 Sphinx 7.2.0 updates
Environment.srcdir is now a pathlib.Path object rather than string [1].

[1] https://github.com/sphinx-doc/sphinx/commit/49d8304670

Change-Id: Ifd26e2dd2fa36bbc9b0335db08e698db638de26d
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-08-17 11:26:44 +01:00
Zuul
f626d829dd Merge "Fix stylesheet setting in theme.conf files" 2023-08-09 18:12:34 +00:00
Dmitry Shachnev
9931511d9c Fix stylesheet setting in theme.conf files
The intention here was probably to include basic.css from Sphinx'
basic theme, but the correct way to reference it is just "basic.css".
This is what sphinx/themes/basic/theme.conf in Sphinx itself does.

Using "css/basic.css" caused the file to be not copied, and the
reference was 404.

Change-Id: Ifd6a78cb2dce42027f404829e1865fdb90acdb4f
2023-08-05 21:11:46 +03:00
Dmitry Shachnev
03e2c9b45e Stop including Sphinx' standard JS files in script_footer.html
Now that we inherit from basic/layout.html, these files are included
automatically in scripts block, so no need to repeat them in footer.

Also, underscore.js is not shipped anymore in Sphinx ≥ 6, so including
it caused a broken reference.

Change-Id: If0ffae7ced13d68380570a7eee949ac6e06c1743
2023-08-05 21:08:42 +03:00
Stephen Finucane
b301ee75bf Remove 'type' attribute of <script> element
This is obsolete.

Change-Id: I9fd6771f11297f35a868be00e0abedf449cc4aa2
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-05-10 12:22:34 +01:00
Stephen Finucane
88b610f002 Remove invalid attributes
The 'href' attribute is not valid for a <button> element, while the
'aria-labelledby' attribute must point to a valid element. It does not.

While we're here, we also fix indentation.

Change-Id: I3e15062b0f0306fbdc2ef82376a07e2b6943aeda
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-05-10 12:19:00 +01:00
Stephen Finucane
7a6d3e8ebc Remove errant character
Erroneously introduced in commit 403c9bca.

Change-Id: I3bb4bf55c4a4f7d220e2d09cdaee146fac5a9da5
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-05-10 12:14:45 +01:00
Stephen Finucane
65fb860eee Remove nested 'li'
A <li> HTML element "must be contained in a parent element: an ordered
list (<ol>), an unordered list (<ul>), or a menu (<menu>)." [1]

[1] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li

Change-Id: I9920b63d7dda2051ecfd4865cab4187533f70c07
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-05-10 12:13:10 +01:00
Stephen Finucane
9bfd0a43ba Replace ampersand with HTML characters
This is currently invalid HTML.

Change-Id: I5120549758f4e5cd619a0cf8f461996ede3a724d
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-05-09 16:12:00 +01:00
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
Jeremy Stanley
11ae49c4fa Update included page footers to use current URLs
The footers haven't been refreshed in a while. Preferred links for
some things have changed, particularly since the foundation's
rename. Some of the old links in here have stopped working entirely.
Brush up everything to be more consistent with what's on the
foundation-maintained www.openstack.org site.

Change-Id: Iadc7642adb5d7e614ac022bd370bf46386a595e0
2022-09-12 13:21:22 +00:00
Zuul
dd04d50dcb Merge "Fix broken link for Marketplace in header" 2022-06-03 10:04:35 +00:00
Hervé Beraud
84049acec2 Drop python3.6/3.7 support in testing runtime
In Zed cycle testing runtime, we are targetting to drop the
python 3.6/3.7 support, project started adding python 3.8 as minimum,
example nova:
- 56b5aed08c/setup.cfg (L13)

Also indicates that we support python 3.9.

Change-Id: I55076ba0d27c5725e7bfe1db94758098598133d6
2022-05-05 16:19:19 +02:00
Peter Matulis
5f71db161b Fix broken link for Marketplace in header
The top level MARKETPLACE link in many projects is broken.
It currently shows as: https://www.openstack.orgmarketplace/
This PR adds the missing forward slash.

Change-Id: I9da6ecf8c18546a9314b62b49058399f63de343a
2022-04-22 11:23:25 -04:00
smarcet
91e4870557 Updated nav links/texts
changed links/texts to avoid sending people to the old Summit site

Signed-off-by: smarcet <smarcet@gmail.com>
Change-Id: I4fd61417093a1e452fbe3baf50d523e430e81142
2022-04-11 14:48:56 -03:00
Michael Johnson
b270f4aef0 Fix OpenStack project "Search" pages
The OpenStack project documentations pages that implement the "Search"
capability (:ref: 'search') are not working after the recent update to
sphinx 3.4.x. The search will never end and the browser will report a
Uncaught ReferenceError: Stemmer is not defined error.
This patch updates the openstackdocstheme to fix the search capability
by including the language_data.js that now provides the "Stemmer" function.

Closes-Bug: #1957717
Change-Id: If54b3b253ed7585f6f8b20f1e0f945101ef283a3
2022-01-13 00:51:31 +00:00
Zuul
b11504f3e7 Merge "Updated Nav Menu" 2022-01-04 16:47:07 +00:00
Artem Goncharov
4c6d655316 Page header fix with Sphinx4
Previous commits addrressed some of the changes of Sphinx4 producting
different structure. The same is valid for the page heading where
instead of `<div class="section">` it produces `<section>`. This leads
to the css fix not to be appled and as such page heading present 2
times. Copy previous css fix with new path.

Change-Id: Ia9ab413280c2f98d041e0f5ae5c1df22c5a4a3f5
2021-06-30 15:43:40 +02:00
Stephen Finucane
08461c5311 Inherit from base "basic" template
Sphinx 4.x changed how it includes some JavaScript files. Instead of
including them via the template, they are now injected using the
'add_js_file' function [1]. This relies on a custom Jinja2 function,
'js_tag' to generate the correct element with necessary attributes set.
Failure to use this results in missing attributes for some tags.

Rather than simply reworking our template to use this new function,
change how we use our 'layout.html' to instead override the 'basic'
template that Sphinx provides. This means we should get these kinds of
changes "for free" in the future, rather than having to worry about
them.

[1] https://github.com/sphinx-doc/sphinx/commit/a957d6f710

Change-Id: Idc0e6c1d38407fdadc29ea710069e74243c5c89a
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-05-31 16:45:40 +01:00
Stephen Finucane
9602f39783 sphinx 4.0: Handle HTML 5 changes
Sphinx 4.0 includes a newer version of docutils, which makes some
changes to the HTML 5 writer. Among these is the change in HTML
generated for the 'ObjectDescription' directive, which is used to
generate definition-list style output for things like oslo.config.
Previously, the title of each entry would be styled like so:

  <dt id="DEFAULT.internal_service_availability_zone">
    <code class="sig-name descname">
      <span class="pre">internal_service_availability_zone</span>
    </code>
  </dt>

Now the improper use of the 'code' element is dropped, in favour of a
'span', like so:

  <dt class="sig sig-object oslo.config" id="DEFAULT.internal_service_availability_zone">
    <span class="sig-name descname">
      <span class="pre">internal_service_availability_zone</span>
    </span>
    ...
  </dt>

Change-Id: I9fb9fbce6299600c3085bea1b8f17ad796bec4f8
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-05-31 16:45:40 +01:00
Stephen Finucane
6cfaeb438e sphinx 4.0: Fix sphinx.ext.extlinks.make_link_role call
Commit 93cf1a57d [1] added a new parameter, 'name', to this function.
Include that when we detect Sphinx 4.x in use.

[1] https://github.com/sphinx-doc/sphinx/commit/93cf1a57d

Change-Id: I3b05df39f701280052d8a0d4f261e8749669ca11
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-05-31 16:45:40 +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
Stephen Finucane
0b012dc62c trivial: Fix indentation
Use 2 spaces consistently.

Change-Id: I4905cf1838d2a878c0663fca55061e6668302ca9
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-05-31 15:20:01 +01:00
Andreas Jaeger
765f2cab59 Change to OFTC
The "Report a bug" section mentioned Freenode, use OFTC now.

Change-Id: Id097f1f2d7fa921228306eef9ba10177e712230a
2021-05-26 19:19:23 +02:00
YuehuiLei
2a569b84f0 setup.cfg: Replace dashes with underscores
Setuptools v54.1.0 introduces a warning that the use of dash-separated
options in 'setup.cfg' will not be supported in a future version [1].
Get ahead of the issue by replacing the dashes with underscores. Without
this, we see 'UserWarning' messages like the following on new enough
versions of setuptools:

  UserWarning: Usage of dash-separated 'description-file' will not be
  supported in future versions. Please use the underscore name
  'description_file' instead

[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb

Change-Id: I37ca13f2f2f0f5a063e64d389a30f3b61e6c25f0
2021-05-05 10:07:56 +08:00
Daniel Bengtsson
f0da3d3345 Move flake8 as a pre-commit local target.
The goal here is to avoid conflicts between flake8 and hacking version each
2 days.

Inspired from nova's approach[1].

The flake8 version to install will be determined by hacking and
requirements[2] will stay aligned instead of relying on different versions.

[1] https://opendev.org/openstack/nova/src/branch/master/.pre-commit-config.yaml#L26-L35
[2] https://opendev.org/openstack/hacking/src/branch/master/requirements.txt#L1

Change-Id: Idb4a784a1a1296168ffd024a424dbbc9f4b9c123
2021-03-23 13:14:42 +01:00
smarcet
3547151908 Updated Nav Menu
Updated Nav Menu to match https://www.openstack.org/ nav Menu

Signed-off-by: smarcet <smarcet@gmail.com>
Change-Id: Ib4e13a7964d548ed6bd9da683c4b755188ae7d6a
2021-01-06 10:54:27 -03:00
Zuul
a1156110c9 Merge "Use TOX_CONSTRAINTS_FILE" 2020-12-03 14:48:27 +00: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
Stone
c7f7eec234 Added styling for rST rubric directive.
StarlingX is using the rST rubric directive to style headings such as
'Prerequisites', 'Procedure', and 'Results' in tasks without having them
appear in the TOC. There is currently no support for rubrics in the
StarlingX theme. This file appears to be the correct place to add it.
Testing to see if merge is picked up by StarlingX tox builds.

Change-Id: Ia339ad02522891c2b0b593dc782b67220565b87f
Signed-off-by: Stone <ronald.stone@windriver.com>
2020-10-29 13:35:33 -04:00
Zuul
369e8f99f5 Merge "trivial: Address some indentation nits" 2020-10-22 14:21:49 +00:00
Zuul
a293b1ba50 Merge "js: Don't attempt to set bug, PDF links without configuration" 2020-10-22 14:19:35 +00:00
Zuul
1fb18cc99b Merge "Store empty string for release" 2020-10-22 14:18:24 +00:00
Zuul
080839551e Merge "js: Set 'LINK_SUFFIX'" 2020-10-22 14:16:44 +00:00
Andreas Jaeger
d3cdb8689b Change name of OpenStack Foundation
OpenStack Foundation got renamed to Open Infrastructure Foundation,
follow the rename and update links as well.

Remove no longer working links.

Change-Id: Iee3bb16fb6554ad80a3263f4f364976bcb8c88e1
2020-10-22 09:51:36 +02:00