Commit Graph

92 Commits

Author SHA1 Message Date
Takashi Kajinami 4d2ab9fc91 Cap hacking
... following what has been done in the other repos. This also caps
flake8-import-order because hacking usually needs to align with flake8.

Change-Id: Ie9bc993ad84660590455193397b0a3a3d675f8dc
2024-01-16 16:57:41 +00:00
Takashi Kajinami 2a327582f7 Unpin flake8-import-order
... to resolve the following ValueError.

```
ValueError: 'string' is not callable
```

The I202 test is disabled because multiple files need updates. It may
be enabled later once all the warnings are addressed.

Fixed E721 test errors which appears 4 times.

E721 do not compare types, for exact checks use `is` / `is not`, for
instance checks use `isinstance()`

Change-Id: I68880b83c8a555ed30c3ce18b73ae27b8db34dc8
2023-12-14 21:47:34 +09:00
Tom Weininger f45388643f Add WebTest as an indirect test dependency
Pecan has made webtest an optional dependency for testing only [1].
Since it is still used for testing we need to add it to our
test-requirements.txt.

[1]: https://github.com/pecan/pecan/pull/140

Change-Id: I4a0985fc93aa071e68491fe60478bee903de39ed
2022-07-06 11:54:53 +02:00
Brian Haley dc876eed9d Fix gate failure
Bumped a bunch of constraints and requirements to fix
a gate failure with recent pip update.

Change-Id: I7af382a993bd16ce4e32a9052337f006d9aa58aa
2020-12-15 14:33:09 -05:00
Andreas Jaeger acb4d7b4e1 Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Set openstackdocs_pdf_link to link to PDF file. Note that
the link to the published document only works on docs.openstack.org
where the PDF file is placed in the top-level html directory. The
site-preview places the PDF in a pdf directory.

Disable openstackdocs_auto_name to use 'project' variable as name.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I87889f73207ecd940963fbe601ccbb79863b96ac
2020-05-21 13:06:24 +02:00
Andreas Jaeger 79464c0e04 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Update local hacking checks for new flake8.

Add test-requirements.txt to doc building, hacking is now imported and
needed for autodoc.

Change-Id: I06211ef20131c64deba135123e53d87f3b5356a2
2020-03-30 10:03:05 +00:00
Zuul 6a535c979b Merge "Support hacking 2.0.0" 2020-03-13 07:47:07 +00:00
Brian Haley c6db3e4f17 Support hacking 2.0.0
Eventually hacking will move to 2.0.0 (diskimage-builder
is holding it back), and when it does there will be a few
errors to fix.  We can get ahead of it so it doesn't
break us with some small changes for these items:

  F601 dictionary key $item repeated with different values
  F632 use ==/!= to compare str, bytes, and int literals
  E501 line too long

While doing this noticed the lower-constraints.txt for
hacking was set at 0.12.0, when test-requirements.txt
had it at 1.1.0, so fixed that as well.

Change-Id: I80d2a5f97e7a4896a8fa765c1971c8bb7e72d211
2020-03-12 20:53:01 -07:00
Michael Johnson 49036845c1 Remove the dependency on the "mock" package
Now that we are python3 only, we should move to using the built
in version of mock that supports all of our testing needs and
remove the dependency on the "mock" package.

This patch moves all references to "import mock" to
"from unittest import mock". It also cleans up some new line
inconsistency.

Change-Id: I72520a2ca010c2c27315d9dff839a4f9d7540b6b
2020-02-17 14:55:19 -08:00
Brian Haley 4af42f837f Complete dropping py27 support goal
This takes care of the last details for dropping py27
support by adding a proper min version of python in setup.cfg.

Change-Id: I693db277d802b2a54084cc1be11d8ce04ad9be2e
2020-01-16 11:32:03 -05:00
Brian Haley bc94789dc9 Stop testing python 2
Since it's no longer supported past Train, lets stop
running the tests.

Change-Id: Ia30435b3bb19acd1d2f9fe217251c393d4f7480e
2019-12-02 12:08:19 -05:00
Brian Haley 65905cdb99 Use bandit block in tox.ini
Use the bandit testenv block in tox.ini instead of inlining
it. Also changed the call back to '-x tests' since that is
correct syntax, it was just broken in version 1.6.0, which
is now in the blacklist.

Change-Id: Id0bf1c6b1633ffb4143c7628b722434faf433d7d
2019-10-10 14:01:40 -04:00
Brian Haley 98448dce44 Add bash script style checker to pep8 check
Added the bashate script style checker to the pep8
check target in tox.ini. It actually found two valid
issues - a bad function declaration and a local variable
issue, but mostly just indentation noise. Fixed all the
complaints.

