Commit Graph

78 Commits (master)

Author SHA1 Message Date
Zuul 6a363dbff3 Merge "These should be indented 4 spaces to match the other things in this block" 2023-08-10 22:14:38 +00:00
likui fb03b3ef38 tox: Remove basepython
Python 2 is EOL. No environment should be defaulting to it. Our CI
environments certainly aren't.

Change-Id: Ic9c845a7c7e52d15fba8f353dfc60d2db45e2a9d
2023-08-02 17:01:22 +08:00
likui 048f5fdd41 These should be indented 4 spaces to match the other things in this block
Change-Id: Ibf92dc1e27028ca6af93d59f828219bd851c4a92
2023-07-31 15:03:24 +08:00
Jay Faulkner c2f15737a0 Update dependencies for pep8: to hacking v6
Updates hacking to latest, 6.0.0. Updates other deps to permit
coinstallability. No code changes needed.

Change-Id: Ib0b277e3c6b318cc0a24b5532dedd925fbe1ffc6
2023-04-21 12:51:56 -07:00
Riccardo Pittau f945974fea Fix tox4 error
Remove skipsdist that it was never supported and causes breakage
when used with usedevelop.

Change-Id: I003c38181f4900127aefc29025b600c2d9681c75
2022-12-28 15:09:18 +01:00
Jay Faulkner 9646f89018 No longer override install_command in tox.ini
Per ClarkB on the list, overriding install_command makes it more
difficult to troubleshoot failing CI.

Change-Id: I3e1a7ddac620ba2418d5e9038183848969a1afb2
2022-11-29 07:39:31 -08:00
Ghanshyam Mann a7ad7fdfa4 Drop lower-constraints.txt and its testing
As discussed in TC PTG[1] and TC resolution[2], we are
dropping the lower-constraints.txt file and its testing.
We will keep lower bounds in the requirements.txt file but
with a note that these are not tested lower bounds and we
try our best to keep them updated.


Change-Id: I3d7ad8a49bbb63fd00ae9523243135a24419c465
2022-05-25 21:23:01 +09:00
Riccardo Pittau 61b46c3401 Add lower-constraints job to current development branch
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.

Adjust min versions in requirements.txt accordingly.

Change-Id: I3678c29fb090244f5e00208e4dcc8f1ad8a54ff5
2021-08-12 11:58:35 +02:00
likui 8bf8769f2d Changed minversion in tox to 3.18.0
The patch bumps min version of tox to 3.18.0 in order to
replace tox's whitelist_externals by allowlist_externals option:

Change-Id: I41dac340cf679b86825638f56de8ef9999cfb3ff
2021-06-04 09:20:16 +08:00
Riccardo Pittau 1e02b3e5eb Update minversion of tox
The minimum version since when tox accepts having inline comments
in deps is 3.9.0

Change-Id: I4915b3898ca8b5e88b5b0114c9e83475223d50bf
2021-01-22 10:09:01 +01:00
Zuul 2ade8869ad Merge "Move pep8 dependencies from test-requirements to tox.ini" 2021-01-06 11:10:12 +00:00
Riccardo Pittau 1db6aef707 Move pep8 dependencies from test-requirements to tox.ini
They're not needed there and are hard to constraint properly.

Change-Id: I2d9dee3dc2299656f305559145f7801b25ef30f3
2020-12-23 12:13:40 +00:00
likui ceceb3ffee remove lower-constraints job tox.ini
Change-Id: Ie33de4a045de20eae35f90e07ccc2df745dc67d5
2020-12-20 10:43:47 +08:00
likui 6249fc0219 Use TOX_CONSTRAINTS_FILE
UPPER_CONSTRAINTS_FILE is old name and deprecated
This allows to use upper-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.


Change-Id: Ifc5d324e988f0e7d1fb9ce7b312fe2f6509894bb
2020-11-12 09:27:05 +08:00
maaoyu 0e4a23393f Remove install unnecessary packages
The docs requirements migrated to doc/requirements.txt
we need not install things from requirements.txt.

Change-Id: Ia6ed4853f4fae465e102ce93ad39ee915cc02847
2020-09-24 11:03:11 +08:00
Riccardo Pittau 42514bef11 Set min version of tox to 3.2.1
As recommended, since version 3.2.0 tox switches pip invocations
to use the module -m pip instead of direct invocation.
We set min version to 3.2.1 [1] to also fix the behavior of


Change-Id: I5101dcffa0ea9d44507d25b1a8519d710404deb3
2020-07-15 15:31:46 +02:00
wu.chunyang f1f10385fa Remove pypy
Pypy is not tested in OpenStack anymore, remove the job.

Change-Id: If462d6a5e2304ebc6647087cad89007fe2576acb
2020-07-03 22:28:20 +08:00
Riccardo Pittau 389cab712e Check import order
Restore pep 8check for import order.
Set flake8-import-order version to 0.17.1
Full py3 compatible version.
Add all Python3 modules to stdlib list.
Also includes fix to an enum34 dependency bug.

