Commit Graph

92 Commits

Author SHA1 Message Date
Cyril Roelandt 320ea4b715 Tox4: remove skipsdist
This option causes the installation of the "glance" command to fail in
the functional tests. We have removed it from glance and glance_store in
the past to improve compatibility with tox>=4.0, so let us do the same
in glanceclient.

Change-Id: Ia5bf8d5f90e9cd98adc65c3fa80ce4c87eebad9c
2023-04-18 22:24:37 +02:00
Cyril Roelandt 6c95122777 Fix functional tests and docs generation
First, fix test_help(). A commit[1], which first appeared in Python
3.10, changes the output of the help feature of argparse. Options used
to be in a section named "Optional arguments:", and they are now in a
section named "Options:".

Second, tox 4 changes the behaviour of tox, and
{toxinidir}/requirements.txt is no longer installed automagically in the
docs virtual environment. This causes autodoc to fail on some imports.
We explicitely add {toxinidir}/requirements.txt to the list of
dependencies to fix this issue.

These issues should be fixed in separate patches, but since they both
block the CI, they depend on each other.

[1] https://github.com/python/cpython/pull/23858

Change-Id: Ia7866390b31f469bdea95624325a13aaf45a496e
Closes-Bug: #2002566
2023-01-12 14:05:25 +01:00
Zuul 4e7f83e887 Merge "Make "tox -edocs" generate the manpage" 2022-11-10 15:41:27 +00:00
Cyril Roelandt 75218d289e Delete python bytecode before every test run
Because python creates pyc files during tox runs, certain changes in the
tree, like branch switching or file deletion, can create spurious
errors.

Closes-Bug: #1368661

Change-Id: I93917b051039506d99837028700bc03337cf68f6
2022-08-02 18:09:50 +02:00
Takashi Kajinami be26283a37 Bump tox minversion to 3.18.0
Since tox 3.18.0, the whitelist_externals option has been deprecated in
favor of the new allow_list_externals option[1].

This change bumps the minversion of tox so that we can replace
the deprecated option.

[1] https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: I76f328b8bed1338ab5496d21e54a4b0ff9251147
2022-05-22 22:34:01 +09:00
Zuul 2bb489fe96 Merge "Remove lower-constraints.txt" 2022-03-11 19:57:05 +00:00
Zuul b4c3be8aac Merge "Replace deprecated UPPER_CONSTRAINTS_FILE variable" 2022-01-11 17:48:34 +00:00
Ghanshyam Mann e1b5e72120 Updating python testing classifier as per Yoga testing runtime
Yoga testing runtime[1] has been updated to add py39
testing as voting. Unit tests update are handled by the
job template change in openstack-zuul-job

- https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/820286

this commit updates the classifier in setup.cfg file.

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

Change-Id: Ibde540f7950a5ea27af5327dfa662ee9187171c8
2021-12-14 02:34:40 +00:00
XinxinShen 51c5c674c5 Replace deprecated UPPER_CONSTRAINTS_FILE variable
UPPER_CONSTRAINTS_FILE is old name and deprecated

[1] https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file

Co-Authored-By: Cyril Roelandt <cyril@redhat.com>
Change-Id: I8aec0f3ab5b33c6ee1ccd0fafafc7c3e447082db
2021-12-10 21:09:47 +00:00
Cyril Roelandt 3ba81da325 Remove lower-constraints.txt
Change-Id: If4881229935d6f2ca0f1632cc9a9ad473f8de33e
2021-12-10 17:45:39 +01:00
Cyril Roelandt 98f4219b6e Make "tox -edocs" generate the manpage
Closes-Bug: #911805
Change-Id: Idbf5ddc56c608588cc30616f4a0cc12c2e698b9c
2021-10-05 20:28:40 +02:00
Cyril Roelandt 00a6eb5f39 Remove F403, F812 and F821 from the ignorelist in tox.ini
They are not needed since no such errors are triggered when running
flake8.

Change-Id: If6ba0627ca680167378543b4c38135aa2bd6a730
2020-07-27 20:47:21 +02:00
Cyril Roelandt b513c8db4b Do not use the six library.
Change-Id: I3dbfcfa0f5f590a41ed549afd44537d8ed41433a
2020-06-23 21:51:07 +02:00
Sean McGinnis 490f808c4f
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: Id27c5ad8a9d4a00f37d4a3ff7f8a71780df50fb0
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 10:25:54 -05:00
Andreas Jaeger 82da2378ea Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Remove hacking and friends from lower-constraints, they are not needed
for installation.

