Commit Graph

108 Commits

Author SHA1 Message Date
Balazs Gibizer c7cb02f1f7 Make tox.ini tox 4.0.0 compatible
* removed skipsdist=True to make sure novaclient is available in the virtual
  env. The usedevelop and skipsdist does not work together any more
  https://github.com/tox-dev/tox/issues/2730. For bindep we still don't
  need the current repo to be installed in the env so skipsdist added
  there.

Depends-On: https://review.opendev.org/c/zuul/zuul-jobs/+/866943
Change-Id: I979b91570c7b60273f35fbdf8464f6a9ee2007d6
2022-12-22 16:52:04 +01:00
Ghanshyam Mann 782a467533 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.

[1] https://etherpad.opendev.org/p/tc-zed-ptg#L326
[2] https://governance.openstack.org/tc/resolutions/20220414-drop-lower-constraints.html#proposal

Change-Id: Ibb492285ef7d5357c921035409d6654c80df3725
2022-04-29 20:56:13 -05:00
Takashi Natsume 665f1c8d4c Change minversion of tox to 3.18.0
The patch bumps min version of tox to 3.18.0 in order to
replace whitelist_externals by allowlist_externals option:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: I75844ded50c0032445dd27b1ced7f214c754e901
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
2021-05-18 22:56:24 +09:00
zhangboye b5faf37f1b 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.

Change-Id: Icad6d0d0d375d1995baa603b091be50797210215
2021-04-20 09:36:29 +08:00
wu.shiming 015f45b4ab Remove install unnecessary packages
The docs and releasenotes requirements migrated to doc/requirements.txt
we need not install things from requirements.txt.

Change-Id: I9d73c83b0520f724479c0e09b3686d3aab96df71
2020-09-14 11:19:28 +08:00
Takashi Natsume b7ae8c75cb Switch legacy Zuul jobs to native Zuul v3 jobs
Replace the 'novaclient-dsvm-functional' legacy Zuul job with
the 'python-novaclient-functional' native Zuul v3 job.

See
https://governance.openstack.org/tc/goals/selected/victoria/native-zuulv3-jobs.html
for more details.

Change-Id: I35b5699b8b0814f2d17a37e024286cd440047ec8
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
Co-Authored-By: Andrey Kurilin <andr.kurilin@gmail.com>
2020-07-08 20:33:05 +03:00
Zuul 750d28540a Merge "Bump default tox env from py37 to py38" 2020-04-24 18:55:59 +00:00
Sean McGinnis ddc4c67422
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: I093085cf6e85a66f80559eba62f9edf684f5dbea
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 10:25:57 -05:00
Takashi Natsume 439912743f Switch to using TOX_CONSTRAINTS_FILE
UPPER_CONSTRAINTS_FILE is deprecated.
So switch to using TOX_CONSTRAINTS_FILE.

See I3f957187ed4f29fcf88db99cb79fb33b21a8dd8d.

Change-Id: I1812eb64b1afa8e90f4de8604f3f26075da6332f
2020-04-24 23:09:09 +09:00
Stephen Finucane 8f50f84981 Bump to hacking 2.x
This is compatible with Python 3-only syntax.

Change-Id: I462f4242b9a5f8d8cd6b0cb3d328dfd9d93ba200
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-02-21 09:48:38 +00:00
Stephen Finucane 9dee28ae6c tox: Configure 'ignore_basepython_conflict'
Resolves the following warning:

  UserWarning: conflicting basepython version (set 37, should be 36) for
  env 'py36';resolve conflict or set ignore_basepython_conflict

and makes sure we're testing with what we should be.

Some random indentation is fixed while we're here.

Change-Id: I6f3e98cc33731f528a3a755300f1fcc65c6b53ff
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-02-21 09:48:38 +00:00
Eric Fried baccd5bcfa Stop supporting and testing python2
Change-Id: If678d77b8da69121b0075bfbc4216531be25da6a
2019-10-25 18:33:39 +00:00
Akihiro Motoki 6c0e4d7a39 PDF documentation build
Also reorganizes the document structure to match both HTML and PDF docs.

