Commit Graph

39 Commits

Author SHA1 Message Date
Takashi Kajinami 1d53984f42 tox: Replace whitelist_externals
This option was deprecated in favor of the new allowlist_externals
option and is no longer available in recent versions of tox.

Change-Id: Ica83dee466006e2753b0231753b89d4bb920e9c4
2023-04-10 17:21:14 +09:00
Stephen Finucane 159d752030 tox: Trivial cleanups
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I6a78a626916796b7c385a89d2139b621140d6c0c
2022-04-06 14:14:45 +01:00
Zuul aa7bac4662 Merge "Remove lower-constraints remnants" 2021-03-16 15:24:36 +00:00
Zuul 7de1e9e932 Merge "Use py3 as the default runtime for tox" 2021-03-15 12:52:58 +00:00
wu.shiming ffec6e1fe4 Remove lower-constraints remnants
These were missed in change: I64c8320d0cdd473d54d6de6050be4d60d92a7c5f

Change-Id: I469d53212193ecbe0b0907cd50ed9bd77a6ae67f
2021-03-15 10:56:10 +00:00
Hervé Beraud 52bb16ccad 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: Ic6ed0834607d7d6e75cfcadeb0e2b990bb1aaab4
2021-03-11 17:36:13 +00:00
Hervé Beraud 549c2ccaa4 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: Ic5998308cf6892066b296a9e9455466d12f0d720
2021-03-11 17:35:34 +00:00
Hervé Beraud d6c466197c 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: I3a8d6c282a1ec8189f4150a5e5391a94591cff9d
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-09-22 10:46:49 +02:00
Sean McGinnis 34257a5681
Bump default tox env from py37 to py38
Python 3.8 is now our highest level supported python runtime.
This updates the default tox target environments to swap out
py37 for py38 to make sure local development testing is
covering this version.

This does not impact zuul jobs in any way, nor prevent local
tests against py37. It just changes the default if none is
explicitly provided.

Change-Id: I0b7dada243ff409437c1799cd2b88696379f1a54
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 10:25:38 -05:00
Andreas Jaeger 4836b632dd Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

blacklist:
W504 line break after binary operator
E731 do not assign a lambda expression, use a def