Change-Id: I43b60e7dcf53acf259c8a52b248fbb8c63d3c8d4
2019-10-10 13:54:58 -04:00
Michael Johnson a84352af56 Add missing test requirement "fixtures"
Change-Id: I1cbf4dff958a36d2af2883cb2596fab53741cef1
2019-07-23 12:52:59 -07:00
Zuul 09020b6bfc Merge "Add Python 3.7 support" 2019-05-16 06:30:28 +00:00
zhulingjie ff50886d79 Update hacking version to latest
This resolves extranous "improper escape sequence" warnings on
python 3.6+[1].

Note, this does not resolve those warnings from pylint. There
is already another proposed patch to address pylint[2].

[1] https://review.opendev.org/494322
[2] https://review.opendev.org/635236

Change-Id: Ie160436913e4d935bab118d31ba10193ac38bd8f
2019-05-14 17:38:58 -07:00
Carlos Goncalves c4faac25de Add Python 3.7 support
In order to support Python 3.7, pylint has to be updated to 2.0.0
minimum. Newer versions of Pylint enforce additional checkers which can
be addressed with some code refactoring rather than silently ignoring
them in pylintrc; except useless-object-inheritance which is required to
be silented so that we stay compatible with Python 2.x.

Story: 2004073
Task: 27434

Change-Id: I52301d763797d619f195bd8a1c32bc47f1e68420
2019-05-14 17:11:22 +00:00
Carlos Goncalves 2c99d0109c Cap to sphinx 2.0.0 on Python 2.7
Sphinx 2.0.0 dropped Python 2.7 support. This is aligned with
Change-Id If558f184c959e4b63b56dec3ca1571d1034cfe5c in requirements
project.

Change-Id: I8f1a3178694c0413332fb97d032961377e199268
2019-05-14 18:57:29 +02:00
zhulingjie 2a057474a8 Update json module to jsonutils
json is deprecated, should use oslo_serialization.jsonutils
instead.

Change-Id: I1392004e32cc835e803c9a953b4581c75049b950
2019-02-20 16:49:43 -08:00
Doug Hellmann 0322cbc5c3 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.

This patch also updates pylint to 1.5.6 which is compatible with
python3.
In updating pylint we have some issues to correct, this patch addresses
those issues so the Octavia code passes pylint 1.5.6.

Change-Id: Iec21f4c803a427059d595612336d67a35ebf9585
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-27 09:32:00 +08:00
OpenStack Proposal Bot cf97a4072c Updated from global requirements
Change-Id: Id50548967e71d4635b5266f3778bbe4c3bd1e7c2
2018-03-23 01:26:24 +00:00
OpenStack Proposal Bot c2dbd82e5c Updated from global requirements
Change-Id: I044f2f25f9090d24dcc68b77af39cd4f3b1b2cb1
2018-03-16 07:34:35 +00:00
OpenStack Proposal Bot 75a15c72ba Updated from global requirements
Change-Id: I863edd1c8cb8a8ffb51c061f781123866b90fd11
2018-03-14 05:47:25 +00:00
OpenStack Proposal Bot ad196ef7da Updated from global requirements
Change-Id: Ia0fa327c39f51ca8184fd0ea8602760d696b9008
2018-03-10 13:31:45 +00:00
OpenStack Proposal Bot 06f1dcd286 Updated from global requirements
Change-Id: I692244236537ac52a1bcfcc278c566c7dc2eec45
2018-02-17 09:53:02 +00:00
Michael Johnson 4120ad721f Fix missing test-requirement and cleanup docs
This patch adds oslo.serialization to the test-requirements.txt file as it is
used in some tests.
It also fixes the parameter ordering in the api-ref for the new qos parameters
on load balancers.

Change-Id: I0baf00457cb131a05b31ac83c03a7ed4a176160c
2018-02-10 14:48:31 -08:00
Michael Johnson c548c21c3f Fix release notes job
Recently there have been a few changes to the release notes and docs jobs.
This patch returns a blank line after the release notes ToC on the index page
and updates the release notes tox job to use the new docs requirements.txt

Change-Id: I0ab2545a670a65853a9f37564d700c945d3a5092
2018-02-07 09:21:46 -08:00
OpenStack Proposal Bot 8f414d1441 Updated from global requirements
Change-Id: I0090f5689dab9d356aba401c9f4a8297cc2ea27b
2018-01-24 02:07:53 +00:00
Monty Taylor 967edebe0c Change how path munging works for sphinx docs
The 'import tools' line is fragile as it depends on how things are
executed as to whether or not '.' is in the python path.

Do the sphinx path munging before importing it.

Also, remove reference to modules/autoindex which does not exist and
thus causes sadness from warning-is-error.

Moves documentation requirements into doc/requirements.txt

Depends-On: Ib121961c5a953a434e7b333cd70f7838a2671f69
Change-Id: I23691aa1d0ea038ec1215e6199015529ddd92de4
2017-12-21 11:00:13 -08:00
OpenStack Proposal Bot 0ac6a75420 Updated from global requirements
Change-Id: I7ec6333f72229a63af6819ec9ba5488450ee592c
2017-11-16 11:16:46 +00:00
OpenStack Proposal Bot e50d953d10 Updated from global requirements
Change-Id: Ic2ec8033743569400a40d0bfd513947ea41390ac
2017-11-15 11:53:48 +00:00
Dong Jun 344b8fa871 Support pylint
Support pylint for octavia, some harmless rules are added to messages
control group.