Story: 2006100
Task: 35143

Change-Id: Ie3f38e2ecf52e6a6cbd52bb36196e6f589f1ca0f
2019-10-11 03:51:38 +09:00
Corey Bryant 3cacca202a 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: I2ed3c89b4e571f3e4b69287d1844b26cf4d0268d
Story: #2005924
Task: #34226
2019-07-05 14:01:05 -04:00
Zuul 66611f26d3 Merge "Modify the url of upper_constraints_file" 2019-07-03 19:34:58 +00:00
翟小君 54904711a2 Modify the url of upper_constraints_file
As described at [1].

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: I76c9f982ff6cf46db25f626575257af483e3434e
2019-07-03 15:43:07 +00:00
pengyuesheng 77ad81bde8 Add Python 3 Train unit tests
See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: I691d7994070012af62d20d15809b7c4f143909a8
2019-07-02 09:35:48 +08:00
Zuul f7f5df9c1d Merge "Drop py35 tests" 2019-04-26 02:28:08 +00:00
Takashi NATSUME fe4138aea4 Updates for OpenDev transition
Replace 'git.openstack.org' with 'opendev.org'
in contributor/index.rst.
Update URLs in other places as well though there are redirects.

See the following URLs for more details:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Change-Id: Ifb9f4274d2fd0fa81e7501fe176eeead3acd0e3e
2019-04-23 01:18:31 +00:00
zhangyangyang f970589f9b Drop py35 tests
Drop py35 tests because all the integration testing
has been moved to Bionic.

See the following URL for more details.

http://lists.openstack.org/pipermail/openstack-discuss/2019-April/005097.html

Co-Authored-By: Takashi Natsume <natsume.takashi@lab.ntt.co.jp>
Change-Id: Ied64e92d5833ed11e1213c42994cfebeaa2ace6a
Signed-off-by: zhangyangyang <zhangyangyang@unionpay.com>
2019-04-22 22:28:33 +09:00
ZhijunWei 85e9b58e9b Update hacking version
1. update hacking version to latest
2. fix the pep8 failed

Change-Id: I484a40fe3cb868d223a807edcd3e20f5e0ebdf4e
2019-01-04 14:46:07 +08:00
Stephen Finucane fd9670bd41 docs: Add redirects
These were missed for some reason. Let's add them now.

While we're here, we add the '-d DOCTREE_DIR' argument to our
'sphinx-build' call to handle Sphinx 1.8's change in behavior for where
doctrees are output.

Change-Id: I5c862a74f92a44bf5248f858e26826eef76c11f0
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2018-09-24 15:18:06 +01:00
Takashi NATSUME 9d8eda8b82 Follow the new PTI for document build
- Follow new PTI for docs build
- Add sphinxcontrib.apidoc to replace pbr autodoc

REF:
https://governance.openstack.org/tc/reference/project-testing-interface.html
http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html
http://lists.openstack.org/pipermail/openstack-dev/2018-March/128594.html

Change-Id: Ic66fe4d5488c7777439a416fbf86d37af807804d
Closes-Bug: #1792115
2018-09-13 04:57:03 +09:00
Vu Cong Tuan 32a3244bb4 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: I55060b1d99b9a00b20c98fbb429d072568265695
2018-07-16 15:43:48 +07:00
Matt Riedemann 7759b4b46d Remove doc/build when building docs
Wipe out the existing doc/build when rebuilding the docs.

Change-Id: Idd7f6dc171425402b8d7ff7962dc09e7c576986b
2018-06-15 10:02:37 -04:00
Doug Hellmann e23c448c32 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: I2cb16250241781abe7c5a7d7de37612f07ff2b0b
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-06 17:58:18 -04:00
Doug Hellmann f36390dbce 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: I5c23fc5f4e31b461255865fb8973cc05c448e364
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-22 17:57:39 -04:00
Nguyen Hai c0f2f96d2f Fix local test fails with pypy
tox: ERROR: pypy: InterpreterNotFound: pypy

