Commit Graph

30 Commits

Author SHA1 Message Date
Takashi Kajinami 8432e555dc Display coverage report
... for easy reference. Also make sure old data is purged.

Change-Id: I215992696eecbf3f825464be81233167287a4242
2024-02-07 12:15:42 +09:00
Hervé Beraud eeedfc902a clean up tox's python 3 specific conf
Change-Id: I18cadf6a3f5cb754d08b3c4fde363c7eb9fca8e0
2023-02-17 14:08:55 +01:00
Hervé Beraud e00ed8d844 Fix issues related to tox4
Change-Id: Ie3c21c4e38de766077b612d0bf6a69809829f3c9
2023-02-17 10:38:08 +01:00
Stephen Finucane 8a43c37004 Remove lower-constraints remnants
These were missed in change I3eafc92ba7c7305b1a73d3f96c427ed12c96dbf7.

Change-Id: Idf7148bcf588efbd20352bf2160ecee573156444
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-02-11 12:03:16 +00:00
Zuul c4d03743aa Merge "Use py3 as the default runtime for tox" 2020-12-11 14:29:30 +00:00
Hervé Beraud 20b199e36d 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: I6d07e0ed66edc95f4afec6829b46fca679cd5814
2020-11-04 10:51:29 +01:00
Hervé Beraud 09c42beb5e 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: I3a98d1c258389968a892d6ccd067d3b8fb78a29a
2020-11-04 10:05:16 +01:00
Hervé Beraud 85abe44233 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: I8d5290d62b12a7850fc932c3778cc37951dd67ed
Co-authored-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-09-03 14:10:56 +02:00
Sean McGinnis 87d2e49068
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: I9513860cc02287ab987d22f3403bb19bd07c28a9
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 10:25:52 -05:00
Andreas Jaeger b93610d0e3 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Ignore W504 line break after binary operator

Change-Id: Ice5627d714bad308bcf2e467a553d2d2297ea337
2020-03-30 12:03:13 +00:00
Hervé Beraud 0d84429800 [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: I99e49c84779439317a9f13307c7e7d2fc092d7fb
Sem-Ver: api-break
2020-02-06 10:26:31 +01:00
Hervé Beraud 2837bff516 tox: Trivial cleanup
Move 'basepython' to the top-level 'testenv'.
Use the default 'install_command'

https://tox.readthedocs.io/en/latest/config.html#conf-install_command

Change-Id: I7c672f05753886e234430c760f1afc1ed01ff2a3
2020-01-30 12:01:47 +00:00
caoyuan 9e70fdadee tox: Keeping going with docs
Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
suggests, keeps the build running when it encounters non-fatal errors.
This is exceptionally useful in avoiding a continuous edit-build loop
when undertaking large doc reworks where multiple errors may be
introduced.

[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045

Change-Id: I2831ab17d943638062b709882c7a1cc481e46476
2019-10-26 00:07:16 +08:00
pengyuesheng c8b6c3e1a7 Update the constraints url
For more detail, see http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: I99801531605e49ca542859ea341fc16a883d91a2
2019-09-25 14:01:00 +08:00
Zuul e1df576e98 Merge "Move doc related modules to doc/requirements.txt" 2019-08-12 13:35:57 +00:00
Corey Bryant 9ebc36154e 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: I12378dfb0179e47905714a44686d6f5f94286807
Story: #2005924
Task: #34234
2019-07-05 15:09:45 -04:00
caoyuan c80448dd8b Move doc related modules to doc/requirements.txt
Change-Id: I3d2e5e2322ac8374881f76217e35792efeea073a
2019-07-06 01:31:31 +08:00
jacky06 0430df334a Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I2f218a19be6f8809c396399e48e2d5ed6b3f6fd9
2019-05-27 03:10:08 +00:00
Charles Short 49800949ec Change python3.5 job to python3.7 job on Stein+
python3.5 was the only supported python3 version on Xenial, now that we have
Bionic Beaver nodes that support python3.7, lets switch to testing with
python3.7 in addition with python3.6 in Stein and beyond.
See ML discussion here [1] for context.

[1] http://lists.openstack.org/pipermail/openstack-dev/2018-October/135632.html

Change-Id: Ib687a18cd86c64c7f3959e079646c13ad012dd01
Signed-off-by: Charles Short <chucks@redhat.com>
Story: #2004073
Task: #27440
2019-02-14 10:27:06 +00:00
Stephen Finucane d48ef196d2 doc: Remove crud from conf.py file
The 'releasenotes' directory is excluded from pep8 checks like the 'doc'
directory already is.

Change-Id: If8b034fd59e09d7adcf4ac74868ca102445d7458
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2018-12-13 14:44:21 +00:00
Ben Nemec a5039dae1d Add reno support
Change-Id: I05e50ae0b6e96e2d793dcd14d76ac0f990d88e36
2018-10-09 21:56:06 +00:00
Doug Hellmann dab96f3911 enable debug output for tests
Change-Id: Iee6bd1af71ce59af0772e95fc21514c087fa0f07
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-10-08 12:57:38 -04:00
Ben Nemec 0fb6675918 Modernize tox.ini
The -constraints venvs have gone away and constraints are just the
default setting. Also updates the list of default envs.

Change-Id: I8c442df1cacf6077febc6e26b66d134496ae7a3c
2018-09-26 20:51:45 +00:00
Ben Nemec dc56b1239e Use sphinx-build for all docs venvs
This was incorrect in oslo-cookiecutter.

Change-Id: I2c3d945df4f69088763631bab72804cf5866a7c1
2018-09-21 21:36:01 +00:00
Ben Nemec 9374bdadc2 Add lower-constraints job
Change-Id: Ie17927af03d0a14983454d009fbc28b2f214681b
2018-09-21 21:36:01 +00:00
Ben Nemec 2458b6a561 Use python3 by default
Change-Id: I304afabc670a2a61297b11ab3a5934e56cc4e1b8
2018-09-20 15:45:58 +00:00
Ben Nemec 18b94499d8 Get coverage job working
Add a simple test that imports the module so there is coverage data
available and fix the coverage config so it is looking at the
correct locations.
2018-09-13 16:17:56 +00:00
Ben Nemec 574fd4d3ef Migrate to stestr 2018-09-13 15:50:37 +00:00
Ben Nemec 1f333e1aea Add i18n support
There are translatable strings in this library and we need to
support that properly. Replace the stub _() with a proper
implementation based on oslo.i18n.
2018-09-12 22:28:44 +00:00
Ben Nemec d671294399 Initial commit 2018-09-12 17:35:58 +00:00