Commit Graph

63 Commits

Author SHA1 Message Date
Eyal f3feec4264 Fix tox 4 changes
Change-Id: Ia015800c59e46ae1cdae4510b8f51132585f92d0
2023-02-17 07:55:50 +00:00
Takashi Kajinami 5935f89f61 Fix passenv format unaccepted by tox 4
tox 4 does not accept updated its INI rules and the current format
violates the new rules.

https: //github.com/tox-dev/tox/blob/main/docs/upgrading.rst#changed-ini-rules
Change-Id: I9eb9d03d33661ed2bfc6ce5e57dba9656483c51e
2023-02-03 16:40:29 +00:00
wu.shiming 6a2374a675 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: Ieaefe4dcc6e8aade4a0022f4c632c6787fab3f9d
2021-09-18 11:57:04 +08:00
zhangboye 30f67bb2e2 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

Change-Id: I53f3d2e4581d46abe150c80550b3875bb9ec73b4
2021-05-03 09:14:28 +08:00
zhangboye f3b867b967 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: I61a58b0e66bcf47a24abd8d0539c92ee93da2020
2021-04-20 11:22:12 +08:00
Eyal 18da185816 Update TOX_CONSTRAINTS_FILE
UPPER_CONSTRAINTS_FILE is old name and deprecated
https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file

Change-Id: I2054ad3d54220317974c8f92490d8d5eff02de79
2020-11-17 12:56:12 +02:00
Zuul 5b8b04ff36 Merge "Remove check V320 in PY3" 2020-09-24 07:16:37 +00:00
Q.hongtao 9ec5f4de5f Remove six.text_type/b/u
Replace the following items with Python 3 style code.
- six.text_type
- six.b
- six.u

Like Any(str, six.text_type), currently only keep Any(str).

Change-Id: I735e8a8a670659123e533091916fd3bbedabb95e
2020-09-21 19:49:42 +08:00
Q.hongtao e59ffcfa81 Remove check V320 in PY3
Remove checks:no_direct_use_of_unicode_function, there is no unicode builtin in
python3.

Change-Id: Ief8c922637e562fcab20f3c97b496b950c7f36ea
2020-09-21 17:33:45 +08:00
zhangchun 33792a7d6b Remove install unnecessary packages
The docs  requirements migrated to doc/requirements.txt
we need not install things from requirements.txt.

Change-Id: I23863f545c34431e4a7358cd1064e5ab77cdf26e
2020-09-15 02:04:10 +00:00
Andreas Jaeger 13f2676a1f Cleanup py27 support
This repo is now testing only with Python 3, so let's 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
- Update classifiers
- Update requirements, no need for python_version anymore
- Cleanup doc/source/conf.py to remove now obsolete content.
- Use newer openstackdocstheme version
- Remove install_command from tox.ini, the default is fine,
  update constraints to current URL

Change-Id: I45fc7e79bc7abf266721d819f4f857d06a701724
2020-04-12 18:02:58 +00:00
Andreas Jaeger 6c3bb2fd5d Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Update local hacking checks for new flake8.

Remove hacking and friends from lower-constraints, they are not needed
to be installed at run-time.

Change-Id: I7b114906ddf173752d1a94dd8243ea2d37204256
2020-04-02 06:31:25 +00:00
Eyal 6e59549eaf Fix tox and update hacking
Change-Id: I2b181ddaa31862b8850996489149b6c491d9443f
2020-01-02 15:39:27 +02:00
Eyal 352cc33b81 Use only py3 as base
Depends-On: https://review.opendev.org/#/c/700512/
Change-Id: If5df9893cc248efd8b8369b4eaaaca352bdf95d7
2019-12-30 10:35:36 +00:00
Ghanshyam Mann 1aac4646f8 Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

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

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://review.opendev.org/#/c/691178/

Change-Id: Ia9339cc6397b680320909f98e4eb8aeb817ab5af
2019-10-30 06:10:27 +00:00
Corey Bryant d03f350b3c 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: I4f2c76702df42778f1231bf36ed5c3eb84aa787f
Story: #2005924
Task: #34255
2019-07-05 16:44:26 -04:00
Anusha Ramineni e5998619ed Switch python3 versions of test jobs to match Train PTI
In Train, we will use python 3.6 and 3.7 for python3 runtime
in our gate jobs [1]. This commit also adds python 3.7.

[1] https://governance.openstack.org/tc/reference/runtimes/train.html

