Commit Graph

11 Commits

Author SHA1 Message Date
melanie witt 3c64c66238 Make 'tox -e fast-specs' fail on sphinx warnings
I'm not sure if others will want this but when I made an edit on my
spec and ran 'tox -e fast-specs', my expectation was that it was a fast
way to check whether the edits I made would pass openstack-tox-docs in
the gate. This turned out not to be the case, 'tox -e fast-specs'
showed the "fast-specs: commands succeeded" message but when I uploaded
the change, the openstack-tox-docs job failed because there was a
sphinx parsing error in my spec.

This adds -W to the sphinx-build call to treat warnings as errors to
match 'tox -e docs' and openstack-tox-docs. It also runs sphinx-build
via exec to make the script fail if sphinx-build returns non-zero.

Change-Id: I9de750e7f44a746d4466c522004d0c2a624052e2
2022-03-31 04:45:53 +00:00
Hervé Beraud 9bda5fe3d1 Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: Id6d2c26202c5b9fe8c807c0c446ad18faf969abc
2020-06-02 20:31:41 +02:00
Eric Fried 4990806a8d tox -e fast-specs
Add a utility, tools/fast-specs.sh, and a corresponding tox target,
fast-specs, to build only spec files changed since the last commit. This
is way faster than building all the specs with tox -e docs, and saves
you having to know several quirks of sphinx-build to do it yourself.

Change-Id: I32223c10cd86379b4d5c337e31d36f5d7820459e
2019-08-19 11:37:18 -05:00
Eric Fried a2206aeb5b Delete approved template in move_implemented_specs
The move_implemented_specs tool was cleverly removing the
implemented/<release>-template.rst link so it didn't clutter up the
TOC. This patch whacks the approved/<release>-template.rst link as well.

Change-Id: Icf75ce9d27a6ca5cdfcc147698d79669bbfbdba8
2019-04-23 16:05:14 +00:00
Eric Fried f1f7a9a154 Tools & docs for backlog & abandoned spec process
Adds tooling and enhances README documentation around the backlog specs
process.

- To move a spec from the backlog to the current release, we can now use
  the ``move-spec`` tox target, e.g.

 tox -e move-spec -- [-n] [-v] specs/backlog/approved/great-idea.rst specs/train/approved

- To abandon a backlog spec - i.e. move it from specs/backlog/approved
  to the (new) specs/abandoned directory, we can now use the
  ``abandon-spec`` tox target, e.g.

 tox -e abandon-spec -- [-n] [-v] specs/backlog/it-was-a-great-idea.rst

These utilities will move the specified spec into the target directory
and create an appropriate redirect for it.

To make it so, this commit factors out a helper method that a) moves a
spec from one subdirectory to another and b) adds a redirect for it.
This is used by the existing ``move-implemented-specs`` utility as well
as the new ``move-spec`` and ``abandon-spec``.

While I was in here, I spruced up the verbose output (including for
move-implemented-specs) to be a bit more readable.

Change-Id: I322eecbacd5dc52accf6ac69c9fe1116be8c216f
2019-04-09 15:23:16 +00:00
melanie witt fc008c4965 Add a script for counting blueprints
This is useful for recording data during the cycle to use to create
a burndown chart for blueprints. The script counts: Targeted,
Approved, and Implemented blueprints. It also checks if there are any
approved specs whose corresponding blueprints need approval and emits
warnings for each one found.

Since this shares some code with the existing move_implemented_specs
script, the common code is factored out into an importable lib.py
module.

This also adds a tox target for running the script and makes it share
the same envdir as the move-implemented-specs target since both need
the same dependency of launchpadlib.

Change-Id: I9a9d3f7f2883a6eb151230da651d9a4c4fda77b4
2019-04-01 09:55:16 -05:00
melanie witt c0112f7166 Dynamically find releases for move-implemented-specs
This adds a shallow directory walk to find the available releases for
moving implemented specs, so we don't have to update the script per
release to add a release choice.

Change-Id: I80ea14f07da9361b26645d997de0fcbe4ba19afc
2018-10-02 18:48:11 +00:00
Stephen Finucane f164026b64 Re-add templates
In commit a67d39ba, we removed templates from both the approved and
implemented folders of 'specs/{release}'. However, git tracks files, not
folders, meaning the 'implemented' folders for both Ocata and Pike,
which are currently empty, are no longer tracked and the glob patterns
used in 'doc/source/specs/{release}/index.rst cause warnings.

These templates are re-added to fix the immediate issue. However, we
still don't want to keep these around once the release has been made. As
such, we add an addition step to the tool for migrating implemented
specs to remove these templates. This should automate the process in the
future.

Change-Id: Iaae10e180845b5073e1e13a4df1050b8b98d03d7
2017-03-20 10:05:41 +00:00
Matt Riedemann 91029061a3 Move implemented specs for Ocata
This moves the specs that were completed in Ocata
from the 'approved' directory to the 'implemented'
directory and updates the redirects file.

This also fixes a bug in the move-implemented-specs
script such that we filter out completed blueprints
which are not implemented, which was the case with
blueprint cold-migration-with-target-ocata which was
superseded.

Change-Id: I476e2e2d4bb089d901b887ce7728fc29c35a0957
2017-03-07 18:10:52 -05:00
Matt Riedemann 135497b713 Fix paths when moving specs
Needed to use os.path.join to concatenate the paths
when moving the specs from approved to implemented.

Change-Id: Icf39ce8619dcec88d2d69bcbf55ea3888eb3b7a5
2017-03-07 18:07:47 -05:00
Matt Riedemann 1c1890539e Add a script to move completed specs to implemented directory
This adds a script and tox target to automatically process and
move approved specs for a given release into the related implemented
directory for the same release. It uses launchpadlib to check the
status on the spec (blueprint) and only moves those that are
complete.

For example, to run this:

tox -r -e move-implemented-specs -- -n -v newton

Change-Id: Ib431f62101b90abecce86f60ba7acbba11e09533
2016-09-20 13:42:48 -04:00