Change-Id: I5ae47a7b11ff29a301e440c15daf30db7738485b
2020-04-02 15:48:09 +02:00
Zuul cab47f3e9b Merge "Replace git.openstack.org URLs with opendev.org URLs" 2020-03-26 15:44:06 +00:00
Erno Kuvaja 993406d57d Remove v1 tests
Change-Id: Ic6cb15670a42d0cea424f58d6a1d85d5471e162e
2020-02-19 09:34:42 +00:00
Ghanshyam Mann a4465dfc22 Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

python-glanceclient 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: I029d10a2860c5ba371ff9c5df9b7e2c645a7dfbb
2020-01-22 02:38:42 +00:00
Daniel Bengtsson 1f9fe0319b Stop configuring install_command in tox.
Currently, we are overriding 'install_command' to use 'pip'. This is
considered poor behavior and 'python -m pip' should be used instead:

https://snarky.ca/why-you-should-use-python-m-pip/

It turns out that this is the the default value provided by tox:

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

So we can remove the line and simply use the default value.

Change-Id: Idd3d92657a7c17370afc0d0c35cc4666025ab9d6
2019-11-15 10:19:00 +01:00
jacky06 e8d554fde7 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: Id02ac765028673ecabcb76d3f3014bbb383bc098
2019-08-24 10:47:42 +08:00
Zuul 7547179351 Merge "Add upper-constraints.txt to releasenotes tox environment" 2019-08-21 16:32:08 +00:00
Zuul 31f2fdae94 Merge "Modify the url of upper_constraints_file" 2019-07-31 08:12:49 +00:00
Corey Bryant fec518a6a3 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: I4f689ee8b9534952ca30db944e547cb7ca74a17f
Story: #2005924
Task: #34208
2019-06-25 13:32:16 +00:00
pengyuesheng 69ef9d81ce Modify the url of upper_constraints_file
Depends-On: http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: I63be5a18a8221f0ca2b1f2a96367288833e4a096
2019-06-19 12:22:51 +08:00
jacky06 b8ecb0bc03 Update hacking version
Use latest release 1.1.0 and compatible changes w.r.t pep8

Change-Id: Ifc3b96d98c1a7feff187f953d487e12135887fb9
2019-03-27 09:06:39 +00:00
huang.zhiping e3f4858094 Update min tox version to 2.0
The commands used by constraints need at least tox 2.0.  Update to
reflect reality, which should help with local running of constraints
targets.

Change-Id: Ic477c7af3687535d54d779cce071f3eb1fb5490c
Closes-Bug:  #1801676
2019-03-04 13:02:59 +00:00
98k 6a4b68bddc Add upper-constraints.txt to releasenotes tox environment
Without these dependencies, the releasenotes build does not actually
work.

Change-Id: I76285c90efec07edc25b22a846379e6d600fa036
2019-01-09 18:02:39 +00:00
Doug Hellmann f536541eb6 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: I8a41be18dac0fc3199ee5fa691a4ab48fae66849
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-07 17:51:28 -04:00
Zuul 0dfbfa611d Merge "Enable Python hash seed randomization in tests" 2018-06-06 02:43:03 +00:00
wangqi 7edb3783c7 Switch to using stestr
When the TC merged I2637dd714cbb6d38ef8b8dc1083e359207118284 we're
supposed to invoke stestr rather than testr so lets do that

Change-Id: I1b401c583d5e7677fc719bfc4eb2f2bba7b98cfa
2018-06-05 14:38:51 +00:00
Zuul 94aa58e89e Merge "Split glanceclient functional tests" 2018-04-12 17:17:19 +00:00
Nguyen Hai a8003eced7 Follow the new PTI for document build
- Follow new PTI for docs build
- Add sphinxcontrib.apidoc to replace pbr autodoc

REF:
https://governance.openstack.org/tc/reference/project-testing-interface.html
http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html
http://lists.openstack.org/pipermail/openstack-dev/2018-March/128594.html

Co-Authored-By: Nguyen Hai <nguyentrihai93@gmail.com>
Change-Id: Id16a5eaa57bc0d96332849abfb62898e6766ef86
2018-04-12 03:34:35 +00:00
Doug Hellmann 863fb3b20e 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: I6a7a78800caf3c536603ae0bcfeb03830c8a5860
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-09 10:27:34 -04:00
Brian Rosmaita 32b8307819 Split glanceclient functional tests
Prepare for the Image API v1 to be removed from glance during Rocky
by splitting the functional tests that hit v1 from the tests that hit
v2.  Introduce a new job that runs the functional-v1 tests against a
devstack running glance stable/queens, and configure this job for both
check and gate for the glanceclient.  The v2 functional tests
continue to be run for both check and gate against a devstack running
glance master.