Depends-On: https://review.opendev.org/#/c/667039/
Change-Id: Iac3770f6d833340579056998b5fa9c71df5b8660
2019-06-24 10:20:41 +00:00
zhulingjie 7fdda9f2c2 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: If820cd3866818f7283d8aa9559257166e0627cc5
2019-04-24 01:54:02 +08:00
Ghanshyam Mann 1a789c12f0 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: I0d658b3d18686845dc4d388ebbba32a0fc41529c
2019-04-15 23:46:28 +00:00
Sean McGinnis 1e894aedd4 Remove setup.py check from pep8 job
Using "python setup.py check -r -s" method of checking the package has
been deprecated with the new recommendation to build the sdist and
wheel, then running "twine check" against the output.

Luckily, there is already a job that covers this that only runs when the
README, setup.py, or setup.cfg files change, making running this in the
pep8 job redundant. This is covered by the test-release-openstack-python3
that is defined in the publish-to-pypi-python3 template.

More details can be found in this mailing list post:

http://lists.openstack.org/pipermail/openstack-dev/2018-October/136136.html

Change-Id: I60ab96b2f69748e9fad65a73f168b414c14a857a
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2018-10-30 11:13:44 -05:00
confi-surya 9afe196a57 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: Ia70c6f9d6b1efb8bb030673284e0d364c3b5ff0c
2018-10-09 14:37:33 +05:30
Eyal 5b0acfce27 Add py36 to tox
Change-Id: I5f99c503c12b16fdc83a1e1b556cd14d8b8805e7
2018-09-02 08:41:39 +03:00
Vu Cong Tuan d0da90b890 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: Ib7b19bed1a16c0864068066fdb5b9e45595dd228
2018-07-16 13:51:32 +07:00
Ifat Afek d0af1a0428 Add .rst files check to pep8
Errors in README.rst prevent the package from being registered in Pypi. We would like pep8 to fail in these cases.
For more details, see: http://lists.openstack.org/pipermail/openstack-dev/2018-June/131233.html

Change-Id: Ic6f92abd09740372a829b9a58902e1c8f63b5bcc
2018-06-19 11:03:25 +00:00
Doug Hellmann e2536fa3fa 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: I82c3b74bb0346fa1742a97c00f2b5f3fb26263e9
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-06 16:06:05 -04:00
Zuul 5e37cca8a0 Merge "Enable Hacking H104 rule" 2018-06-04 20:00:34 +00:00
Ivan Kolodyazhny 1c30f8aa47 Enable Hacking H104 rule
According to [1] files with no code shouldn’t contain any license header
or comments, and must be left completely empty. This patch cleaups the
code and enables H104 checking in the tox 'pep8' environment.

[1] https://docs.openstack.org/hacking/latest/user/hacking.html#openstack-licensing

Change-Id: I2528af3579b0426fff24796e94978fcba5001f6e
2018-06-04 07:22:41 +00:00
Ivan Kolodyazhny f1795bafbf Fix 'tox -e releasenotes' startup
Change-Id: Ibca5d700371f3d649c3656d2e85a773ae7751d08
2018-05-24 23:01:32 -07:00
Yujun Zhang 89a0d974e5 Add tool for datasource scaffold
Implements: blueprint datasource-scaffold
Change-Id: If853de3cd00e9d7ca4a93fdc409c6f0059dbc817
2018-05-10 09:18:53 +08:00
Zuul 2688bfb910 Merge "add python version number to db file" 2018-03-27 10:50:04 +00:00
Eyal e3127cef29 add python version number to db file
this way we can run detox instead of tox
and it will make tox run faster on our dev machines

Change-Id: I9ff327edb1b1d0842ba14fe90784321c4ee27da0
2018-03-27 09:08:04 +03:00
Doug Hellmann efe467bb51 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: I0c0ecafd9f600869accabe3c8195d40767f21341
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-22 19:08:01 -04:00
Eyal 3d37a3ea66 move to stestr
testr is not maintained any more

Depends-On: I574414aba16377cc550111b9bcd627c28f04fc49
Change-Id: Ibea81c6583300074cfed3c1fa7fb98e2d1dc90fc
2018-02-22 15:03:26 +00:00
gaofei 14c4b8bc71 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: I653631f5eb0d2024d7457d576d7dfd9b38543d20
2018-01-25 03:41:59 +00:00
Yujun Zhang de26e6afde Update docs build job for new documentation PTI jobs
openstack infra use a new way for building documents[1]

[1]:See http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html for details

Change-Id: I8bdaa16706d0f4040b9c2e8ece639a59ffc52305
2017-12-20 14:19:51 +08:00
Eyal a6ede3f6bc dont run py27 and py35 in parallel
we have some issues with the db testing
use one worker until we fix it

