Using "python setup.py check -r -s" method of checking the package has
been deprecated with the new recommendation to build the sdist and
wheel, then running "twine check" against the output.
Luckily, there is already a job that covers this that only runs when the
README, setup.py, or setup.cfg files change, making running this in the
pep8 job redundant. This covered by the test-release-openstack-python3
that is defined in the publish-to-pypi-python3 template.
More details can be found in this mailing list post:
http://lists.openstack.org/pipermail/openstack-dev/2018-October/136136.html
Change-Id: Ia981b27852b9061c8a406e68388c60595aa528f8
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Quotes around {posargs} cause the entire string to be combined into one
arg that gets passed to stestr. This prevents passing multiple args
(e.g. '--concurrency=16 some-regex')
Change-Id: I8ce3c403904ea1c6990f88d52c1c1a068aaed75a
This commit does several things:
- Setup and run pylint directly rather than running
through a script. This allows the user to see what is happening
while the user is running through pylint.
- Allow the user to either run pylint on a particular changeset,
or the entire cinder tree.
- Allow the user to run on a particular changeset. Using like
HEAD~1, etc.
- Since the pylint gate check I disabled the tests that were
reported by pylint. The thought here would be go through
the failures and correct them.
- Update pylint to 2.1.1.
- Removed old pylintrc.
Change-Id: I708c93843d991e8c0ac114b0b2d6ede373b96d0a
Signed-off-by: Chuck Short <chucks@redhat.com>
This adds a tox setting for skipping default targets if the
specified version is not available. This allows tests to run
using python 3.6 if available, but conversely also allows
skipping python 3.5 or even 2.7 if those runtimes are not
present.
This only affects local default tox runs and does not change
what is tested in the gate.
Change-Id: Ia34fd32ab8d4672a2725468ee3d37697f51d5b3a
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