Change-Id: I989a84e362a18225c6f79580b22bb028d3e265ff
2020-04-21 15:57:45 +02:00
Dmitry Tantsur 9be0a750a9 Bump hacking to 3.0.0
The new version enables a lot of standard flake8 checks, so a few
fixes are required. W503 is disabled as it conflicts with W504
and the latter seems to be preferred nowadays.

Change-Id: I7c66f18be46af73a47919deef1f38c1f1d3cc741
2020-03-30 11:36:17 +02:00
Riccardo Pittau 369a2030b3 Enforce running tox with correct python version based on env
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 [0].


Change-Id: I9731a9d99597f14b20e3ab7067ca5a060ec13835
2019-12-23 10:05:04 +01:00
Iury Gregory Melo Ferreira f51566545e Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

python-ironicclient is ready with python 3 and ok to drop the
python 2.7 support.

Complete discussion & schedule can be found in

Ussuri Communtiy-wide goal -

Change-Id: Iacc50fde00f0d24e9c6ee2b1ac61b8fa060094fb
2019-11-22 11:08:56 +01:00
Kaifeng Wang 2e25b23539 Build pdf doc
The is one of community goals that each project could produce a
single PDF file. The pdf should be in the output of openstack-tox-docs

TeX packages are required to build PDF locally, following is recommended:

* inkscape
* texlive-latex-base
* texlive-latex-extra
* texlive-fonts-recommended

More about the goal:

Change-Id: I60e1e1b02ced34a7236fca4552ecf2f983cdb9d4
2019-09-05 18:43:33 +08:00
chenke eae60397bf Switch to the new canonical constraints URL on master

Change-Id: Ifb7bcc88e52dc120070501d531e2889820cdd643
2019-06-17 21:42:27 +08:00
Kaifeng Wang 85df211fc1 Update Python 3 test runtimes for Train
One of train goals to have consistent python3 jobs.

Change-Id: If72309322644ea54fbf3a07ecbaa1bcf09ff9dba
2019-06-13 11:30:34 +08:00
Kaifeng Wang 5e8680c11e Fetch requirements from opendev
As well as doc updates

Change-Id: I994dfe226d81494c01c105e5c62c4fe7c3b9875e
2019-05-08 16:01:06 +08:00
Ghanshyam Mann 7f69c5388d Dropping the py35 testing
All the integration testing has been moved to
Bionic now[1] and py3.5 is not tested runtime for
Train or stable/stein[2].

As per below ML thread, we are good to drop the py35
testing now:


Change-Id: I5c377836ebf0081089a9c54bcc5981061638c64a
2019-04-14 22:33:51 +00:00
Iury Gregory Melo Ferreira 9b881cb973 Run jobs under python2 and python3
-Switch functional job to run under python3
-Create a functional job to run under python2
-Create a tempest job to run under python2
-Create tox env to run functional tests under python3
-Validate if `USE_PYTHON3` is set to `True` to call
the correct env for tests
-Remove hardcoded path for client when running functional tests
- Update tests failures to work for python2 and python3

Change-Id: I55abc999f6f397b171d05fd9e9b39d833ca95e55
2019-03-15 17:43:19 +01:00
Iury Gregory Melo Ferreira 2c349cc893 Move to zuulv3
To move ironicclient legacy jobs to zuulv3 the the following changes
were necessary:

- Change `tox.ini` to pass envrioment variables
- Clean `` to avoid legacy variables (`$USER` and
`$BASE`), removing `generate_testr_results` function since we only
get `testrepository.subunit` in logs and the results of the tests
are present in job-output file.
- Convert `` and `` into
`playbooks/functional/run.yaml` to run after the setup.

Change-Id: I6a5b3f82c238083b66bdf6f379092260d367d82d
2019-03-11 11:00:08 +01:00
huang.zhiping 072d32fb65 Update min tox version to 2.0
The commands used by constraints need at least tox 2.0.  Update to
reflect reality, which should help with local running of constraints

Change-Id: I9e985c4942ad3843b1c0af63d5504c690c836b26
2018-10-21 02:18:59 +00:00
Zuul 695f501fa8 Merge "Switch to using stestr" 2018-06-11 18:56:21 +00:00
Doug Hellmann c6601118c5 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 that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: I77dfc7cc757befdc988016f5f90e4dddada5cc69
Signed-off-by: Doug Hellmann <>
2018-06-06 17:58:17 -04:00
Charles Short 11ed23ce78 Switch to using stestr
According to Openstack summit session [1] stestr is
maintained project to which all Openstack projects
should migrate.
Let's switch it then.


Change-Id: Idf7736fb455d0a13da5a8b6140f5eaa7fa44cb99
Signed-off-by: Charles Short <>
2018-06-05 08:53:23 -04:00
Nguyen Hai fd7ccff5d3 Follow the new PTI for document build
- Follow new PTI for docs build
- Add sphinxcontrib.apidoc to replace pbr autodoc


Change-Id: I76e8ec019ef30fdc2d34a25a99e849407f586459
2018-04-19 13:15:59 +09:00
Doug Hellmann da8c01cce2 add lower-constraints job
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.

for more details.

