Commit Graph

33 Commits

Author SHA1 Message Date
wu.shiming 6878dbb4d8 Remove lower-constraints remnants
These were missed in change: I36fb12c92823d27e42975d4dc683ad8d99191a77

Change-Id: Ic757469ae8c9af7b0f83f94e2d902f33385f60ef
2021-02-20 09:47:22 +08:00
Hervé Beraud bbe0b094a0 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: Ib9ef556d8f63fdba1901717360af4cbd86faa0e7
2020-11-04 10:45:57 +01:00
Hervé Beraud 2c8ba37f5a 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: Ica69c0f76229aad8e9feadd76b2fd69a0df116c8
2020-11-03 16:14:43 +01:00
Hervé Beraud be7bc9ecf9 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: I382aa79f7357a86af11783f59e0f1680d5bed8d0
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-09-22 10:37:04 +02:00
Daniel Bengtsson 9a4450c197 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.

Change-Id: I5b5652c5009196bebf9ee9e65102cb0f1aa33837
2020-02-14 15:59:07 +01:00
Andreas Jaeger 88a34966d7 Move docs linting to pep8
pep8 is our linting target, move linting runs to it.

Change-Id: I68f619f21b3df4e73bdb206754bf4449464007bb
2020-02-04 11:20:11 +01:00
Andreas Jaeger 3e241f33da [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

Cleanup tox.ini and setup.cfg from old cruft, use sphinx-build.

Change-Id: I395558c888d31925c26571f62ffc1ea556f2e2c4
Co-Authored-By: Hervé Beraud <hberaud@redhat.com>
2020-02-04 10:28:51 +01:00
Zuul 0be4911f90 Merge "Add Python 3 Train unit tests" 2019-07-16 22:36:25 +00:00
Corey Bryant 47b2e16ee8 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: Id890698cfc352183f206fc92a5f49cdb433cad49
Story: #2005924
Task: #34234
2019-07-05 14:39:10 -04:00
caoyuan cda35c5112 Replace git.openstack.org URLs with opendev.org URLs
1. Replace git.openstack.org URLs with opendev.org URLs
2. Remove unncessary "=="
3. Update some URLs to latest

Change-Id: Ie92843a4c2367060f6d4aae7a5766465c7766096
2019-06-27 21:03:07 +08:00
Ghanshyam Mann 4ffb9a2933 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: I28c2239bc31f3dd3b52eefa417fc4e29cee9b241
2019-04-15 18:32:00 +00:00
98k a41c4d69a6 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: I9042c3d9ed48e26b541e22bb4c0dd272d48e3965
2018-10-09 20:52:10 +00:00
Vu Cong Tuan d3165af5b9 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: Ie84d18b0bcc2a33587bd72204c0eb3dad687be7e
2018-07-09 16:15:47 +07:00
Doug Hellmann 858f15d9e3 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: I10eafa030e4ab97f55d17b2497fa87492a18336e
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-06 14:53:48 -04:00
Doug Hellmann 821478ab08 remove obsolete tox environments
We no longer need to support 3.4 and 3.5 is covered by the default
debug environment.

Change-Id: I1ca069ea14c619bf64101c1c84bd1b4c3a2d2691
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-16 11:16:59 -04:00
Doug Hellmann 03292afea5 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: I07f2186cb7771b3a83ccc4ce9ba3b79253c4757c
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-16 11:16:59 -04:00
Doug Hellmann d8e616d274 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: Ib7f87445039e8e71edbe52b985c632bc4da29174
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-24 21:02:07 -04:00
Anusree 17ffa68c93 pypy is not checked at gate
Change-Id: Ife5ecf3c6acfd0df611fbe2d56af10bad881c3fb
2018-03-21 18:26:09 +05:30
Andreas Jaeger e1271aaa97 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: Ie77e688e08aba4df73d127fab024de3879766840
2017-12-02 17:02:58 +00:00
kavithahr b92d5835b1 Python 3.4 support has been removed
Change-Id: I298c905e96b9d7963a35ddcef03e4f84a25d9a23
2017-03-07 17:45:42 +05:30
Tony Breeds 00d2db18a9 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 debtcollector.

Change-Id: Ie1e79f7bd0cb2a6b20d0485e12cd05522c2a0f9f
2016-12-20 15:41:19 +11:00
ChangBo Guo(gcb) bf30142ea4 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: Ia8a357ce4a42176b9bc46a715aef7158310c2cf0
2016-11-01 15:52:47 +08:00
Wei Li 4e9659aaed Drop *openstack/common* in flake8 exclude list
There is not this directory in debtcollector,so we should drop it
for improving searching efficiency.

Change-Id: Icbdd997b525708896c88a0a207f92ff958bae3ab
2016-08-02 20:10:29 +08:00
ChangBo Guo(gcb) 18f7de4de1 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 and removes py33 venv.

Change-Id: I849e9df878b18f89424c846511bc131644ccae48
2016-07-12 15:20:58 +08:00
caoyue 20184996ff Add debug testenv in tox
Once we add debug testenv, we can use "tox -e debug -- --debug"
to debug test cases when tox is running.

Change-Id: Id4372ca37664735af54d8c78b70a8668008df4d6
2016-01-13 14:13:00 +08:00
janonymous 958d79dfc4 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: I69d9f971deb8cd124a96f7c85d007c61d953b6c5
2015-12-26 13:44:00 +05:30
Davanum Srinivas 3264c37c7d Remove python 2.6 and cleanup tox.ini
* Remove support for python 2.6
* Remove skipsdist : Needs to be set only if 
  sdist is expensive
* Remove usedevelop : only needed when skipsdist 
  is set to True
* Remove install_command : We can just use the 
  default, we don't need to override
* Remove setenv : We can just use the default as
  we don't need any extra environment variables
* Remove requirements.txt from deps, as this is
  already added automatically


Change-Id: I7e45a5aba221e9b2204264f5e88b8ef1f6bd04e3
2015-11-16 00:23:55 +00:00
Joshua Harlow 35f61710d8 Include changelog/history in docs
Also moves doc8 to test-requirements.txt which should
be its more official home instead of being in tox.ini

Change-Id: If3836b211dbb47fa6bec36ac43367139bb939243
2015-09-24 15:38:46 -07:00
THOMAS J. COCOZZELLO d33f9527b3 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: Ib302d7386e0b55d869e528b95fb7bb6b27db3b97
2015-09-03 15:16:17 -05:00
Joshua Harlow 90799975b4 Expose a top level 'deprecate' function
To make it possible for easy usage of the message generating
formats that debtcollector uses, allow users to call into a
helper function that can be used to deprecate arbitrary things.

Closes-Bug: 1478676

Change-Id: I4d5b8fe44150ce2d6d5418a9f4e13812e6b558ce
2015-07-28 17:42:33 -07:00
Joshua Harlow 8e607d1853 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.

Change-Id: I618d44df1e153dd0156110a2657e2540908e9225
2015-07-14 22:02:15 -07:00
Joe Gordon bab8a5b26a Move to hacking 0.10
Release notes:
http://lists.openstack.org/pipermail/openstack-dev/2015-January/054165.html

Remove deleted hacking rules from tox.ini (H803)

Change-Id: I5135a05cddd2fe185c0603e311b44ead3849e439
2015-02-12 16:01:44 -08:00
Joshua Harlow 2c4e7d58dd Initial commit 2014-12-12 22:26:59 -08:00