Change-Id: If04e25601d57ded4cb59a71ca34411609f05a758
2017-12-18 15:03:11 +02:00
Vu Cong Tuan 915f97d93f Apply pep8 check to app.wsgi
Because app.wsgi should meet pep8 standards,
this patch apply pep8 check to app.wsgi.

Change-Id: Ie81361de324b7b297025c2b6a2d3ef33c739aa6d
2017-11-28 15:22:34 +07:00
Zuul e525801ff5 Merge "Register default policies in code" 2017-11-20 03:24:06 +00:00
Eyal 024e9b1fd9 add hacking module
Change-Id: I7f89cade9fbb9e24a3acc7783ad67820d8cfcabb
2017-11-12 16:41:18 +02:00
Lance Bragstad d3ae72dd00 Register default policies in code
This commit attempts to move default policies from a policy.json
file into oslo.policy objects. This is an effort to make policy
easier to maintain for operators and is a community-wide goal for
the Queens release.

For more information on this initiative, please see:

  https://governance.openstack.org/tc/goals/queens/policy-in-code.html

Co-authored-By: Hieu LE <hieulq@vn.fujitsu.com>
bp policy-and-docs-in-code

Change-Id: I8ce4fc45447b41930736d6fcf85e6d35cfbe9d56
2017-11-12 09:30:12 +00:00
Jenkins 494e2dad9f Merge "Enable some off-by-default checks" 2017-07-09 11:22:05 +00:00
loooosy ac059ea575 Enable some off-by-default checks
Some of the available checks are disabled by default, like:
[H106] Don’t put vim configuration in source files
[H203] Use assertIs(Not)None to check for None

Depends-On: Ib6451504530f932ebd63374618d213ff7086dd1c
Change-Id: I1e81dd00d6c19574382d3c065826255879708833
2017-07-09 06:31:00 +00:00
Jenkins 98806ade0d Merge "Aligning install guide with the Pike doc structure" 2017-07-05 11:33:51 +00:00
csatari c9ea8ea4a1 Aligning install guide with the Pike doc structure
In Pike OpenStack documentation is changed in a way that the project repos
contain most of the documentation material [1]. This affcects how the doc
folder shall be strucutred inside the project repo. With this change I
align the install guide to the new structure and correct the warnings
during the document generation. The overall work is tracked in [2].

[1]: http://specs.openstack.org/openstack/docs-specs/specs/pike/os-manuals-migration.html
[2]: https://etherpad.openstack.org/p/doc-migration-tracking

Change-Id: Ib5400247d2ba5f8dac80ef68a43d06868bd42f1c
Depends-On: Ia750cb049c0f53a234ea70ce1f2bbbb7a2aa9454
Signed-off-by: csatari <gergely.csatari@nokia.com>
2017-07-03 13:22:52 +02:00
Kien Nguyen 5756e2e6a3 Pass environment variables of proxy to tox
When a development environment is under a proxy, tox is failed even if
environment variables of the proxy are set.

This patch fix this problem. Refer patch set [1]

[1] https://review.openstack.org/#/c/189569

Change-Id: Id4046c5be169907a2038f4a67bd984825f9621ea
2017-06-25 18:16:09 +07:00
Eyal 89b27980e2 remove tox warnning
fix "test command found but not installed in testenv"
by adding the full path

fix "WARNING:stevedore.named:Could not load oslo.db"

Change-Id: Idf757e1ba7e1e1410a9083a2127905a798a5ab8f
2017-06-15 11:52:09 +03:00
rajat29 4e6228d5ff Add 'rm -f .testrepository/times.dbm' command in testenv
Running py2* post py3* tests results in error. Add
'rm -f .testrepository/times.dbm' command in testenv to
resolve this.

Change-Id: I725b7f4dcbed537577b99f4b9f13a74e2e4c26e7
2017-04-25 13:31:26 +05:30
dongwenjuan a165ea7fff fix the command of test cover
Change-Id: If0c87558913cfca41c0557f525dd6b2bb81bdd7f
Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
2017-03-19 13:52:56 +08:00
Jenkins dd89796c27 Merge "Enable coverage report in console output" 2017-02-26 15:26:59 +00:00
csatari 2f4138a642 Cookiecutting install guide
Adding the framework for an install guide.

Change-Id: Ic5036706229b32c914f49b693385164a801464e7
Signed-off-by: csatari <gergely.csatari@nokia.com>
2017-02-23 17:11:21 +01:00