Commit Graph

24 Commits

Author SHA1 Message Date
John Garbutt 027d5d263c Fix up tox -e cover to use coverage
Change-Id: I4516a958efd4b14a6d0f9f8a7763311f134c5215
2023-10-06 16:55:13 +00:00
wangzihao a625860dde 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:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: I1d65fb9d8d302ff1e3f33e92b668b2241741e7e0
2021-08-12 11:12:28 +08:00
Zuul dba81a4ebb Merge "Use TOX_CONSTRAINTS_FILE" 2021-04-16 13:10:56 +00:00
Hervé Beraud 7f167721ab Fix requirements issues
This patch is the merge of 2 current fixes that need to be solved in the
same time. Indeed each issue lock our gates independently.

Dropping lower constraints testing

We facing errors related to the new pip resolver, this
topic was discussed on the ML and QA team proposed to
to test lower-constraints [1].

I propose to drop this test because the complexity and recurring pain needed
to maintain that now exceeds the benefits provided by this mechanismes.

[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019390.html

Move flake8 as a pre-commit local target.

The goal here is to avoid conflicts between flake8 and hacking version each
2 days.

Inspired from nova's approach[1].

The flake8 version to install will be determined by hacking and
requirements[2] will stay aligned instead of relying on different versions.

[1] https://opendev.org/openstack/nova/src/branch/master/.pre-commit-config.yaml#L26-L35
[2] https://opendev.org/openstack/hacking/src/branch/master/requirements.txt#L1

Co-authored-by: Daniel Bengtsson <dbengt@redhat.com>
Change-Id: I04a845fd98f0d21f7a21dae9f184117263390dd1
2021-03-23 14:15:59 +01:00
Hervé Beraud fc270afcc5 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>.

[1] https://review.opendev.org/#/c/722814/
[2] https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file

Change-Id: I1a006cf4368cc18c34dd6f236ecfe966e6b09388
2021-01-14 10:30:43 +01:00
Hervé Beraud a5c678ce8b Use py3 as the default runtime for tox
Moving on py3 as the default runtime for tox to avoid to update this at
each new cycle.

Wallaby support officially the following runtimes [1]:
- Python 3.6
- Python 3.8

During Victoria Python 3.7 was used as the default runtime [2] however this
version isn't longer officially supported.

[1] https://governance.openstack.org/tc/reference/runtimes/wallaby.html#python-runtimes-for-wallaby
[2] https://governance.openstack.org/tc/reference/runtimes/victoria.html#python-runtimes-for-victoria

Change-Id: Idb0f7ff31a8fa788c940d70eddd1e7218691a31d
2020-11-03 16:12:44 +01:00
maaoyu 9558a46c94 Remove install unnecessary packages
The docs requirements migrated to doc/requirements.txt
we need not install things from requirements.txt.

Change-Id: Ia65109bbb683489ba9a880d3a41baca5ef560d77
2020-09-23 21:20:57 +08:00
Hervé Beraud 00b4875144 Adding pre-commit
Introduced changes:
- pre-commit config and rules.
- Add pre-commit to pep8 gate, Flake8 is covered in the pre-commit hooks.
- Applying fixes for pre-commit compliance in all code.

Also commit hash will be used instead of version tags in pre-commit to
prevend arbitrary code from running in developer's machines.

pre-commit will be used to:
- trailing whitespace;
- Replaces or checks mixed line ending (mixed-line-ending);
- Forbid files which have a UTF-8 byte-order marker
  (check-byte-order-marker);
- Checks that non-binary executables have a proper
  shebang (check-executables-have-shebangs);
- Check for files that contain merge conflict strings
  (check-merge-conflict);
- Check for debugger imports and py37+ breakpoint()
  calls in python source (debug-statements);
- Attempts to load all yaml files to verify syntax (check-yaml);
- Run flake8 checks (flake8) (local)

For further details about tests please refer to:
https://github.com/pre-commit/pre-commit-hooks

Change-Id: Ic00da1340d695c7a109f41a09929b654baf995a7
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-09-08 13:48:34 +02:00
Colleen Murphy bce0b7d435 Add debug tox environment
Change-Id: I2e8599555571539e2befb5842e83ca81454fb150
2020-06-01 14:40:20 -07:00
Andreas Jaeger 009fd6c703 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 2.0 which
supports Python 3.

Blacklist: W504 line break after binary operator

Change-Id: I7ca780a2cff32031c562482b804888e5d49712c1
2020-03-27 19:14:46 +01:00
Daniel Bengtsson 4a1c93a513 Update the minversion parameter.
Update the minversion parameter to use the python -m pip to install
python packages:

https://tox.readthedocs.io/en/latest/changelog.html#id185

It's recommend to use this. Remove the useless install_command
parameter.

Change-Id: Ic5c0f747c8d579ce3369635b67cdbf2d134c175d
2020-03-03 15:25:51 +01:00
Hervé Beraud 188ee76177 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in Ussuri cycle.

Complete discussion & schedule can be found in
-
http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: Ie48c796b6c83b42c85555d13a09f3b3ed96428f8
Sem-Ver: api-break
2020-02-06 10:24:15 +01:00
caoyuan 09eadf955e Trivial cleanup for tox
move 'basepython' to the top-level 'testenv'

Change-Id: I197d6486a3b126f616ffe2f7e3e669d922a1e337
2019-12-23 13:04:09 +00:00
caoyuan 91ca7b0e26 tox: Keeping going with docs
Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
suggests, keeps the build running when it encounters non-fatal errors.
This is exceptionally useful in avoiding a continuous edit-build loop
when undertaking large doc reworks where multiple errors may be
introduced.

[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045

Change-Id: Ib1749e690c22663955985f0c3b718ed6223be223
2019-10-24 15:15:43 +08:00
Corey Bryant a052897f2d Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: I78d3a9c14f54dd38d834f99a33c41494fa22255b
Story: #2005924
Task: #34234
2019-07-05 14:45:16 -04:00
jacky06 0b26714e84 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: Ibb5a0f72dd8e7dab4c42340f26226fdc6451d523
2019-04-23 06:30:33 +00:00
Vishakha Agarwal 259980ccec Update the min version of tox
In Train, we will use python3.6 and 3.7 for
which the minimum tox version required is 2.5[1]

[1]https://tox.readthedocs.io/en/latest/changelog.html#v2-6-0-2017-02-04

Change-Id: I6bea49746a9a262fe9b7346909418e35dad6a12c
2019-04-09 15:19:12 +05:30
Vishakha Agarwal e089af1370 Drop py35 jobs
Python 3.5 was the target runtime for the Rocky release.
The current target py3 runtime for Stein is Python 3.6,
so there is no reason to keep testing against the older version.

https://governance.openstack.org/tc/reference/runtimes/stein.html#python-runtime-for-stein

Change-Id: Id4cb74fcbb011bd80f82c0cad907b6eea9c47f1a
2019-03-05 11:12:54 +05:30
Colleen Murphy 09ce909e4f Add py36 and py37 tox envs
With python3.6 and python3.7 jobs added to the Zuul jobs, it makes sense
to add this to the tox config too so that developers can run those
tests as well.

Change-Id: I51c76a0515e80de590da9d511dfd51f82153a72e
2019-02-25 12:14:28 +01:00
Doug Hellmann be1922bef7 fix doc gate
Fix documentation build by correcting a source filename and fixing
the dependency settings.

Change-Id: I1fc098cef7097ffea338129a3fcefda77f396a3a
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-08-14 11:50:08 -04:00
wangxiyuan 88684c2074 Fix CI
We enabled some basic jobs for oslo.limit recently. This patch
fixed the related CI error.

Change-Id: I1fd27724686ae12c0a279d7a7e45c2711b62bf45
2018-07-30 14:22:38 +08:00
Lance Bragstad e5d6b14534 Convert tox.ini to using stestr
With the upgrade to oslotest 3.6.0 [0], testr no longer works [1].
This is because oslotest no longer requires testr and we don't depend
on it directly in oslo.limit.

[0] d5a3c58f71
[1] 897823fbd6

Change-Id: I4357350b3ad442658ef872c295dbe734a0f2cc9b
2018-07-02 19:23:45 +00:00
huang.zhiping f45c9d346e 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: I724fee4ab31762582cb96fc91d99d62b6e637969
2018-06-11 10:29:13 +00:00
wangxiyuan 69eb4440dc Init repo
This patch initialises the limit repo using oslo-cookiecutter
tools.

Change-Id: Iaf748223fee886d057f40384c080d4dcd7d3ab73
2018-05-17 18:06:06 +08:00