Commit Graph

25 Commits

Author SHA1 Message Date
Takashi Natsume c734b8c1fb Make 'Feature Liaison' optional in test
The 'Feature Liaison' subsection has been optional
since I3769eb16fe396404113eba75a64d86e6b3d86f81.

Make the subsection optional as well in a test
( tests/test_titles.py ).

Change-Id: Ie47ba2e9c77ec849992308a97d39590ffd618afc
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
2020-10-05 12:22:39 +00:00
Andreas Jaeger 5f8e26055d 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: I784baf9df85d2be34a8d0a024d439f34faa32e07
2020-03-31 06:50:38 +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
Stephen Finucane 35f2005c2c trivial: Resolve Python 3 issues
Resolve the following exception:

  AttributeError: 'str' object has no attribute 'decode'

This wasn't caught in the gate because that still uses Python 2.7. This
is not the case in other environments (Fedora 27).

Change-Id: I6b462f19432c4cf9948cddcc095d9d5a85feeb4b
2018-02-01 17:06:38 +00:00
Takashi NATSUME 44334e7114 Set the 'Upgrade impact' subsection as optional
The 'Upgrade impact' subsection has been added in the spec template
in I1798f2bdb246af9b9b12dbe9276d0a68a82e4c88.

But 'py27' test fails since it is merged
because the 'Upgrade impact' subsection is required
in existing queens and backlog specs.

So set the 'Upgrade impact' subsection as optional
in queens and backlog specs.

Change-Id: I8c69369a421454f30675a9ad9da8b9c51a2e7baa
Closes-Bug: #1727602
2017-11-16 18:57:34 +00:00
Sean Dague 4ed51d077e do not allow specs with zwsp characters
For some reason a number of specs (and docs) have zwsp characters
inserted in URLs. This causes crud in the reviews, and really
confusing errors around line lengths for people (we count them, but
they aren't seen in their editor).

This removes them and makes a test to make sure they never come back.

Change-Id: Ib6e94725e2716dbb2ff86f272fbe4a6987714444
2016-06-02 06:46:54 -04:00
Nikola Dipanov eafd8a25c5 tests: Allow for code block lines to be longer
Currently tests would fail if code block lines are longer than 79
characters, which is too restrictive as code blocks can contain
JSON or shell (or any other) code which should not be artificially
wrapped against it's natural formatting.

Change-Id: Iaf81d310f9406a23539efc3a3e2f25034ae39fa8
2015-10-20 10:47:53 +01:00
Alexis Lee 6469ac9258 Allow long unbreakable strings
We already allow HTTP URLs to ignore the linebreak limit. There are
other reasons to need tokens longer than 80 characters, such as internal
reference names. Allow any length of token so long as it is the only
token on the line.

Change-Id: Iee3e90a5d22d1c4b1180a3f3028b2d4c29cd3377
2015-07-13 17:03:45 +01:00
Andrew Laski b4d6cec637 Fix pep8 violations in tests
Some minor updates to the testing file so that it would pass a pep8
checker.  Also adds a pep8 tox target to test them :)

Change-Id: I5c704a1b5a1b5f8b6d80a8f538b56befbe656099
2015-05-11 11:57:08 -04:00
Jenkins f755680428 Merge "Improve a bit nova-spec tests" 2015-04-22 21:23:02 +00:00
Sahid Orentino Ferdjaoui 7d73b2d095 process: add new section History
History are used to make easy users to follow the
evolution of the spec.

The spec can differ with the time, and the design can be updated
it should be important for users who use the spec has a documentation
to see those changes without to use a third tool.

The initial proposal is to add an entry for each update provided to
the spec (even fixing a typo) but we can restrain it only for changes
in the design or new contributor refered...

Change-Id: I13b8e09d5d7848ee4657214a86d2b48bf1b05e2a
2015-04-16 09:37:09 -07:00
Joe Gordon 445ea94655 Add test to check spec directories
When submitting specs one very common mistake is to submit it to
specs/liberty/ instead of specs/liberty/approved/. Add a new test to
make sure submitted specs are not in the wrong directory.

Test output:

MismatchError: 'foo.rst' not in
['redirects', 'implemented', 'approved']: Found unexpected file in
'specs/liberty', specs should be submitted to 'specs/liberty/approved'

Change-Id: I27a532dc0b85d712698821d77555d2aeb57e83a1
2015-03-31 14:02:47 -07:00
Boris Pavlovic 542a2a8bd1 Improve a bit nova-spec tests
* If we add new spec without some "section" now we will get clear
  assertation failure. Before it was KeyError trace

* Assert that we found at least 1 release that will be tested.
  Otherwise test is quite dangerous, because if path is specified
  wrong it will 100% pass