Change-Id: Id15b514bb2b796f928040dc4f767df6627c10e87
Signed-off-by: Doug Hellmann <>
2018-03-22 17:49:37 -04:00
melissaml 25a3ceef51 Replace curly quotes with straight quotes
Curly quotes usually input from Chinese input method.
When read from english context, it makes some confusion.

Change-Id: I37f496630161991cd568e22dd7f54319c4f4f72d
2018-01-26 01:11:47 +08:00
Andreas Jaeger 7f5a577524 Avoid for constraints support
We do not need, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/ file.

This follows to remove

Change-Id: I53af44978840c5b222e421dae6963705c373765d
2017-12-02 16:53:33 +00:00
Pavlo Shchelokovskyy 60e0ea26fb Replace testr with stestr
os-testr 1.0.0 now uses stestr as underlying test runner,
so we should re-configure our testing setup accordingly.

Change-Id: I0a8f23cf2bd934c288daf1a9fa8b672768641163
2017-10-06 07:20:47 +00:00
John L. Villalovos f94722ab44 flake8: Enable some off-by-default checks
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
             mock.patch/mock.patch.object calls

Fix code that failed [H205] and [H210]

Change-Id: I7a553e7d40e328f37757fb504a098776cb9bf97c
2017-09-07 06:40:32 -07:00
John L. Villalovos ebb168a50e tox.ini: Add 'py36' to the default envlist
Newer operating systems, like Fedora 26, ship with Python 3.6 now. So
that they can do a Python 3 test, add 'py36' to the default envlist.

Change-Id: I9c1a6be8e5441e398a265b34aa7378ba8a7d7c0b
2017-08-28 15:19:38 -07:00
Jenkins 646840b41d Merge "Update tox envs list" 2017-01-11 14:58:07 +00:00
Kyrylo Romanenko 7bb1f3a770 Update tox envs list
Update envs list in tox.ini: py33, py34 are not run on CI anymore.
Make documentation consistent with actual settings in tox.ini.

Change-Id: I7e6ad8acf01a54043f2a2b741c0f1b3376c936d0
2017-01-10 15:42:57 +00:00
Kyrylo Romanenko ddcbf60c16 [trivial] Fix of apostrophe in tox.ini
Use simple ASCII apostrophe instead of UTF right single quotation mark.
Terminal with SSH to remote Devstack does not display UTF correctly.

Change-Id: Id447cdbf11d19c0c2671a42fd99f42afa68d5aef
2016-12-27 17:52:53 +02:00
Anton Arefiev 42f5cfd18a Allow import more than one func from i18n
According to OpenStack guidelines[1], importing more than
one module per line is allowed if it's function from i18n module.


Change-Id: I10e90e8f6a4a3f9c161bbaffb030d3fbc9f8499b
2016-11-24 18:00:31 +02:00
John L. Villalovos 6f53a1822f Update to hacking 0.12.0 and use new checks
Use hacking 0.12.0

Use the new checks that are available:
    [H106] Don’t put vim configuration in source files.
    [H203] Use assertIs(Not)None to check for None.
    [H904] Delay string interpolations at logging calls.

No changes were needed to the code to pass the new checks.

Change-Id: I348a9ef60449fc3d5981013f0be3bfd66d503f6e
2016-11-09 05:20:56 -08:00
John L. Villalovos f72aa9e134 Don't write python bytecode while testing
This patch is based on the Ironic commit

This should reduce the number of times you need to completely delete
your tox dir because you have stale pyc files around.

Change-Id: I09a5e5f676de800dac8198957ce742b994bc5e77
2016-08-31 09:58:29 -07:00
Jenkins 80de6aeb45 Merge "Add docs target to tox.ini" 2016-08-22 15:48:51 +00:00
Vladyslav Drok cbb402ee6c Add docs target to tox.ini
Also fixes tempest imports related errors and adds warnerrors=True
for pbr in setup.cfg.

Change-Id: Ib27b5de1f014ebae0b66e945ed5a7628913c3a41
2016-08-19 19:39:11 +03:00
Jim Rollenhagen 83f70ba0a5 Use constraints for all the things
This configures tox to use upper-constraints for everything, except
environments used for post jobs (as constraints aren't supported there

Change-Id: I6f3fb3fba567401c1da0196de30e142f7ca11eb4
2016-08-19 08:40:00 -04:00
Clark Boylan 98c4f4dbea Fix coverage target
Previously the coverage target ended up deleting the coverage data when
the `coverage combine` command ran. This then caused the `coverage html`
command to fail due to lack of data to report on.

Thankfully the fix is simple because pbr is actually handlign all of
this for us behind the scenes. All we need to do is run with the
--coverage flag and make sure the .coveragerc reflects the desired
inclusions and ommisions.

Change-Id: Ide6c7639a19d961e4af27c2c59b036395e2af3ef
2016-07-27 14:12:42 -07:00
zhengchuan hu 3af0192af7 Add Python 3.5 classifier and venv
Now that there is a passing gate job, we can claim support for
Python 3.5 in the classifier. This patch also adds the convenience
py35 venv.

Change-Id: I167ed334608e45544d0f64a495d95a515d8ade98
2016-07-14 20:35:02 +08:00