Commit Graph

157 Commits

Author SHA1 Message Date
Zuul 097ffc6df1 Merge "Bump hacking" 2024-03-18 10:37:22 +00:00
Takashi Kajinami 7472f515a6 Bump hacking
hacking 3.0.x is too old. This also removes the note about old behavior
of pip which has been changed in recent versions.

Notes:
- A few errors newly detected are also fixed.

- This also fixes the compatibility with flake8 >= 3.0 because flake8
  is also bumped when we bump hacking.

- pretty_flake8 tool is removed because it's not commonly used but
  needs maintenance effort to keep it in sync with newer releases

Change-Id: I8e91b06199bfbed1d6e9f8d62ddf52fafd60b7f9
2024-01-17 12:37:51 +09:00
Erik Olof Gunnar Andersson 2e2b652419 Increase minimum test coverage to 97%
Change-Id: Id6889aafd1c1a1108ea4bb4dead27d411d05b048
2024-01-07 16:17:15 +00:00
Erik Olof Gunnar Andersson af940fb6e4 Increase minimum test coverage to 96%
Change-Id: I791295e7500a75a3a1ee28a7d796163a77591a9d
2023-12-16 11:32:50 +00:00
Erik Olof Gunnar Andersson 27ffc68f7b Increase minimum test coverage to 95%
Change-Id: Ic75c1e2c4b4c556dab4f3b74ebf751d54bce38ec
2023-11-19 12:30:44 +00:00
Erik Olof Gunnar Andersson 2e9d1f0c28 Increase minimum test coverage to 94%
Change-Id: Ia065d6a2a1ba2ee41862963c239e9c50122d1d13
2023-11-10 20:12:19 +00:00
Erik Olof Gunnar Andersson 2eeba9ea7d Increase minimum test coverage to 93%
Change-Id: I2124f66f970d9ee7d86579a6702357fca446481a
2023-11-04 15:01:11 -07:00
Erik Olof Gunnar Andersson 0f7e2c70b9 Increase minimum test coverage to 92%
Change-Id: If03860e2acee8a8c9c064f8a02d572ea85d6b782
2023-11-01 16:00:54 -07:00
Erik Olof Gunnar Andersson c102c0830b Increase minimum test coverage to 90%
Change-Id: Ic7f7bec89cb17b6c0ddbdbc93237ef273f17deb6
2023-08-02 16:51:37 +02:00
Erik Olof Gunnar Andersson a53c685adf Increase minimum acceptable test coverage
Change-Id: I3dc80fac13e60016e0611410b269bc487d93a39b
2023-05-30 21:52:16 +00:00
Erik Olof Gunnar Andersson 758956d5b9 Removed unsupported test B309 from bandit
B309 was removed with this patch and breaks the CI.
130a467434

Change-Id: I15864a76c8913f151154e2398ae86aea71883498
2023-03-10 16:50:32 -08:00
Michael Johnson 8910a2014b Add hacking check for line continuation backslash
This patch adds a hacking check for line continuation backslashes and fixes the occurences that existed in the code.

Change-Id: I1d1269de231f6e747248a9d816a1d64e3968c69b
2023-02-21 20:12:04 +00:00
liyou01 c6ddf55f7f Fix tox4 error
tox.ini started failing with Tox4 which had some
incompatible changes. One is allowlist_externals which now needs to be
explicitly set for each testenv.

Other failure is due to the skipsdist = True.

Fixing tox.ini for tox4 changes.

Change-Id: I7ef284a07866d99cbc34b391295efbae261af7c6
2022-12-31 10:48:26 +01:00
Erik Olof Gunnar Andersson d54c10fee2 Increase minimum acceptable test coverage
Change-Id: I196eca62b417cf01b738303442d83a8c0d820e54
2022-10-08 12:04:41 -07:00
Dr. Jens Harbott cdf81bb56e Bump hacking version
We can also drop some excludes that no longer affect us

Change-Id: Ib3e9d87c29a612e4c77212bd3a414c53ee1d9fe0
2022-06-16 09:31:18 +02:00
Michael Johnson 69366b9209 Set a minimum coverage limit
Currently the code coverage check job has no minimum threshold.
Let's set a minimum bar of 83% coverage or the job will fail.
Currently we are around 85%, so this gives us some room. As coverage improves we can incrementally raise this bar.

Change-Id: I3df49281619727ad0386f0cd8f8751bf272d2147
2022-05-04 22:48:27 +00:00
Ghanshyam Mann 081a76a926 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: I452a1149f417089a4b87f05b78c94c7a31fcbd66
2022-04-30 15:48:07 -05:00
Michael Johnson 30a03e1092 Fix tox docs env to have the correct dependencies
Pip is pulling in unstrained dependencies during the "sibblings" package
install step. Normally this is fine as the dependencies have already been
installed and it's just installing the package under test. However, with
designate there are a lot of overlapping dependencies and pip will end up
reinstalling an unconstrained version. In this case it was Jinja2.

