Commit Graph

21 Commits

Author SHA1 Message Date
Stephen Finucane 8aa8e71799 tox: Don't use distutils entrypoint for coverage
This is deprecated in pbr. While we're here, we also clean up some
formatting and remove an unnecessary MANIFEST.in file (pbr doesn't need
these)

Change-Id: I9d5023a083905da76c20bde503a6ec65f0849573
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-10-21 10:15:17 +01:00
Zuul fc3f5d0538 Merge "Use py3 as the default runtime for tox" 2020-12-11 15:59:18 +00:00
Hervé Beraud adb453580a 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: I58f31536e240234156f402d3683af25263604122
2020-11-04 10:54:49 +01:00
Hervé Beraud 188e83325d 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: Ia1a3fd90a66a655cdc46ab055857ce828247025a
2020-11-04 10:08:08 +01:00
zhoulinhui 24a88c86bf Bump py37 to py38 in tox.ini
for now,  we should test py38 by default.

refer: https://governance.openstack.org/tc/reference/runtimes/victoria.html

Change-Id: Ic239cc78903817d503f3a63f9b02e1e2937510e9
2020-10-28 23:00:33 +08:00
zhoulinhui ae88bef00a Stop install unnecessary packages when run tox -edocs
requirements.txt is unnecessary when run tox -e docs,
docs relative stuffs is in doc/requirements.txt, this ps to
remove the requirements.txt from tox.ini

Change-Id: I69b5a12128669de877a27fbbd09ffde8d8149508
2020-10-03 00:48:31 +08:00
Hervé Beraud 093c9f2f90 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: Ib2e545d2dc93e18055ade232599e76f319a44e6b
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-09-15 15:00:05 +02:00
Andreas Jaeger 8cb0072adb Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found by updated hacking version.

Change-Id: I4a4ec207f87d3afb58b6427825ce9b3872823008
2020-03-30 12:01:47 +00:00
Andreas Jaeger ac100a7b76 [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: I3cf8525b430031303dd0ecfbb6719ec935f6dd91
2020-02-03 17:34:04 +01:00
Corey Bryant 678238dec2 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: Ifc243b812803ec7a015bd2bf53988d9567fca116
Story: #2005924
Task: #34205
2019-06-24 16:09:00 +01:00
Andreas Jaeger f8557cb63d Update Testing for Train
Test python 3.7 instead of 3.5 for Train now.
Update docs building to have separate dir for dirtrees so that they do
no get published.

Change-Id: Ica60dc6ffa6c14e0a07489ac8a8b2be4800caa31
2019-04-26 11:26:10 +02:00
zhulingjie d9d4cb5399 Replace git.openstack.org URLs with opendev.org URLs
Thorough replacement of git.openstack.org URLs with their opendev.org counterparts.

Change-Id: I69c284629a52b6db879d6a90f4a25b8c8d06150c
2019-04-25 16:31:25 +00:00
Andreas Jaeger ec28fa9d8b Fix sphinx-build invocation
We need to publish to doc/build/html, fix this.

Change-Id: If2a18bb1d3d0a22e84904d5caab2fd4a6f7a52cf
2018-08-14 13:46:24 -04:00
Graham Hayes d6805491ed General overhaul of testing setup
- Moved to py3 by default
- Moved to testr
- Updated docs venv to match PTI
- Fixed a slight py3 compat issue
- Added py35 and py36 jobs

Change-Id: Id3a8c1c30ecfe9b6538bff6357aecca7ecd0ed81
Signed-off-by: Graham Hayes <gr@ham.ie>
2018-06-18 14:36:12 +01:00
Monty Taylor 7a389a1ff4 Fix Zuul jobs
The jobs are not working with Zuul v3 as is, we need
to update all job configuration and add a new job

1) Add os-api-ref-nova-src job

Replace the legacy version with a new shiny one.

2)
Avoid tox_install.sh for constraints support

Follow https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh, we can build without it.

Depends-On: I97448d681e3e48753496818fa248ee96dd36d65b
Change-Id: Ia9c8672c820a415746e43d3b1fccb2df2f574b24
2017-12-01 04:43:01 +01:00
Dirk Mueller 973fdbf884 Remove unconstraint package installation
tox_install.sh already takes care of package installation, respecting
upper constraints. we don't need to rerun installation without
constraints afterwards.

Change-Id: I6599d1532daba8dbabbbf2a15dfb4d2b08b8c981
2017-07-05 21:48:38 +02:00
Tony Breeds 54ead9f913 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 os-api-ref.

Change-Id: I7ad1c2afda29b095ff3d53db5eec7101f8816c2e
2016-12-21 12:01:43 +11:00
Sean Dague f2e6951fe3 make testing be non parallel
sphinx and sphinx_testing doesn't appear to be fully concurrent
safe. For now, lets just run in a single process.

Change-Id: I0b1bd24878a7641bc8c456141bf091b48c19619d
2016-05-27 16:04:12 -04:00
Sean Dague 3b57498d2f Import the sphinx extension from nova
This mirrors in the version of the sphinx extension from Nova commit
1f67ab311422234335cda0e21e74186524617904 which includes the warnings
for out of order parameters.yaml files.

Static assets are stored in the assets/ sub directory, which includes:

* bootstrap files (including fonts) - MIT licensed
* api-site specific js and css fixes

The extension is updated to move these assets into the build directory
when building html, and to register these assets when we first start
up.

pep8 126 error fixed, and E129 ignored (because it's not compatible
with emacs indentation, and annoys me).

This builds the Nova api-ref tree correctly, which is not bad for a
Friday afternoon.

Change-Id: Ifd4fd570c8dbd981564326486f79b826f059543f
2016-05-13 19:54:20 -04:00
Sean Dague 540e1f3b7d remove constraints, we're not going to use that
Change-Id: I426928daa13b7cca66e75d20235abcb0ab6c63ae
2016-05-13 19:54:13 -04:00
Sean Dague 6e03e0b62d Initial Cookiecutter Commit.
Change-Id: I28402285aaeecd4eb85415a39763b2798fcfa33c
2016-05-13 19:54:08 -04:00