Maybe we need to remove pypy-constraints from envlist in tox.ini
because there is no effect to review.

Change-Id: I1ff1cb103dcaad1396bc2bda487165feae6b0931
Closes-Bug: #1756108
2018-03-15 14:57:17 +00:00
Matt Riedemann b91ca62aea Fix being able to create a reno using tox -e venv
Iace251446bafbd8963bc5a073de50ade583f6e46 moved the
reno dependency to a new requirements file which broke
the ability to create a release note using:

  tox -e venv -- reno new <slug>

This fixes it by adding the doc/requirements into the
venv tox environment.

Change-Id: I243d4d5148964511a83855d2b1b451aa1543b98b
2018-01-11 15:50:54 -05:00
Guoqiang Ding d68f26ab95 Update new documentation PTI jobs
For compliance with the Project Testing Interface as described in [1].
For more detailed information, please refer to [2].

[1] https://governance.openstack.org/tc/reference/project-testing-interface.html
[2] http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Change-Id: Iace251446bafbd8963bc5a073de50ade583f6e46
2017-12-28 23:59:44 +08:00
Andreas Jaeger aede01a0a8 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: I7f06c0be47f57a9c1ee3cadc7328b1b1b138b3cd
2017-12-02 16:52:17 +00:00
Andrey Kurilin 00ffdef3d5 [ci] Use pseudo-random names for new resources
Random names of resources makes the task impossible to find a test which
doesn't clean resources after a launch.

This patch changes name_generate method to generate names including a name
of the test, which can be really helpful.

Also, the simple script that prints resources after test run is added.

Change-Id: Id3a743afb624dd4bf8ed3523a1916455fd93655a
2017-11-23 16:52:04 +00:00
Eric Brown 4746e0bb58 Remove py34 tox env and pypi classifier
Currently only py27 and py35 (not py34) is tested in the gate, so
py34 should no longer be part of the tox environment or part of the
PyPi classifier.

Change-Id: I81058c5df47c4dae3c331d0030141896b6a9f1bb
2017-03-20 19:06:51 +00:00
Jeremy Liu e81b81a027 Enable coverage report in console output
Currently, the coverage test job doesn't provide any test result
to developer, we could enable coverage report in console output
to let the developer know the coverage status when running coverage
test job.
Change-Id: I12764de112e948129e21732faae03562649522fc
2017-01-13 14:14:21 +08:00
Matt Riedemann c7162854f7 Use upper-constraints when running tox
This is basically a copy of the template used in oslo.messaging
under change 78f113780510b741bc974c69eb9b0718cd657c1d.

Change-Id: I8be883215f27abb58d15b85e8542cbdf32000bac
2016-11-29 11:33:42 -05:00
Tony Xu 8ae2e4c8a1 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: Ic80a40692726b05f0f9d174f6ba7e7040f30db38
2016-10-26 10:26:48 +08:00
Sean Dague 04613efbcf Make novaclient functional tests use pretty tox
This makes local running of the tests much nicer as we can see the
progress of successful tests working around the testr issue of showing
no output until the end of the run.

Change-Id: I4adc965fd95b6e79a3ec26614d1c9f98262593b9
2016-08-12 06:34:21 -04:00
Andreas Jaeger d6ca9e2d74 List system dependencies for running common tests
Add an other-requirements.txt file containing a cross-platform list
of dependencies needed for running included tox-based tests. Also
include a tox environment for convenience calling the bindep[*]
utility to list any missing system requirements.

This change is self-testing.

For other-requirements.txt see also
http://docs.openstack.org/infra/manual/drivers.html#package-requirements

[*] http://docs.openstack.org/infra/bindep/

Change-Id: I3c62f6924d2d70e23e6787b8da848fbeb0d52ddc
2016-06-29 09:23:55 +02:00
Jenkins c3884691a0 Merge "Removed unused Oslo Incubator code" 2016-03-29 14:34:25 +00:00
Ronald Bradford 7e7e5525d2 Removed unused Oslo Incubator code
This is part of graduating projects to using Oslo Libraries.
As this code is not actually used, it is simply removed.

