Commit Graph

71 Commits

Author SHA1 Message Date
melakualehegn 129ddada81 Add new-note tox environment
only reno command was possible to add a
release notes. modify tox config to allow
newnote command too.

Change-Id: Iae8ec60ed91708f428ef24d5fec07e95d68986ac
2024-02-29 12:05:33 +00:00
silvacarloss 32f1a9a943 Bump tox version
This issue [1] is showing up on the functional jobs in the gate,
which are using the system tox.  So tell tox to upgrade itself
to the version that gets around that issue.

[1] https://github.com/tox-dev/pyproject-api/issues/101

Change-Id: Ib2a3ddb4bc8175f2769d1cd3510f00485349192a
2023-08-31 10:23:50 +00:00
Goutham Pacha Ravi 782e85df30 Drop duplicate tox config
"usedevelop" is specified and set to true
in the default testenv and doesn't need to be
specified in the specific environments.

Change-Id: I8adee2feec3ac46f22c04cae86ed0559785ee414
2023-01-04 09:58:16 -08:00
silvacarloss bdd268e1a1 Fix tox4 errors
Change-Id: Ib627b001405fef8a4d1e424a875fcc9c34296f4b
2023-01-04 11:36:59 -03:00
Ghanshyam Mann bf2c7a26d6 Drop lower-constraints.txt and its testing
As discussed in TC PTG[1] and TC resolution[2], we are
dropping the lower-constraints.txt file and its testing.
We will keep lower bounds in the requirements.txt file but
with a note that these are not tested lower bounds and we
try our best to keep them updated.

[1] https://etherpad.opendev.org/p/tc-zed-ptg#L326
[2] https://governance.openstack.org/tc/resolutions/20220414-drop-lower-constraints.html#proposal

Change-Id: I7a234666c3edff6486257a370ec361045aa7947d
2022-05-02 18:26:28 +00:00
Goutham Pacha Ravi 12a2b17bc7 Fix tox to ignore_basepython_conflict
Tox includes a couple of enhancements:

- [1] previously mishandled the basepython directive.
- previously ignored PYTHONDONTWRITEBYTECODE [2]

So we can remove the workarounds.

See ML thread [3] for some details

[1] https://github.com/tox-dev/tox/issues/477
[2] 336f4f6bd8
[3] http://lists.openstack.org/pipermail/openstack-dev/2018-July/thread.html#132075

Change-Id: Ibd8b77bb10c5a739fea11a02e959b66c5e81f221
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2022-02-02 14:59:51 -08:00
wu.shiming 5220acf12e Changed minversion in tox to 3.18.0
The patch bumps min version of tox to 3.18.0 in order to
replace tox's whitelist_externals by allowlist_externals option:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: I1d52cacc72f33b37c606512a14ff9f94c561a53f
2021-05-31 15:34:29 +08:00
Dina Saparbaeva ca65447e25 tox miniversion update to 3.1.1
In 3.1.1, tox had fixed:

mishandling the basepython directive [1]
ignoring PYTHONDONTWRITEBYTECODE [2]
More details in [3]

[1] tox-dev/tox#477
[2] tox-dev/tox@336f4f6
[3] http://lists.openstack.org/pipermail/openstack-dev/2018-July/thread.html#132075

Change-Id: I41dd046fa9edc804db32e718794bdbeda1c568bd
2021-02-11 22:23:14 +06:00
wuchunyang b77a8c1baf Replace deprecated UPPER_CONSTRAINTS_FILE variable
UPPER_CONSTRAINTS_FILE is old name and deprecated
-https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file
This allows to use lower-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.

Change-Id: I21ff413b3e13824367dbaad8745f11d733b34ece
2020-11-27 09:31:59 +00:00
Zuul 4f9161267b Merge "Remove install unnecessary packages" 2020-10-14 05:58:31 +00:00
kuangcx b8305862d7 Remove install unnecessary package
The docs  requirements migrated to doc/requirements.txt
we need not install things from requirements.txt.

