- Disable auto discovery in setuptools
This is to avoid issues with latest setuptools after version 61.0
For more info see 
- add bash script to allowlist in tox.ini
- use default size for vm memory
The lower-constraints test was removed because of an issue where pip
could not correctly determine the required packages versions to install,
ending in an almost infinite loop that would end up in timeout, failure,
and general mayhem.
Recently the issue has been fixed and, if properly configured, the
lower-constraints test can provide good indication of which minimum
versions are required to support the current code.
This patch adds the test back to the current development branch, and it
runs only on master.
The lower-constraints file will stay in the future stable branches.
Debugging unit test failures is very challenging because all of the log
output is mixed together. Capture the log messages and store them as
part of the test, so that only log messages associated with failures are
output, interleaved correctly with the results.
This does not capture logs sent to stdout by _early_log(), although that
would be a nice further improvement.
Usage of usedevelop=True results in all requirements.txt dependencies
always installed (without constraints) even when requirements.txt
is not explicitly added. Override usedevelop for these environments.
Add missing constraints to the bandit environment.
* Remove pep8 dependencies from test-requirements, they're not
needed there and are hard to constraint properly.
* Add cliff to l-c (same version we have on ironic)
Tox trying to install latest versions for building docs,
which may not be supported by stable and lower branches,
so should be restricted by respective version's upper-constraints.txt
They're not easily discoverable there, let's keep them in tree.
The examples have been restructured to have two different projects
ready to be copied and adjusted. PEP8 failures have been fixed.
Co-Authored-By: Jay Faulkner <email@example.com>
Make a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
know about the requirement
- Remove obsolete sections from setup.cfg:
* Wheel is not needed for python 3 only repo
* Some other sections are obsolete
- Update classifiers
- Update requirements, no need for python_version anymore
- Use sphinx-build
Since removing support for Python 2, we changed the basepython
value to 3.
This means that all the tox tests run with the default python
version available in the system.
This is not quite correct when running on environment such as
py36, py37 or py38, since they imply running with different
Python versions based on the environment.
To enforce the correct version we need to add the option
ignore_basepython_conflict available since tox 3.1.0 .
Due to the way we currently define install_command, all test targets
are using upper-constraints, including the lower-constraints one.
This patch fixes it and adds standard things like passing proxy settings.
Adds bandit configuration template and exclude some of
tests that we don't want to fix for the moment.
Keeping job unvoted so that we can keep an eye on possible
issues while not breaking gate.
is currently failing as the curl command in this file does not
Instead of allowing redirects, use the proper current link to the
upper constraints file.
According to Openstack summit session  stestr is maintained project
to which all Openstack projects should migrate.
Let's switch it then.
Also adjust requiremenst to past the gate checks.
Signed-off-by: Chuck Short <firstname.lastname@example.org>
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 that
breaks the more specific versions used in default environments like
py35 and py36.
W503 according to the  pycodestyle docs is not supposed to be
enabled. But it is.
W503 is something we will likely never enable as it is a personal
style decision and can change depending on the code. There is no one
right answer. Interestingly there is also a W504 which is the opposite
Don't create *.pyc files during unit/functional tests as they just add
cruft during tox runs.
This is similar to what we already do in openstack/ironic
When running the tox tests, use the default version of Python 3. Instead
of having to update the Python 3 version as we move from
py34 -> py35 -> py36 -> py37 -> py38
Just use the default version of Python 3 on the system.
This will not affect what gets run in the gate, as the version is
explicitly specified when it runs there. This is for developers who run
the tests locally.
The Zuul v3 job is looking for the log files from the release notes
in: .tox/releasenotes/log/ but we had then in .tox/venv/log/
Fix it to where the Zuul v3 job expects it to be.
Also updated the 'docs' job, even though job isn't failing. If the job
did fail, with current setup, no log files would be copied which would
make debugging more difficult. This change will make it so the log
files are copied.
Recent update brought os-testr 1.0.0 that already uses stestr test
runner instead of testrepository. This patch migrates those places
using testrepository to using stestr.
Inspired by the patch of the same name in openstack/ironic
Enable the following off-by-default checks:
* [H204] Use assert(Not)Equal to check for equality.
* [H205] Use assert(Greater|Less)(Equal) for comparison.
* [H210] Require ‘autospec’, ‘spec’, or ‘spec_set’ in
Increase the version of hacking in test-requirements so that can use new
No changes to code were required.
On some platforms using ’ instead of ' causes problems for
tox to be run. This patch fixes this at the same time not
causing any readability issues.
Uses oslo_debug_helper to run up the tests in single-threaded
mode so that pdb works.
# Run all tests.
tox -e debug
# Run a specific test or set of tests.
tox -e debug module.to.my.test
Specify 'ironic_python_agent' as the name of the application for the
flake8-import-order plugin. That way it knows that imports of
ironic_python_agent should come after external libraries.
The old generate_sample.sh is broken already as it refers to
non-existing openstack/common path.
Let's use oslo-config-generator as many other OpenStack projects do.
Also, where applicable, option descriptions are updated with the
corresponding kernel parameters to set those options durig pxe boot.