Change-Id: I88577b1ab918fc7a19b2323ca652bde7ffad64ef
2017-10-16 09:32:41 +08:00
Michael Johnson 8608a59e2e Adds automatic ERD generation for the Octavia DB
This patch adds automatic Entity Relationship Diagraming (ERD) for
the Octavia database schema. The ERD will be available as part of the
Octavia developer reference documentation.

Story: 1558379
Task: 5271

Change-Id: I282b4128fcc72babd1a128d95ec0b3342802c2d4
2017-10-05 12:18:42 -07:00
OpenStack Proposal Bot ae63d247ed Updated from global requirements
Change-Id: I7e9ed0fffa0188147c7df06a0ee81c769c683ba9
2017-09-26 03:32:20 +00:00
Jenkins 1421d451ee Merge "Use flake8-import-order plugin" 2017-09-20 21:47:10 +00:00
Nir Magnezi 4f7c541793 Use flake8-import-order plugin
This addition automates the process, as opposed to relying on review inputs.
Inspired by Ib51bd97dc4394ef2b46d4dbb7fb36a9aa9f8fe3d

Change-Id: I1d6051cf6678b6d5db774fc884390fec626c1f2c
2017-09-19 05:42:07 +00:00
OpenStack Proposal Bot 307bc404e4 Updated from global requirements
Change-Id: Ide7700d3df734b5f4d9c74c6286096cf075b3732
2017-09-16 23:18:49 +00:00
OpenStack Proposal Bot 53f7fb425f Updated from global requirements
Change-Id: I38b370df277ccd9e049c965aeb6a4f6ab1edd495
2017-09-14 00:37:49 +00:00
OpenStack Proposal Bot ff4b249f1f Updated from global requirements
Change-Id: I441d806b557763b681c5ab563330f9b302ea0767
2017-09-01 14:02:57 +00:00
Jenkins d5d2514eb8 Merge "Move doc-requirements to test-requirements" 2017-08-31 20:31:41 +00:00
OpenStack Proposal Bot da8ec0b013 Updated from global requirements
Change-Id: Ibf05fb9165f8c20e33b112219d2823f50bb7aa96
2017-08-18 11:36:49 +00:00
Michael Johnson c34bd5c399 Move doc-requirements to test-requirements
The Octavia project was an oddity by having a seperate doc-requirements
file from test-requirements. This means we don't get global requirements
updates for our docs modules. With the new openstackdocstheme, keeping these
modules up to date is becoming more important.
This patch removes the doc-requirements file, removes unnecessary requirements,
and moves the modules still required into test-requirements.

Change-Id: Ida43b61b7e471f1be96b56056ed2d789b270c0cf
2017-08-17 21:13:12 -07:00
Jenkins 942bd0628f Merge "Remove WebTest from test requirements" 2017-08-04 20:14:15 +00:00
Nir Magnezi d6b5ec1d0b Remove WebTest from test requirements
Remove WebTest since it is not being referenced in the code.

Change-Id: I2d0ef78ca5c8abdf8885c89c45d71873a1d52a1d
2017-08-03 11:11:16 +03:00
OpenStack Proposal Bot b591adbb6a Updated from global requirements
Change-Id: I3a9a0725f59f7bbf6b9c6ca32061c7554aec340f
2017-07-16 21:27:06 +00:00
OpenStack Proposal Bot 2f4d166646 Updated from global requirements
Change-Id: Ib9e3658493c808eb58ee71ab4564a15b647f2f6f
2017-06-03 13:10:29 +00:00
OpenStack Proposal Bot eb644135af Updated from global requirements
Change-Id: I3eb8337a03605eaadd7b92b17d54e5ea76ea0ec2
2017-05-23 16:26:08 +00:00
OpenStack Proposal Bot 21c67d24df Updated from global requirements
Change-Id: I6559645a457472038d384f93c1980e8618f68802
2017-02-15 10:24:04 +00:00
johnsom 5b72c134a9 Create api-ref base for Octavia
This patch will create the initial directory and index for the api reference
documentation (using the new guidelines) for the Octavia API.

Change-Id: Id5fbe569acfe7348f4f9dfc9cbef49834ea824c3
Partial-Bug: #1558385
2017-02-13 23:08:14 +00:00
Michael Johnson ada92f7c0b Update test-requirements hacking
The version of "hacking" in our test-requirements.txt was out of date.
This patch updates that to the current global requirements version
and corrects the errors returned by the new version.

Change-Id: Ia1555cef868a8d215213b465fa6af666b1e81e80
2017-02-13 15:05:41 -08:00