Change-Id: Ie49f99ba8e86913471ee6cd078f5afd28282c0f5
2022-04-04 22:21:52 +00:00
Michael Johnson 07a8a9d693 Add non-voting dnspython latest release unit test
This patch adds a non-voting job that runs the Designate unit tests
with the latest release of the dnspython package.

Change-Id: Ief33213ab5cc549b7fa4babc4eabf72aaeb98b6b
2022-02-03 23:40:36 +00:00
Michael Johnson 256f889279 Add hacking check D710 for LOG.warn()
Python 3 deprecated the logger.warn method, see:
https://docs.python.org/3/library/logging.html#logging.warning
so we prefer to use warning to avoid DeprecationWarning.

This patch adds a hacking check, similar to other projects, that enforces
using LOG.warning() instead of LOG.warn().

Change-Id: I424ccc14ec09dd6c7662aaee1096dfd56917aef2
2021-11-30 00:22:51 +00:00
maaoyu 2928502c86 bump py37 to py3 in tox.ini
in 'victoria' cycle, we should test py38 by default.
But we let local development tests run with whatever the default
local py3 is the default.

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

Change-Id: Ieab0763f69616226a4567de45ff292f336aad090
2021-11-20 01:09:23 +00:00
Michael Johnson 0e16095a80 Enable H306 check and fix import ordering
To better align with other OpenStack projects and to reduce the
ongoing problem with duplicate imports, this patch re-enables the
H306 check for proper module import order.

Change-Id: Iced92590829f6d9177d64ad4868aebe6eafd6a8a
2021-11-18 00:30:05 +00:00
wangzihao 6916137b82 replace whitelist_externals by allowlist_externals
replace tox's whitelist_externals by allowlist_externals option:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Depends-on: https://review.opendev.org/c/openstack/designate/+/796597
Change-Id: Id28a67abc74c3e14d4cba8d3278c89a1fe029252
2021-06-22 10:15:40 +08:00
wangzihao c05d3b2e5d 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: I2ce7d33d8b8af214145a53165214c9c018d27e20
2021-06-16 16:00:49 +08:00
Zuul 2f5e726157 Merge "Update requirements URLs in tox config" 2020-11-12 08:54:40 +00:00
likui 8834e8b2f9 Update requirements URLs in tox config
Update the URL to the upper-constraints file to point to the redirect
rule on releases.openstack.org so will switch to the correct
upper-constraints list automatically when the requirements repository branches.

Change-Id: Iaf95ed023d5d665cb7bc885b931fd29ccffe1c9f
2020-10-30 11:55:01 +08:00
Erik Olof Gunnar Andersson 568b559b67 Fix lower-constraints test not constraining properly
When running the lower-constraints test we are currently
using pip install -e . to install the source. This caused
python libraries to unintentionally getting upgraded beyond
the intended constraints.

Change-Id: Ie05efab2f52fe3e1641c9863f6f85c813158e748
2020-10-15 01:35:18 -07:00
maaoyu fc0802e359 Remove install unnecessary packages
The docs requirements migrated to doc/requirements.txt
we need not install things from requirements.txt.

Change-Id: I3a6acbe9dac8bbf91a4926c806a1fabac028cda3
2020-09-23 11:45:15 +08:00
Dr. Jens Harbott 65736672da Stop setting version specific basepython binaries
Tox should be smart enough to figure out the correct python version on
its own, avoid having to follow-up for every new python release.

Change-Id: If515467fd4c9e678d54d4e8551b52611fec786ff
2020-04-06 18:11:42 -07:00
Andreas Jaeger 2e3d8ab80d 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.

# to unbreak gate:
Depends-on: https://review.opendev.org/715835

Change-Id: Icc2f4368cc90689d74510ce36fe77d2346aec625
2020-04-01 21:52:38 +00:00
Ghanshyam Mann cdac0fc2f9 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

Designate 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://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Depends-On: https://review.opendev.org/#/c/693631/
Change-Id: I5a5bdc859f87f82097b95b2ebb31edb6e9b72b3a
2019-12-13 18:49:14 +00:00
Nicolas Bock 437cbf05ad Add pdf-docs env to tox.ini
- Enable PDF documentation. Based on [1].
- Enable table of contents generation for pdf
- Removed literalinclude of designate.conf [2]
- Removed illegal character (a literal ESC)
- Fix incorrect column count in backends summary section
- Replace nodes.line() with nodes.paragraph()

[1] https://review.opendev.org/601659
[2] https://github.com/sphinx-doc/sphinx/issues/3099

Change-Id: Ie454f8f9ebc8e36347ce33b22f2e6da0257fe4e0
Signed-off-by: Nicolas Bock <nicolas.bock@suse.com>
2019-09-07 09:26:57 +00:00
Andreas Jaeger ad32f7a15d Update api-ref location
The api documentation is now published on docs.openstack.org instead
of developer.openstack.org. Update all links that are changed to the
new location.