Change-Id: I5099674e8813a070f34ba4fa4a26f2b61acad925
2020-03-30 11:57:06 +00:00
Hervé Beraud 0c5e44839c [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: Ia7abd5c3861978dbcbc7c72f469d19ff41032c13
Sem-Ver: api-break
2020-02-10 11:24:43 +01:00
pengyuesheng e5046441a5 Update the constraints url
For more detail, see http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: If6d7f139f81d1f98034b7fec8d4e7ddcb3a6b8da
2019-09-29 10:53:04 +08:00
Corey Bryant 25ffb8f154 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: I795dfc58c5e4de57b89784ec2294da0651621777
Story: #2005924
Task: #34234
2019-07-05 14:39:57 -04:00
Zuul 873d5341ee Merge "Dropping the py35 testing" 2019-04-24 14:42:45 +00:00
Le Hou b32f45431c Use opendev repository
Change-Id: I4a038fdbf551e590bd17e260ce3355ceb3575316
2019-04-24 13:27:48 +08:00
Ghanshyam Mann e8a543ad14 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:
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/005097.html

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004647.html
[2]
https://governance.openstack.org/tc/reference/runtimes/stein.html
https://governance.openstack.org/tc/reference/runtimes/train.html

Change-Id: Ia8532570e5c0356bdf289bb99c1a8c46ee395893
2019-04-15 16:14:35 +00:00
98k 304e2c9089 Don't quote {posargs} in tox.ini
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: I4fdc0f122ce16390ffd66f1e0fb92837b5b64bec
2018-10-09 20:56:31 +00:00
Vu Cong Tuan ac1e5304d7 Switch to stestr
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: I74706b3551bf0a9a56deca090d744d3156a34aa8
2018-07-11 09:46:23 +07:00
Nguyen Van Trung 880d7122b8 Follow the new PTI for document build
For compliance with the Project Testing Interface as described in:
https://governance.openstack.org/tc/reference/project-testing-interface.html

For more details information, please refer to:
http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Change-Id: Ib36e24d0b38356790993fec24b8280464645bd29
2018-07-09 16:18:03 +07:00
Doug Hellmann 6842b2d35a 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: I5078d8e6ab1cadd0d3780a3cd4ebc14c5f05dc69
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-06 14:53:48 -04:00
Doug Hellmann 936a5d5f13 clean up test job configuration
Make the py27 and py35 jobs run the same commands by putting them into
the base testenv block.

Move the doc8 job into the pep8 environment to run with the other
linters.

Change the way we invoke sphinx to run the doctests to avoid issues
with pbr's sphinx integration. This also required removing skipdist
and usedevelop to ensure that all of the pbr-generated files needed by
sphinx exist before we run sphinx.

Change the way sphinx is invoked in the docs environment to avoid
issues with pbr's sphinx integration.

Change-Id: If8a24428eca4512a66dbb361e55cd73aa92c4da8
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-17 16:48:50 -04:00
Doug Hellmann 64f1f1553d set default python to python3
Set the default python to python3 except for the py27 environment. We
have to set that explicitly to override the new default.

Change-Id: Ib30809ed46999fc27986accbd662b748588ad977
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-13 15:57:18 -04:00
Doug Hellmann 7fdcc78cc5 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.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

Change-Id: I70508df7928e38fd8b97e69d42fbde5d9b17ad16
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-22 12:30:48 -04:00
Andreas Jaeger 03883f4ec6 Avoid tox_install.sh for constraints support
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.

This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.

Change-Id: I20a622f42e120659306ac9558429a0435cda1857
2017-12-02 16:52:09 +00:00
Jenkins 549c4aaaaa Merge "Improving cover and docs testenv" 2017-07-14 14:22:35 +00:00
Akihiro Motoki 71217e2004 Improve doctest and doc8 test
doctest and doc8 requires that ChangeLog file exists.
To deal with this, doctest is invoked via 'python setup.py build_sphinx'
as python setup.py generates ChangeLog file via pbr.
As a result, doc8 --ignore-path is no longer needed.

Change-Id: I0fbd9c5187266c1f52627dcce072015c01af644f
2017-07-10 13:04:57 +00:00
Nguyen Van Trung 71226d0e9a Improving cover and docs testenv
- Add whitelist_externals envconfig setting
- Add percentage report to further analyze code-base
- Add command to rm doc/build before build sphinx

Change-Id: I996319debf8bbb8aa8792169dbc69a43e2f4cf73
2017-07-10 08:52:43 +07:00
Akihiro Motoki e1bcf9dff1 rearrange existing documentation to fit the new standard layout
Change-Id: I56d60de2c3a8aefa2df834634ff5e6c068d868d4
2017-07-09 01:33:00 +00:00
kavithahr c3433644b2 The python 3.4 support is removed
Change-Id: I3ef8f463539ada48c9e94a0c4e37915ee892f687
2017-03-07 18:00:47 +05:30
Tony Breeds fcad050097 Add Constraints support
Adding constraints support to libraries is slightly more complex than
services as the libraries themselves are listed in upper-constraints.txt
which leads to errors that you can't install a specific version and a
constrained version.

This change adds constraints support by also adding a helper script to
edit the constraints to remove futurist.

Change-Id: I9ba103b35d006204ac1e012e16ca7f2ce1787422
2016-12-21 10:27:11 +11:00
ChangBo Guo(gcb) 20342282a2 Add reno for release notes management
The release management team have indicated this is their preferred way
to collect release notes in future.

Closes-Bug: #1634356

Change-Id: Iabdf3aeaab725fcbbe21e49fd7f60211cb796b68
2016-11-01 16:14:37 +08:00
ChangBo Guo(gcb) 4edd53045b 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: I34c00c2d1192a00a4fdbf968967445dd59e248af
2016-07-12 15:23:04 +08:00
ChangBo Guo(gcb) 4ca63cb022 Don't include openstack/common in flake8 exclude list
The directory openstack/common was used to keep codes from
oslo-incubator, we have retired oslo-incubator, so don't use
this directory any more.

Change-Id: Id84d7e9910de506f21997dd89b993951cdf4299f
2016-06-30 19:49:30 +08:00
janonymous 32b8ec3c09 py26/py33 are no longer supported by Infra's CI
Python 3.3/2.6 support would be dropped by
Infra team from mitaka,CI would no longer be testing it,
so projects should drop it also.

Change-Id: Iaabbd65c53d71f5aa19bdca29c14ba5248d78c27
2015-12-26 13:55:01 +05:30
Joshua Harlow 62d47da104 Remove dummy/placeholder 'ChangeLog' as its not needed
Just enforce that `python setup.py build_sphinx` will be the
way to build docs (which also builds a 'ChangeLog') so we don't
need to maintain a dummy file here anymore.

Change-Id: I9cfb2910d177536897e31b02c633f570f9175816
2015-09-24 15:02:42 -07:00
THOMAS J. COCOZZELLO e536c91187 Activate pep8 check that _ is imported
Remove the specification in tox.ini that _ is a builtin so that
it will no longer assume that _ does not need to be imported.
This helps ensure that the _ from i18n is used.

Activating this check did not flag any violations.

Change-Id: Id1b2730d628bb00fd367c34f8852bf4e017a2196
2015-09-03 16:08:27 -05:00
Joshua Harlow 5c3530a483 Move doc8 to being a normal test requirement in test-requirements.txt
Change-Id: I774af3f8e59281f4f32d5124c5ffbab5fc186460
2015-07-16 14:45:43 -07:00
Joshua Harlow e4fe1dfad2 Ensure doctesting and doc8 testing done in py27 env
This ensures that sphinx doc tests are ran and validated
and also runs doc8 to ensure style checks are done and adjusts
some of the current examples and code to fix found issues.

The process based executor doctest is disabled as it appears
sphinx creates the code for these examples in a local namespace
which the process based executor can't locate (and therefore it
dies).

Change-Id: I825f3a4b673acd66cc6e05d0d1057ed5c72a759d
2015-07-14 22:05:53 -07:00
Joshua Harlow 0d362d3078 Add initial .gitreview file and cookie-cutter template
Bootstrap the futurist project by using the cookiecutter
template. So that the CI jobs have all the things they
need and it follows the patterns used by all other oslo
/openstack libraries.

Change-Id: I738f68448e64e14725afc5e9c998751e081e7f07
2015-06-02 09:22:45 -04:00