We want to default all jobs to use python 3 except for
the ones that use explicit versions. Unfortunately, the
current tox behavior for setting basepython to python3
is not intuitive.
If the system default is python 3.5, then when basepython
is set to python3, both the py35 and py36 targets will
end up running with python 3.5.
To get around this we need to not set a default base
version and explicitly set each testenv to python3 that
we want to run using 3 instead of 2 but do not really
care which minor version is used.
Change-Id: I3971eeafbd1e732a584b0c52d2eb6c2175b709aa
This switches the pylint target to run under python3. In
order to work right, it also raises the version of pylint
used to a newer version.
Related-bug: #1761800
Change-Id: I0bc68a5aee24a53b9d3a08c20549b89d08989678
The long term goal for OpenStack is to support python3 for
all things except explicit python2 testing by the T release.
Part of preparing for that is ensuring all ancillary things
like docs jobs and other tooling work with python3.
This switches the default for our docs jobs to python3 so
anything that does not specify another version will end up
using it.
Further work is necessary for the pylint job due to changes
between the runtimes. That will be done in a follow up patch.
There was also a difference in behavior with the genopts job
where it ends up trying to recreate the venv under which it
is currently running under, resulting in a corrupted venv
and a failure. This cleans up that script and changes it so
rather than a tox job calling a tox job it just runs the
script.
Change-Id: Ie79528b33070e6c60f9f5e1f2219084a2f0cb039
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.
Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.
Add openstack-tox-lower-constraints job to the zuul configuration.
See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.
Change-Id: I329e6364d537f2acac796e389f15f3c7162a9244
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
There are slight differences with pep8 when run under python 3.
It is a little more strict on certain things, plus we want to
get to just supporting python 3 eventually, so this switches
over the pep8 and fast8 targets to use python 3.
Change-Id: I3212bfb2dd173e79dae6d548827a803f68923da9
Now that sphinxcontrib.apidoc is available, we should get rid of
the custom code we have for generating this information ourselves.
This also cleans up some really stale docs that are no longer
needed.
Change-Id: Iaa9fecc2478326b45b67a2cfd98de5f93f537efe
This fixes some formatting issues in docstrings to allow us
to enable the warnings-as-errors flag for our docs build.
Co-authored by: Jay S. Bryant <jungleboyj@electronicjungle.net>
Change-Id: I9567e232686d8775ff67418e8333c164f8acd8f3
If you launch py35 and py27 envs from the same
directory simultaneously, the find -delete commands
here will race against each other and cause a
failure.
Set the find option to ignore readdir races.
Change-Id: I4977ad687150b5a1d6f09a961fca4db5d768ef71
For "tox -e docs", run doc8 first.
doc8 runs much faster than sphinx builds and
will provide quick feedback on syntax issues.
Change-Id: Id4f77020a70acd8eb9df513d43f86d9fe78f7e22
With the switch to stestr we lost the automatic output of the slowest
tests. We can still get that output, but it is a separate command to
run after the tests. Add that to our tox.ini command for test execution.
Change-Id: I37937c1ebe4a10b896f1deb77f64b520ceba2830
Clear doc/build directory before running docs job may better guarantee
each building output the newest docs.
Change-Id: I17537742a4c1421f2bd0561d2c48c5ae56d89026
This patch adds documentation and sample
file for default policy in code feature.
Change-Id: I597971a29ec61a1bf8c991b2715ec7644b2e2692
Partial-Implements: blueprint policy-in-code
This change just updates the tox.ini file to call stestr directly
instead of going through ostestr.
For more background you can read the ML posting:
https://goo.gl/TFvcxy
So now you won't need `--n` to run single tests, and you can also
supply regex directly without even the `--`. For example:
`tox -epy27 $regex`
Change-Id: I75d4ca19f87fe1930cf54b554b7e232632a4a21c
os-testr has moved over to use stestr instead of testr. While this
is usually compaible with existing settings, there is a warning
that is emitted when .stestr.conf is not present. It is usually
able to fall back to parsing the .testr.conf file, but to be more
correct and to prevent future problems we should update the config.
Change-Id: I11e43cff87cad20b9c880e276e20a04123f830fb
This is the basic patch which consits of the framework
code for default policy in code feature as well as
support in attachment resource.
Change-Id: Ie3ff068e61ea8e0e8fff78deb732e183e036a10c
Partial-Implements: blueprint policy-in-code
Leftover data in the autogenerated docs can result in build
failure. Remove these files before every build to be safe.
Change-Id: Iec3ff7334b7af80cb34019590544fab0b1c95240
Closes-bug: #1716478
Doc builds can fail if you have .egg-info directories
in your repo. This change makes sure that those
directories are ignored in the doc8 check.
Change-Id: I8e713651919f43feb80fca59b74c103b3255dd75
Some of the available checks are disabled by default in flake8, like:
[H106] Don’t put vim configuration in source files
[H203] Use assertIs(Not)None to check for None
This patch is to enable the H106 and H203 checks in Cinder project.
The C312 hacking rule will be removed when turn on H203.
Change-Id: I2e883c301b64d5977bbb907b63c9c144bc6f959d
This avoids falling back to the global bindep-fallback.txt which
installs a pretty big environment. Without this change, a lot
of additional but unnecessary packages are installed on the nodepool
workers.
Change-Id: I8c581225eada929bc947b13f851bb228000f32fe
The v1 API is still in the tree, even if it is off by
default and deprecated. We need to keep documentation on
how it works at least until we remove the code. This was
published to [1] which was the primary way to find this
information, and it is now missing.
[1] https://developer.openstack.org/api-ref/block-storage/v1/
This marks v1 as deprecated in the toctree.
This reverts commit 8139f7f108786112ec6eef47228ecbc7f54b6f47.
Change-Id: Ic9d0fcce5ca0f8455c212292664b8f9694edfce3
Make use of doc8 to verify all rst files which are not
autogenerated for errors and fail if there are any issues
found. The doc8 checks are now part of the tox 'docs'
environment and ran automatically. Checks can also be called
direcly via 'tox -e docs'.
Fix all issues found by doc8.
Closes-Bug: #1566765
Change-Id: I2b25247030a1aadcfe029c9e071ef17f2f72046b
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
The gating on python 3.4 is restricted to <= Mitaka. This is due to
the change from Ubuntu Trusty to Xenial, where only python3.5 is
available. There is no need to continue to keep these settings.
Change-Id: Ief6f4b8b37113f08dd0ae767f3dd2b5b2177e3ce
Many deprecations are triggered early (on imports, for example)
before the warnings are enabled by the WarningsFixture in the
base test class.
To make sure all DeprecationWarning messages are emitted we enable
them via the PYTHONWARNINGS environment variable.
Note: this copy from 1be35ff039d67c50866f2556ef847b048cbf3578
Change-Id: I7c6106149832d048d4d3bd2701c2c0db81bd87cb
We get a warning "WARNING:test command found but not installed in testenv"
when building docs. This patch fix it.
Change-Id: Ib9798e59c55099d5a4bf8989401b63487b0c6338
Per our conversation in the Cinder weekly meeting [1] we will
now switch to just running local tests against python 3.5 as
that is the more recent and common 3.x version available on new
distros. Other versions can still be run explicitly, but this
changes the default tox run to only use 3.5.
[1] http://eavesdrop.openstack.org/meetings/cinder/2016/cinder.2016-11-30-16.00.log.html#l-54
Change-Id: If2226cb229f016e36c4dfab6224d5ae353b926bb
Looks like we should now be able to add oslo.versionedobjects[fixtures]
to test-requirements.txt and remove it from tox.ini, so this commit does
that.
Change-Id: I420ea16d8ad6d883e7c2c8de80f912ea35500367