Change-Id: I2a1241889ef5f0b5153cc3e3f64b4083a9ac0c03
2015-03-08 02:08:23 +03:00
Michael Still f0b8204072 Re-organize juno specs
As discussed at our nova meetings, reorganize the juno specs into
three directories:

 - proposed: things proposed which weren't approved
 - approved: things we approved but didn't implement
 - implemented: things approved and implemented

The first I suspect is the most controversial. I've done this
because I worry about the case where a future developer wants to
pick up something dropped by a previous developer, but has trouble
finding previous proposed specifications on the topic. Note that
the actual proposed specs for Juno are adding in a later commit.

Change-Id: Idcf55ca37a83d7098dcb7c2971240c4e8fd23dc8
2014-10-07 07:49:59 +11:00
Joe Gordon 58b5738abd Support having different templates for different releases
We want to adjust the template for Kilo, so rename template.rst to
$release-template.rst and update the tests.

Change-Id: Ia65bc72c14f51ff7fbf54af1ef69e9f37c9d58a9
2014-09-30 11:36:16 -07:00
Alexis Lee c26ed93e16 Get expected titles from template
This change removes the data block describing which sections +
subsections must be present. Instead this information is retrieved from
the template. This means the test won't need to be updated if the
template changes.

It also means the test can be shared byte-for-byte with other projects
who have different templates, avoiding the copy+paste situation which
has emerged.

Change-Id: I4d0ea6e931876f70618912759d2de8e37b8b87c6
2014-06-16 15:52:37 +00:00
Alexis Lee f44a3c44ea Factor data out of _check_titles
The straight-line implementation style of this test method allows
inconsistencies in checking to creep in. Switch to a data-driven
approach.

This is similar to I8cd2be14f4338413854042031cf41da534c11dcb but not
identical because in Nova, extra subsections are allowed.

Change-Id: I17f08212517814c91db7fb6ba18499673dba7fad
2014-06-16 15:52:18 +00:00
Aneesh Puliyedath Udumbath 6637e00eab Trailing white space check.
Added a test that checks for trailing white spaces at the end of
every line in the spec files.

Removed trailing whitespaces from extensible-resource-tracking.rst as it
was failing the tests.

Change-Id: I758102612a1b594178b3b22a228d2116f0a079e6
2014-05-22 09:36:42 -05:00
Sean Dague 03e42f7fb3 make title check more explicit on failure
the title check used to compare for length of arrays, which meant
that if it failed it wasn't really clear why. Given that we know
the 7 titles we believe should exist (and we test for them later)
we can instead just do a direct comparison. This has the advantage
of making it much easier to figure out what they are missing in
their specification.

Change-Id: Ie913f00cfb07a153fc94c8e5b2225174da3674dd
2014-05-09 14:48:35 -04:00
Sean Dague e71dedc6b4 add test to ensure there are no \r
some of the specs are coming in with literal \r characters,
probably from being created in windows notepad. This makes reading
the specs very cumbersome. We should test against these.

Change-Id: I59ed022e882cfde00c004a66659a43134fd2df5c
2014-05-09 07:35:44 -04:00
Jenkins 4bdb90fc2b Merge "Check length of the lines to be less than 80 chars" 2014-04-30 08:50:23 +00:00
Sahid Orentino Ferdjaoui 8d92c8425a Check length of the lines to be less than 80 chars
This commit adds a test to be sure the lines of specs
are less than 80 characters.
Also updates specs that needs to pass this test.

Change-Id: Ie4c523f249d90bc2783534bf30a9f25cd3625303
2014-04-29 13:19:48 +00:00
Scott Devoid 7364e36147 Allow spec authors to add additional subsections.
Authors may find it helpful or clarifying to add additional sections
and subsections to a blueprint document. This change preserves the
requirement that blueprints contain the sections outlined in the
template, but allows authors to add additional sub-sections as they
see fit.

Change-Id: I1279a96762c71e0ff2eab242f9c4a226cee7ef0d
2014-04-25 12:30:48 -05:00
Sahid Orentino Ferdjaoui 1f7b6bdcbe Add assertion to ensure the file extension
This patch adds an assertion in the process of
checking templates to be sure a good file extension
is used.

Change-Id: I694ca05729358943c6a5d950b6ebf6f07b977fcb
2014-04-07 10:26:10 +02:00
Joe Gordon 037adec4b8 Add unit test to make sure all sections are present
Add a unit test that will check to make sure all top-level headings
and sub-headings are present.

The downside of this test is that it's going to fail on *every* merged
spec if we add or change a heading to the template.

Co-authored-by: Russell Bryant <rbryant@redhat.com>
Change-Id: I1c15282e166fb3fe2e60fcf063a6cd822a3411ff
2014-03-31 12:03:41 -04:00