Commit Graph

24 Commits

Author SHA1 Message Date
Sean Mooney 39abef0055 nova-specs should use upper-constraints
A recent release of python-subunit 1.4.3 caused
stestr to break due to an undeclared transitive dep.
this is fixed in stestr 4.1.0 but it highlighted that
nova-specs is not using uc when installing and as a result
is prone to failures that wont happen in other tox venvs.

This change simply enables the use of upper-constraints
to prevent future breakages like this.

Change-Id: Ic8a19b8426d3d91f82e907ace62f846a9d6c7282
2023-09-19 13:37:32 +00:00
melanie witt 604cc59ada Remove setup.py and setup.cfg
Theses used to be used for building docs in the past and were made
obsolete with change Icc65afd5f6c0e22147b179c16d6a4fa5f47954ce.

A recent release of setuptools 61.0.0 introduced a breaking change [1]
which caused our openstack-tox-docs and openstack-tox-pep8 jobs to fail
with:

  error: Multiple top-level packages discovered in a flat-layout:
    ['specs', 'priorities'].

This removes setup.py and setup.cfg from use in tox.ini to resolve the
issue and they are not needed anyway.

Related-Bug: #1966382

[1] https://github.com/pypa/setuptools/issues/3197

Change-Id: Ib90065a62bdef235e83173c73894c478af0df5fa
2022-03-29 20:07:31 +00:00
Takashi Natsume c769ddb9a0 Set minversion of tox to 3.18.0
The patch sets min version of tox to 3.18.0 in order to
replace whitelist_externals with allowlist_externals option:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Signed-off-by: Takashi Natsume <takanattie@gmail.com>
Change-Id: Ie2f5a84ce27007dcc9581f4d0e832d875b072eb9
2021-05-18 23:03:37 +09:00
Andreas Jaeger d6e5ad7766 Cleanup py27 support
Make a few cleanups:
- Remove python 2.7 stanza from setup.py
- Remove obsolete sections from setup.cfg
- Remove install_command from tox.ini, the default is fine

Change-Id: I693afdb7097b156935424c5549e1b22a08bf2773
2020-04-08 11:53:11 +02: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 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 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
Takashi NATSUME 5751824ca3 Fix warnings in the document generation
* Fix warnings when executing 'tox -e docs'.
* Fix consistency for expressions of REST APIs.
* Remove 'json' in some code-blocks
  because the contents include comments
  so they are not in accordance with JSON format.
* Add the '-W' option in the sphinx-build command
  for the docs target.

Change-Id: Iaaa4e2444030622539a61055e114a649466be497
2019-03-25 11:43:43 +09:00
Vu Cong Tuan a25b4367b5 Switch to stestr
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: I8f4fb6c486641a878950e39771834c37fdde7487
2018-10-24 09:14:41 +07:00
Tuan Do Anh 32c17807ac 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 of that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: I5aea94cce51f71d98135ef94bab7445de59fa3a5
2018-07-16 07:47:34 +00:00
Nguyen Hai 36739ca41b Follow the new PTI for document build
REF:
https://governance.openstack.org/tc/reference/project-testing-interface.html
http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html
http://lists.openstack.org/pipermail/openstack-dev/2018-March/128594.html

Change-Id: Icc65afd5f6c0e22147b179c16d6a4fa5f47954ce
2018-05-31 06:24:42 +00:00
Kashyap Chamarthy a38068c3ce tox.ini: remove the stale 'minversion = 1.4'
This isn't needed anymore.

Change-Id: Ib6a8470fff06b95bb82c262212c671b5ee5d07a5
2018-03-27 20:12:02 +00:00
Matt Riedemann a225306042 Remove the py27 tox target
With the move to zuulv3, the openstack-tox-py27 job definition
ignores changes to docs and .rst files, which is basically
all of nova-specs, so we aren't getting our spec linters run
as part of the py27 target anymore.

This moves them into the pep8 target where they should probably
live as linter tests anyway.

Change-Id: Ic87e79db6a8881398d670148b609e0b81658dfd1
2017-11-16 19:03:30 +00:00
Stephen Finucane d1e06027bc tox: Build docs with Python 2.7
On systems that use Python 3 as default, the 'docs' target fails due to
a non-Python 3 dependency (feedformatter, required by yasfb). It's not
even clear if yasbf is still relevant, given the uselessness of the
content published online [1]. However, it's easier to just build the
docs with Python 2 than go on a wild goose chase looking for more info.

[1] http://specs.openstack.org/openstack/nova-specs/rss.xml

Change-Id: I129f635bc2d060f9da9bfc8b43652be7c10e9200
2017-03-20 10:05:41 +00: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
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
Sean Dague 2b2a322e1c remove stale pyc before tests
Stale pyc files can create massive confusion on failing
tests. Extremely hard to debug. Remove all pyc files before we run
tests.

Change-Id: I67da587382af87389c2d04c23d84f13f341a1e46
Related-Bug: #1401600
2015-03-31 13:39:23 +00:00
Daniel P. Berrange 6b9b856e40 Relax min tox from 1.6 to 1.4
Fedora 20 only ships with tox 1.4.2 and this appears to work
without trouble. So relax min tox from 1.6 to 1.4 on the basis
that there's no immediately obvious need for the 1.6.x series.

Change-Id: I673936fa5ca56f7c9641a90d89f43fc72eb16c19
2014-06-03 15:04:29 +01: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
Russell Bryant 775d69037b Allow running 'tox' with no arguments
Change-Id: I3137ce5ae5631bf5bcf0455a17828369dea6b9fd
2014-03-31 12:01:34 -04:00
Russell Bryant 894723022e Disable site-packages for tox
Change-Id: Ic5cb48951b1031a682adf2c37ee8fdc8615c505d
2014-03-31 11:39:55 -04:00
Joe Gordon 5354a0e971 Use -edocs instead of build_specs
Align our venv name with other OpenStack projects (such as keystone and
heat) who are using 'docs' for there docs build.

Change-Id: I20ff3c1df99fb50fbe16361024a44b04c03f0a67
2014-03-27 16:10:01 -07:00
Russell Bryant 7e2f8f8e92 Make nova-specs an oslosphinx project
Update the nova-specs project to use sphinx.  This will allow us to
still write our specs using rst, but also have a nice framework for
rendering and publishing the specs if we choose to.

Change-Id: Ib92231acb28bba44abafb7dd554404f542da13a7
2014-03-24 16:28:41 -04:00