Commit Graph

41 Commits

Author SHA1 Message Date
Zuul 554c285b80 Merge "Remove lower-constraints remnants" 2021-04-16 12:48:49 +00:00
Stephen Finucane 0faae131c9 tox: Remove references to testr
We use stestr now.

Change-Id: I3f7a2c89281a01b66b23b2fc984ed601c20ef112
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-02-11 12:31:54 +00:00
Stephen Finucane 283b8e26f1 Remove lower-constraints remnants
These were missed in change I2706e8af350d07e51169f8bc13c7404d4696b2a2

Change-Id: Ie6e15bdc948dcc918fd2eff344f804ac93434f1b
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-02-11 12:29:11 +00:00
Zuul 155c7c104e Merge "Use py3 as the default runtime for tox" 2021-01-21 18:23:47 +00:00
Zuul 89b67ddb9c Merge "Use TOX_CONSTRAINTS_FILE" 2021-01-14 13:13:20 +00:00
Riccardo Pittau fed5f89755 Remove six dependency
We run on Python 3 only, time to remove six dependency

Also fix l-c for new pip-resolver and move pep8 deps
in tox.ini to avoid conflicts.

And since we're here, update pre-commit config to support correct
hacking version.

Change-Id: Ibbe733c4be37d1a9dd9149d491591ef2e50dad6a
2020-12-12 08:08:06 +01:00
Hervé Beraud de336d03cd 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: I0689bf1a5e7f44fcdc4519932df291db679e0869
2020-11-04 10:45:37 +01:00
Hervé Beraud 86a214fc68 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: Iaaa6d1b7b0a957da75b0819c2d10b639463f9d23
2020-11-04 10:00:17 +01:00
Hervé Beraud 7d0648f8a3 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: I1e4625d34ed08218dd7069402a1eff1418f4ec35
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-09-15 17:41:13 +02:00
Sean McGinnis 5333050157
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: I803395e1448dae744707853387af5b01ec037b62
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 10:25:22 -05:00
Hervé Beraud 1161c1c60c Add python3 classifiers
Also prefer to lowercase `ignore_basepython_conflict` value to
uniformize with other oslo projects.