Note that redirects will be set up as well but let's point now to the
new location.

For details, see:
http://lists.openstack.org/pipermail/openstack-discuss/2019-July/007828.html

Change-Id: Ibd4ed1a1e282f0088467a6fcafe44b1dad46ed5f
2019-07-22 18:36:31 +02:00
Corey Bryant a15a2da6b2 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: I344d4253515569ece66eee7ff92fac3d4190a065
Story: #2005924
Task: #34204
2019-06-24 09:08:37 -04:00
Zuul 7fe1c1e9b6 Merge "Fix api-ref building" 2019-05-28 22:11:25 +00:00
Andreas Jaeger 2d091bfdbf Fix api-ref building
The tox environment was missing deps and thus failed, add those in.

Remove outdated comment, -W is used.

Change-Id: Ib31fcbbbd6f3f3eb6f6aed0ec0c8e03da3782189
2019-05-25 12:39:24 +02:00
Zuul a705d055bd Merge "Update Python 3 test runtimes for Train" 2019-05-20 17:58:55 +00:00
Zuul 4809fb17a7 Merge "Replace git.openstack.org URLs with opendev.org URLs" 2019-05-20 04:18:22 +00:00
Adam Harwell dec3639078 Clean fix for bandit exclusions change
Don't mangle requirements, just fix the glob.

Change-Id: I4b57336a103c75df877ff65e645b3b05b3c79a49
2019-05-14 23:11:43 +00:00
ZhongShengping 27d2c22e8a Update Python 3 test runtimes for Train
This goal is to implement the process set out in the 2018-10-24 Python
Update Process TC resolution[1], for the Train cycle to ensure unit
testing is in place for all of the Tested Runtimes for Train[2].
In practice, this generally means adding unit tests for Python 3.7 and dropping
unit tests for Python 3.5. Using the Zuul template for Train will ensure that
all projects that support Python3 will be tested against the agreed runtime
versions, and make it easier to update them in future.

[1]https://governance.openstack.org/tc/resolutions/20181024-python-update-process.html
[2]https://governance.openstack.org/tc/reference/runtimes/train.html

Change-Id: I27ad92ae4f17e56e5879b7338db3543e5a67d8a5
Depends-On: https://review.opendev.org/#/c/641878/
2019-05-09 17:34:58 +08:00
ZhongShengping 5d0408c719 Replace git.openstack.org URLs with opendev.org URLs
Thorough replacement of git.openstack.org URLs with their opendev.org
counterparts.

Change-Id: I5cfdd0c3e813f1cb6f72087fdb3ee3957b6e9ea7
2019-04-24 08:47:23 +08:00
Ghanshyam Mann 2a63b4d097 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: I4a3416c240a0cd605491019739378f0e6acd0b0a
2019-04-14 19:34:30 +00:00
Erik Olof Gunnar Andersson 3c231e3988 Modernize tox
This is an attempt to reduce the log spam when
running Designate unit-tests.

Change-Id: I03af83a10b633ea63364001add5354413b2c9358
2019-03-27 09:40:59 -07:00
Jens Harbott 0fd6f568fb Add openstack-python37-jobs template
Make sure that we are testing with the latest python version, too.

We should also add a functional job running with py37.

Change-Id: If6c2cd41ec39f15682ea6385ccbb5cfc8551689a
2018-10-24 05:34:49 +00:00
Nguyen Van Trung feb8219094 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: Ia9cf4ec0b6cd5addb81dd1ff31d7e930040ddc44
2018-10-16 06:24:33 +00:00
Matt Riedemann ce5f70a50e Fix venv target for creating release notes
Without doc/requirements.txt in the venv target you
can't create release notes by doing:

  tox -e venv -- reno new <slug>

This fixes the venv target dependencies to do that.

Change-Id: Ia4b0311755fe30a79bdb529dcea4ae21efd57c8a
2018-10-15 12:02:06 -04:00
Erik Olof Gunnar Andersson 4a3f1eff66 Removing removed bandit plugins to fix gate
The following Openstack specific plugins were removed
in the 1.5.0 release on bandit and is causing the pep8
tests to fail.
* B109, B111

Change-Id: I6270decd28be26e8c497062e75b54a12f3a54517
2018-08-17 15:25:57 -07:00
Graham Hayes d012c21c0c Reenable py3.6 tempest jobs + add py36 tox
Change-Id: I24cf490f74517aa8f92f81a5aca6785a7a442537
Signed-off-by: Graham Hayes <gr@ham.ie>
2018-07-23 17:07:28 +01:00
Nguyen Van Trung 004fb18425 Replace testr to stestr
According to Openstack summit session [1] stestr is maintained
project to which all Openstack projects should migrate.
Let's switch it then.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: I0d2391779623135551f095f8f4b61a2d523c6f35
2018-07-09 13:11:14 +07:00
Zuul 224a3e6d3c Merge "Ensure the old files before build" 2018-06-08 18:54:08 +00:00