Change-Id: Ice2f40eb8856bb5869b621725e5918560d843e06
2020-09-25 11:04:46 +08:00
maaoyu f838aac040 Remove install unnecessary packages
The docs requirements migrated to doc/requirements.txt
we need not install things from requirements.txt.

Change-Id: If79ec726cddc9dd016551223c29a824a109f8b8c
2020-09-24 11:05:01 +08:00
Goutham Pacha Ravi cdff009da1 Drop install_command usage in tox
Use the default value provided by tox:

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

See discussion on the openstack-discuss ML [1]
for the complete context.

[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-April/014237.html

Change-Id: I6344f44fb955d631a4f0a13fa53ecc19826c7ea6
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2020-04-22 18:25:56 -07:00
Andreas Jaeger 7cf94c6527 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix found problems.

Change-Id: I78ee32da2b158abda1ca4438c23c5245dd8849b2
2020-03-30 10:04:29 +00:00
Goutham Pacha Ravi 424fb56f4b [ussuri][goal] Drop python2.7 support
As per the official python support timeline
set forth by the OpenStack TC [1][2], OpenStack
Train (in our case, python-manilaclient 1.29.x
series) is the last release that will support
python2.7.

[1] https://governance.openstack.org/tc/resolutions/20180529-python2-deprecation-timeline.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: I5b4dc1853d7e4f8f736dd2a22eb08bcfdeac3411
2019-12-08 21:04:14 -08:00
pengyuesheng b975d09ee6 Update the constraints url
For more detail, see http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: I3a68c1eb21965bfbbaa650bf4688c369dc4a6de7
2019-09-23 16:48:14 +08:00
Tom Barron 6c6b0bd5b2 Add PDF documentation build
Add a new tox target to build PDF documentation in accord
with the community goal [0] to have PDF docs available.

Also, only show genindex and search for HTML.  These elements
do not make sense within PDF documents.

[0] https://governance.openstack.org/tc/goals/selected/train/pdf-doc-generation.html

Change-Id: Ibbd50276c3879958b0ceb82afcc882716c01b384
2019-09-13 14:00:46 -04:00
Corey Bryant 3e3dfb1d5a 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: I3e06562e38f9ee165024e09b95408d5593c0cdab
Story: #2005924
Task: #34220
2019-07-05 11:54:21 -04:00
jacky06 5b2dc5f806 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I68e9c3428eee50b8daf6bef56d62b679779d1aee
2019-04-28 13:56:09 +08:00
Ghanshyam Mann 05a3f4d302 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: I02835ef17678619ceab816291cc8249a4b555a18
2019-04-14 23:15:36 +00:00
Tom Barron 624265ade6 [doc] Fix command output generation
Install manila command in the tox virtual environment
for docs so sphinx can run ``manila`` to generate its
help output.

Closes-bug: #1821389
Change-Id: I0bb221006842f3b40609753133c4203bc38fdffa
2019-03-24 06:49:21 -04:00
Tom Barron e476fc94e0 Convert functional tests to python3
Depends-On: https://review.openstack.org/#/c/630462/
Change-Id: Ib89f021388bccb925cd19e3792a9c7b524319502
2019-01-18 07:13:11 +00:00
Goutham Pacha Ravi b955ac9064 [Python3] Fix python3 bugs in code
- The BaseException class no longer has a "message"
  attribute in python 3 [1]. On the contrary, the
  string representation of an Exception object will
  print all the exception args in all supported
  python versions, so use that instead.
- Functional tests were run with a specific locale,
  remove those annotations so we can handle unicode
  encoding and decoding in python3 envs.
- Cleanup errors were not being handled correctly,
  cleanup the code so we don't have spurious failures.
- In python3, dict.keys() gives you a view for lazy
  loading, so convert occurrences to lists as expected
  in our functional tests.
- Start capturing STDOUT and STDERR in tox envs to
  enable troubleshooting.

Co-Authored-By: Goutham Pacha Ravi <gouthampravi@gmail.com>
Closes-Bug: #1811627
Closes-Bug: #1811516
Change-Id: Idaa2fb9b60451b3fbd298e19574195f2d663c6f4
[1] https://www.python.org/dev/peps/pep-0352/#transition-plan
2019-01-17 12:47:03 +00:00
Sean McGinnis b7a3e1f8ba Remove setup.py check from pep8 job
Using "python setup.py check -r -s" method of checking the package has
been deprecated with the new recommendation to build the sdist and
wheel, then running "twine check" against the output.

Luckily, there is already a job that covers this that only runs when the
README, setup.py, or setup.cfg files change, making running this in the
pep8 job redundant. This is covered by the test-release-openstack-python3
that is defined in the publish-to-pypi-python3 template.

More details can be found in this mailing list post:

http://lists.openstack.org/pipermail/openstack-dev/2018-October/136136.html

Change-Id: I19830446d21b989542b54511bc05f885b7a8ff60
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2018-10-30 11:10:20 -05:00
Vieri 156a71d2dc 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: I6a18fa58d85f0d75befedba4bac5cc3c116da73c
2018-10-09 13:57:09 +00:00
Doug Hellmann e15fe1b772 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: Ic98a865e5d8f2e5467dff62a648046818dc502e3
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:56:01 -04:00
Zuul 067a4f669e Merge "fix tox python3 overrides" 2018-06-25 18:11:48 +00:00
junboli f09bb609ce Add check to the flake8 job
Follow up recommendation of [1].
[1] http://lists.openstack.org/pipermail/openstack-dev/2018-June/131233.html

Change-Id: I76dc4f9ec1b71a5bd4ce1d551d2c96cb98448c3a
2018-06-08 09:09:19 +08:00
Doug Hellmann fe0d78ca2e 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: I81fd5d0161c6ed1b789cd62c3a882fe375c9a2a2
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-06 17:58:18 -04:00
junboli 73315f2a89 Switch to use stestr instead of testr
os-testr has moved over to use stestr instead of testr. While this
is usually compatible with existing settings, there is a warning
that is emitted when .stestr.conf is not present. It is usually
able to fall back to parsing the .testr.conf file, but to be more
correct and to prevent future problems we should update the config.

Change-Id: I10446c539aaf9edd8b52b17776e08c12757def31
Depends-On: I98a296d009e64d6afab02a53bd1af878f78c4321
2018-05-07 22:24:34 +08:00
Zuul a0a833fb56 Merge "add lower-constraints job" 2018-03-25 14:19:59 +00:00
Doug Hellmann d04dcc5cfa 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: I7f8ad61b0e1c691ae8d804b3d661a69c68b954fa
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-22 17:52:54 -04:00
Nguyen Hai eec6024f10 Follow the new PTI for document build
For compliance with the Project Testing Interface as described in:
https://governance.openstack.org/tc/reference/project-testing-interface.html
http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Change-Id: Id830b5206728b102e9da2ede6e894a6375e02e75
2018-03-22 14:50:42 +09:00
Andreas Jaeger 3b5e6bc24f 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: Ib9e007b9eeae5f2079dd682df0c7ef2294961f4f
2017-12-02 16:56:04 +00:00
liuyamin 0e84419df5 TrivialFix flake8 and docs build in tox.ini
1 "build" is a generated doc file directory we need to exclude.
2 to ensure the old files are not left over when running these
  document builds.

Change-Id: Ieb8fb314375b5a8ac3f38b1944d514937274c8c6
2017-08-28 00:55:30 +00:00
e 34d5767a04 Enable some off-by-default checks
Some of the available checks are disabled by default, like:
[H106] Don’t put vim configuration in source files
[H203] Use assertIs(Not)None to check for None

See:
https://docs.openstack.org/hacking/latest/user/usage.html#enabling-off-by-default-checks

Change-Id: I8f9b580ad653e32290e5c4be8a639cf7d168d9ec
2017-07-20 11:22:42 +08:00
Stephen Finucane e19b787dd4 Use Sphinx 1.5 warning-is-error
With pbr 2.0 and Sphinx 1.5, the setting for treat sphinx warnings as
errors is setting warning-is-error in build_sphinx section. Enable this.

Change-Id: I8ea73cff6dc539c9f9db2f550ad8088812467d1b
2017-04-19 10:41:19 +01:00
Tom Barron 8d2d9a3810 Clean docs/build before building docs
Change-Id: Ie11beb3ba9c7d726e4f3cfdaed94d23118b757f4
2017-03-03 14:06:31 -05:00
Cao Xuan Hoang 38e77c8a5c 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: I37e05189a65f5d86a3149065e6d405a23a4c66b8
2017-02-08 09:42:11 +07:00
Jeremy Liu 6eddf9f005 Enable coverage report in console output
Change-Id: If2c2b73a3c7c000bf0884d1a5327c4e167dbc181
2017-01-13 10:56:52 +08:00
Tony Breeds 36c980bcc5 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 python-manilaclient.

Change-Id: I2d5bb052c7e499175ef3d32fdc35c9e67dc260ac
2016-12-21 22:51:37 +01:00
Tony Xu 5dfd106d1f 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: Id94178b3fbf06e3ce2fc0a896beecaa2f368f75a
2016-10-26 10:21:25 +08:00
Goutham Pacha Ravi 31d18c1c06 Switch test runner to ostestr wrapper
We can use ostestr since developers are more familiar
with using ostestr and are used to seeing the
test outputs with this tool around OpenStack
projects (including openstack/manila).

This wrapper gives us a lot of other advantages [1].

TrivialFix

[1] http://docs.openstack.org/developer/os-testr/ostestr.html

Change-Id: Ibc938827ab281caa905def6e2d74dafda90b9394
2016-10-13 03:01:13 +00:00
ChangBo Guo(gcb) c8bb1a2755 Remove copy of incubated Oslo code
The Oslo team has moved all previously incubated code from the
openstack/oslo-incubator repository into separate library repositories
and released those libraries to the Python Package Index. Many of our
big tent project teams are still using the old, unsupported, incubated
versions of the code. The Oslo team has been working to remove that
incubated code from projects, and the time has come to finish that work.

As one of community-wide goals in Ocata, please see:
https://github.com/openstack/governance/blob/master/goals/ocata/remove-incubated-oslo-code.rst

Note: This commit also fix pep8 violations.
Change-Id: I03288adb94c702d1d63df88ef9ba33a2ff59eaa3
2016-09-28 10:06:45 +08:00
Goutham Pacha Ravi 0b9a1dd83d Add support for releasenotes
Create the releasenotes directory and add the requisite
conf.py file to generate python-manilaclient's release notes.

project-config change: I522ba76263a6597026f6dd7b03ec51bb05bfb15a

Change-Id: I6b0fa6016781a252a71649a7cac85f02b0a019e8
2016-05-25 17:45:16 +00:00
ting.wang 53e50c04ee 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: Ia52506cfe130b5abd867519337bcaedd589a98d4
2016-01-12 14:44:10 +08:00
Jenkins 60bbf5a075 Merge "Deprecated tox -downloadcache option removed" 2015-12-18 09:01:48 +00:00
shu-mutou 10eaad7677 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: I34bbced8f72cad0146a0f2bc964b1e093fbf7255
Closes-Bug: #1526170
2015-12-15 18:03:21 +09:00
Ondřej Nový 4bbe059bfc 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: Ibe425d0dd4094135a16407cb1e089b51a3d4f9ac
2015-12-11 21:25:19 +01:00
Valeriy Ponomaryov 2211b48079 Remove py26 from tox config
Support of py26 is dropped by manilaclient dependencies.
So, remove such job for manilaclient too.

Change-Id: I63d58d0054765b4ed965fc4795a61feca0cbf406
Closes-Bug: #1521941
2015-12-03 12:51:15 +02:00