Change-Id: Ia5b47f1dd3b4aee25b1182620f61f05b0f1fb56f
2020-02-04 09:38:39 +00:00
Andreas Jaeger a1ed711037 [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

Cleanup some old cuft from setup.cfg.
Fix sphinx-build invocation to publish correctly.

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

Change-Id: I61b0dcd730be1889815e47a0c0c354d8f7759571
2020-02-03 16:06:32 +01:00
Stephen Finucane a857df2e5e trivial: Remove noise
Change-Id: I6d52fdd59be2a3be50a803b2b19621455765bfaf
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2019-12-18 16:58:48 +00:00
Hervé Beraud b43036ac05 Move doc requirements into dedicated file
For the sake of homogeneity between oslo project scope,
prefer to use doc/requirements.txt

Change-Id: I10acf283752d18cb98c8ad19b8af4758bed94679
2019-12-18 15:23:57 +00:00
pengyuesheng af394bb5f2 Update the constraints url
For more detail, see http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: Id183892a751ad1fee519388ec60a47df73cd6f66
2019-09-29 10:46:47 +08:00
Corey Bryant 5e82feb250 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: I3cb88c079088916164d82a0f5b253c22528c0543
Story: #2005924
Task: #34234
2019-07-05 14:37:41 -04:00
Elod Illes 50f3de69ae Add local bindep.txt
As it was announced [1] global bindep-fallback.txt was removed and now
projects need to have a local bindep.txt to be able to install binary
dependencies for testing.

In documentation zuul job graphviz package ('dot' command) is needed.
Without that the job fails with:
    dot command 'dot' cannot be run (needed for graphviz output),
    check the graphviz_dot setting

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-June/007272.html

Change-Id: Ib9a720379ca997f848212eeca68ed9f32e4ed349
2019-06-26 18:30:20 +02:00
Le Hou a9759e6b4d Update to opendev
Change-Id: Ie9e013284751e549921ea6652a50368050ae2b2d
2019-04-23 13:53:38 +08:00
Vu Cong Tuan ce03d76925 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: Ic388868baaf9a1204d4ad35f3467de564c1a56fa
2018-07-11 09:48:53 +07:00
Doug Hellmann 5d8233a402 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: I9a8f7b1734b23751e47297a15676219627969d7c
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-06 14:53:48 -04:00
Doug Hellmann 67b30930a3 fix list of default virtualenvs
Update the list of default virtualenvs that are run when a developer
just runs "tox" without specifying an environment.

Change-Id: I49c9203bb76f9cc075d7d7673d32daaf070bbfb7
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-13 15:48:27 -04:00
Doug Hellmann aa12fe5f74 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: I5ae4018191b6b78aa8abc22fd12e4c5ec1c02374
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-13 15:48:23 -04:00
Doug Hellmann f8623e5a3f 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: I0fb35cb5102c1a9a45671bcb7631fe005925543c
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-24 21:02:01 -04:00
Andreas Jaeger 67b25ef3d0 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: I9f2ad4af40ae0ce46a2e01d25e335820079ec66c
2017-12-02 17:05:59 +00:00
Vu Cong Tuan 4524cfe314 Remove support for py34
The gating on python 3.4 is restricted to <= Mitaka. This is due to
the change from Ubuntu Trusty to Xenial, where only python3.5 is
available. There is no need to continue to keep these settings.

Change-Id: I3463384984800d8bb53b030ea269c71449f9d06c
2017-06-05 11:15:01 +07:00
nizam ebfc4aa479 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: Iddfa88749f87e65454bfe0c10c7cf5c6301c4f27
2017-01-03 02:37:24 +00:00
Tony Breeds 5902d9878b 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 automaton.

Change-Id: Ibdd4d0a213bf1190e33c28c5c62561b083ae282d
2016-12-20 15:31:27 +11:00
Chuck Short 70a15588ac Add reno for release notes management
The release management team have indicated this is their preferred way
to collect release notes in future.

Change-Id: Ia0580eb513dd78779b9b2adb849627cf5e19f89b
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2016-11-03 18:54:30 -04:00
ChangBo Guo(gcb) e87dc55a48 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: Idb34ad4169d21af23ae02f9487ebfcebdb97f90b
2016-07-12 15:07:32 +08:00
Janonymous 1ff8815a25 Put py34 first in the envlist order of tox ,remove py33
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: I7a1fefad4931574f37290085a7c2f8aa80add095
Closes-bug: #1489059
2015-12-23 07:05:39 +05:30
Ondřej Nový 46ba7f2a7b 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: I7b99c04f94fb6b9e1da6942dc293a3a135b75d16
2015-12-11 21:10:24 +01:00
Davanum Srinivas 6c7f847eeb 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: I87c1fc87fb2a595b4453be6b33d679f0523cdea8
2015-11-16 00:18:45 +00:00
Ronald Bradford c3b7251de4 Added code coverage section to tox
Defined cover in tox.ini and added .coveragerc configuration
consistent with other projects

http://lists.openstack.org/pipermail/openstack-dev/2015-October/076193.html

Change-Id: I426f1081425ca9f8ea4297c665632954cc74bb8d
2015-10-05 17:10:31 -04:00
Joshua Harlow 318355ea71 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: Icc34899fc1b29b1d81cada1f97d61e47eb086abd
2015-09-24 15:02:07 -07:00
Tom Cocozzello b61e55a4cd 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: I8849dc5fb187c2278e99fe8c41322b5f2c139879
2015-07-29 11:48:57 -05:00
Joshua Harlow 01ee0381fe 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.

Also fixes the `get_callback_name` method which needs to check
if the __module__ is non-none (since it appears sphinx somehow
triggers it being none).

Change-Id: I54daecff219a9e9be71ff382d36fc2d5e67360cf
2015-07-16 14:47:27 -07:00
Joshua Harlow d71b6cf8b4 Revamp repo to match openstack repos
Get the repo in a working state so that it works
with the new and improved openstack CI system.

Change-Id: I80661c35fa7109a7ee9b1d00f89ca521a469eed0
2015-06-05 17:18:17 -07:00
Joshua Harlow 6f51cb8046 Fix the tox to install the right requirements 2014-12-05 17:10:01 -08:00
Joshua Harlow 76ed50160e Also install the main requirements.txt when using tox 2014-12-02 23:58:55 -08:00
Joshua Harlow fdb09f7383 Use the test-requirements.txt for tox.ini deps 2014-12-02 23:51:06 -08:00
Joshua Harlow ec9e8f2df4 Add needed testing requirement and tox.ini file 2014-12-02 23:50:17 -08:00