Change-Id: Ifa98ada26a84e4cca3ea8c98173f61a6174cca27
2018-03-28 22:32:44 -04:00
Andreas Jaeger c0677ad425 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: I02c57a8eeaf9540e4b94882a581b89533a129350
2018-01-12 13:04:05 +00:00
Brian Rosmaita a598550881 Restore functional testing under ssl
Closes-bug: #1738033
Change-Id: Ia3e2e210eea09ac07311f25ffa99ad0f4ced418d
2017-12-15 15:10:43 -05:00
Eric Harney 89c55e7e27 Enable Python hash seed randomization in tests
Unit tests should run with hash seed randomization
on, to ensure code is not introduced that relies on
ordered access of dicts, sets, etc.

Python 3.3 enables this at runtime by default.

Change-Id: I67804f6238c09b40b1828e4d15e703756ccfef31
2017-09-08 10:36:08 -04:00
Jenkins 0db3ba8322 Merge "Enable code coverage report in console output" 2017-06-21 14:14:29 +00:00
pawnesh.kumar 84a8089372 Enable code coverage report in console output
Modified tox configuration to enable code coverage report in console output

Change-Id: I57c5aa7d88e3bab5397c996677a0d18d6157f79f
2017-06-15 19:38:47 +00:00
lijunbo 07ad860d07 Remove references to Python 3.4
Now that there exists only a gate job for Python 3.5 and not 3.4,
we should remove those references to the 3.4 that is untested.

Change-Id: I8853fadc29823b16fb4b620648636d658ec38d8d
2017-03-24 01:52:08 +00:00
Abhishek Kekane c2898998a7 Move old oslo-incubator code out of openstack/common
As part of the first community-wide goal, teams were asked to
remove the openstack/common package of their projects if one
existed. This was a byproduct of the old oslo-incubator form
of syncing common functionality.

Package openstack/common/apiclient is moved to glanceclient/v1
package as it is used by v1 api only.

NOTE:
Removed glanceclient/common/base.py as it is deprecated and not
used anywhere.

Closes-Bug: #1639487
Change-Id: Ib3ac09743ce761ab0186e99e1c9de02517f89510
2016-11-08 11:33:09 +05:30
Andreas Jaeger 546a9beea8 Use constraints everywhere
Infra now supports constraints everywhere, remove now unused
workarounds.

For more information about constraints see:
http://lists.openstack.org/pipermail/openstack-dev/2016-August/101474.html

Change-Id: Ie46068f0bf406da82c521d888e0876f60cf91115
2016-08-30 19:45:37 +02:00
zheng yin fa5bfbed41 Add Python 3.5 classifier and venv
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: I15304210a7f32b719a910e22518d33427ddedbb9
2016-07-12 07:26:45 +08:00
Niall Bunting 10ad2886e1 Add upper constraints to glanceclient
This will force pip install to use the upper-constraints.txt specified
version of pip modules. When you don't do this, you are out on the
bleeding edge and become unstable everytime some python library in the
world changes in a way that you don't expect.

The script is needed because it cleans up the conflicting entry that
corresponds to the client before applying it to source based installation.

Change-Id: I8f168fde04bf9e421d9a39e91a041512bf4f2b79
Closes-Bug: 1563038
2016-06-03 14:21:15 +00:00
Tin Lam cd5925bc60 Enable hacking checks
Enabled following hacking checks from tox.ini:
- H233 Python 3.x incompatible use of print operator
- H303 no wildcard import
- H404 multi line docstring should start with a summary

Change-Id: I2553bcd3e80c00acc08d135a1d2dadfb6cda49fe
Partial-Bugs: #1475054
2016-04-18 16:23:59 +00:00
Tom Cocozzello c6904d0332 Docs are generated incorrectly
When docs are generated with pbr command 'warnerrors = True'
there are many doc problems that are shown. This patch fixes
these problems.

Change-Id: Idb804ab924782b6d7d379494987bdba2acbce568
Closes-Bug: #1557235
2016-03-22 13:28:14 +00:00
kairat_kushaev a49ce80db6 Add reno to glanceclient
Add possibility to generate release notes to glanceclient.
We need this because it helps to prepare good documentation
and provide useful info to Openstack users.

Change-Id: Ifce2df8ac5f3a14518a758d748964e7201a75291
2016-02-11 11:58:19 +00:00
Jenkins dd588b475b Merge "Drop py33 support" 2016-01-12 03:58:21 +00:00
Jenkins dfff3af389 Merge "Remove py26 support" 2016-01-09 00:49:58 +00:00
Shu Muto bc8cc31048 Drop py33 support
"Python 3.3 support is being dropped since OpenStack Liberty."
written in following URL.
https://wiki.openstack.org/wiki/Python3

And already the infra team and the oslo team are dropping py33
support from their projects.

Since we rely on oslo for a lot of our work, and depend on infra
for our CI, we should drop py33 support too.

Change-Id: Id80bab700d0535b919be6b8f42e0c1561557e45e
Closes-Bug: #1526170
2016-01-07 01:51:11 +00:00