Change-Id: Ib28a957d9a4622064ec5da2ae616ac6f0716bcbf
2016-03-22 18:31:21 -04:00
Christopher J Schaefer c5272b349b Adding tox support for bandit
Bandit is a code linter which is used to help identify potential
security vulnerabilities. As part of the plan to integrate bandit
into each OpenStack project, support for a tox testenv is step one.
Later, gate tests will also be incorporated.

Change-Id: Ib6ef0a3e8f32f2724314c166d7de50d591c0e949
2016-03-22 16:39:11 -05:00
Ralf Haferkamp 8a2ed13620 Allow to specify a network for functional tests
Currently the tests just attach instances to the first network returned
by "net-list". That might however not be the right thing in some
environments. This change allows to override the default network via the
environment variable "OS_NOVACLIENT_NETWORK". If not specified the
test will fallback to the old behaviour and just use the first network.

Closes-Bug: #1510975
Change-Id: Ie682111127584a33d8e96377d812d3a6352c760d
2016-02-16 12:43:04 +01:00
Andrey Kurilin 426f6afb3c Add functional tests launcher for py3 env
It would be nice to check not only unit test on py3 env, but functional
tests too.

Also, this patch fixes usage of xrange in functional tests.

Change-Id: I15ef204022583a40a02b3f2a48771347ddc95f3e
2016-01-15 13:25:33 +00:00
Janonymous 84c3cacd13 Put py34 first in the env order of tox
To solve the problem of "db type could
not be determined" on py34 we have to run first the py34 env to, then, run
py27. This patch puts py34 first on the tox.ini list of envs to avoid this
problem to happen.

Change-Id: I06c6a276b75eb2a3d69e94f467f26122d856d17c
Closes-bug: #1489059
2015-12-22 18:31:30 +05:30
Jenkins 865e084568 Merge "Deprecated tox -downloadcache option removed" 2015-12-16 14:04:54 +00:00
shu-mutou 0a736dd5df Drop py33 support
"Python 3.3 support is being dropped since OpenStack Liberty."
written in following URL.
https://wiki.openstack.org/wiki/Python3

And already the infra team and the oslo team are dropping py33
support from their projects.

Since we rely on oslo for a lot of our work, and depend on infra
for our CI, we should drop py33 support too.

Change-Id: Ic9d4f64154a5418baa159a4efdcd9dd652d142ff
Closes-Bug: #1526170
2015-12-15 16:26:20 +09:00
Ondřej Nový 6ac9f3a412 Deprecated tox -downloadcache option removed
Caching is enabled by default from pip version 6.0

More info:
https://testrun.org/tox/latest/config.html#confval-downloadcache=path
https://pip.pypa.io/en/stable/reference/pip_install/#caching

Change-Id: I22e710aae8bf34938a4f9ee85c566876a36c7bb1
2015-12-11 23:30:05 +01:00
Jenkins 51df01e972 Merge "Remove python 2.6 support from python-novaclient" 2015-12-02 20:43:32 +00:00
Chuck Carmack 81f8fa655c Remove python 2.6 support from python-novaclient
Since oslo is removing support for python 2.6, nova
needs to also remove support from clients and libraries.
This commit is to remove support from python-novaclient.

-- Python 2.6 compatibilty code was removed.
-- Python 2.6 was removed as a tox environment, install venv,
and from the classifiers in setup.cfg.
-- Release notes have been updated.

UpgradeImpact

Co-Authored-By: Andrey Kurilin <andr.kurilin@gmail.com>

Change-Id: I3f587ff38d478d075af5fd014e2b4b8416e185d4
Closes-bug: 1518390
2015-11-30 16:04:24 +00:00
Sylvain Bauza bb7956bfaa force releasenotes warnings to be treated as errors
Per http://lists.openstack.org/pipermail/openstack-dev/2015-November/080521.html,
we need to make sure that there are no warnings for reno.

Change-Id: I899d223f5347633a17ac5c7fb3991a3cd1f4c781
2015-11-28 00:57:58 +01:00