Commit Graph

30 Commits

Author SHA1 Message Date
Vasyl Saienko 58cbb346ef Honor test-requirements.txt for pep8 checks
Setup requirements for pep8 checks according to specification
in test-requirements.txt. Is needed to pin hacking.

Change-Id: I6fb44a1e42181cb56e8206783c9681d7eb49e060
2023-09-26 08:40:49 +00:00
Radosław Piliszek f8f5bc103d Fix tox4 issues
New tox version 4 has changed interpretation of tox.ini

The passenv parsing requires the list to be comma-separated.
Since the names are case-insensitive, duplicates are removed.

skipsdist is now a synonym of no_package and avoids the
installation of the package in all cases.
However, some environments require it (for setup metadata).

Fix allowlist_externals where appropriate.

Change-Id: I929afe0d13a64caac5abf15a16d56fdb713537e5
2022-12-25 15:57:25 +00:00
Takashi Kajinami 741cffdfe7 Use LOG.warning instead of deprecated LOG.warn
The LOG.warn method is deprecated[1] and the LOG.warning method should
be used instead.

[1] https://docs.python.org/3/library/logging.html#logging.warning

Change-Id: I7e3dc5d1897cd10b94e0a5a5a06db667cba7d443
2022-01-28 09:05:39 +09:00
dengzhaosen 45adf21e01 Updating python testing classifier as per Yoga testing runtime
Yoga testing runtime has been updated to add py39
testing as voting.

Change-Id: Ia9712770714d95c01ab2b8694e624885c2023926
2021-12-24 09:12:50 +08:00
Radosław Piliszek 18c79eb0ca Use some better linting
Lints docs and yaml files in addition to Python.

This also fixes the encountered issues.

Change-Id: I111cc93939ae4cd2e878e7f863c1a45db51cdbbe
2021-08-17 18:22:06 +00:00
sunjia 80ee534f40 Generate PDF documentation
For PDFLaTeX, remove the irrelevant parts (contributing,
search).

Change-Id: I78e2baa51a523ef4e8b76a5f7b2ad5cda1085b8a
Co-Authored-By: Radosław Piliszek <radoslaw.piliszek@gmail.com>
2021-08-17 17:47:36 +00:00
Zuul a16c08f018 Merge "Update TOX_CONSTRAINTS_FILE" 2020-12-22 17:32:03 +00:00
Radosław Piliszek 40fc3c10ed Drop lower-constraints
Per a general OpenStack resolution [1], lower-constraints
are not worth the extra work and confusion they introduce.
This patch drops them along with all mentions.

[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019521.html

Change-Id: I7d1595c1dc3eb834f3b13b11f608b90aaff1d349
2020-12-21 20:31:05 +01:00
wu.shiming 2d6750aed7 Update TOX_CONSTRAINTS_FILE
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: If5e17cd4b6b0946fde29a67382871403029e7342
2020-12-14 18:05:53 +08:00
Radosław Piliszek 1ae9a099bf Fix tox for py38 and lower-contraints
Make tox actually run the tests rather than just
install the deps.

Change-Id: I79127d6f3eeb873c912decfa1f1c2bfaef821c8b
2020-09-12 08:54:12 +00:00
Sean McGinnis 4bc52ecf15 Fix constraints URL enforcement for lower-constraints
Due to the upper-constraints argument being hard coded in the
install_command, even jobs like lower-constraints will end up getting
the latest upper-constraints installed.

The correct way to handle the constraints is to separate it out into
deps. This allows the l-c job to properly set what constraints to use.

Fixes some issues with libvirt-python that were masked by these issues.

Change-Id: I0d22d615e2717f12237b8d7b1e4b1071c4497a50
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-08-30 15:30:58 +02:00
Chuck Short 886543d9e7 Replace assertRaisesRegexp with assertRaisesRegex
This replaces the deprecated (in python 3.2) unittest.TestCase method
assertRaisesRegexp() with assertRaisesRegex().

Also add associated hacking check.

Change-Id: I62d5b4c0259c6e2e0fee361542d4b1234ab0ea57
Signed-off-by: Chuck Short <chucks@redhat.com>
2020-06-24 01:12:05 +00:00
Andreas Jaeger 1cf29b9d0d Cleanup py27 support
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
  know about the requirement
- Remove obsolete sections from setup.cfg
- Update classifiers
- Switch to using sphinx-build
- Use newer openstackdocstheme and Sphinx versions
- Cleanup */source/conf.py to remove now obsolete content.
- Remove install_command from tox.ini, the default is fine
- Remove mccabe from lower-constraints, we don't need it there,
  it is constrainted by hacking.
- Add xml and xslt libs to bindep, these are needed for building
  some requirements

Change-Id: Ia78b92c3b807623e70d85c3bce44e3b7011ca282
2020-04-17 21:48:40 +02:00
Andreas Jaeger 64e2b887db 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.

Update local hacking checks to work with newer flake8.

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

Change-Id: Ic7903c61bde999685ca26b5a10d070c8d8d206a3
2020-04-01 21:07:40 +02:00
Ghanshyam Mann 8711c071c5 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

masakari-monitors 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: Id27862284d34f6585881da39c0385cda91959b93
2020-01-23 17:29:04 +00:00
Sean McGinnis 6e3a301e5e
Update constraints path to preferred static location
Change-Id: I33a40b836a6eb5c3b02414d66287efa6ce1454d5
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2019-09-27 13:54:05 -05:00
Corey Bryant b7cdcb0964 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

Co-Authored-By: gujin <gu.jin@99cloud.net>
Change-Id: I4585d250117f19cca577b2e3aaa74aba7ec73e9b
Story: #2005924
Task: #34221
2019-08-26 21:53:29 +05:30
Shilpa Devharakar d8fc7fe83a add libvirt-python for libvirt package
This patch adds build prerequisites for libvirt

Change-Id: Iaa2251708616e9c69817bf5b346d795ea7a4d21b
2019-08-26 21:48:57 +05:30
tpatil d0e53dfd56 Switch to using 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: I6f7d8766969bce4efd5c0bc36df2d583800e1e3e
2019-06-19 03:54:45 +00:00
Ghanshyam Mann d853db3b34 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: Ib1c5f2f6740d4c227ce5493afa545b62ff1f3c45
2019-04-14 23:23:25 +00:00
Sean McGinnis 5de07cf22d
Switch from oslosphinx to openstackdocstheme
The oslosphinx package is not compatible with the current Sphinx 2.0.
This switches over to use the preferred and supported openstackdocstheme
instead.

Change-Id: I51787933d32ddb34cc879790334d44c325edb3db
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2019-04-10 07:41:26 -05:00
openstack 4447d0e2ed Run all jobs by default using python3
This patch implements the community wide goal to run all jobs by
default using python3.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: I3b6aeb7449980da9d891a4a33a9412d0bec12963
2019-02-19 08:37:06 +00:00
Zuul 9904467248 Merge "fix tox python3 overrides" 2018-08-17 03:34:34 +00:00
huang.zhiping d88d7c6857 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: Ieb680847ae37384e827557eefaa58a5e5f4a193b
2018-08-15 02:23:44 +00:00
Doug Hellmann 1d9b81418b 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.

Co-Authored-By: Nguyen Hai <nguyentrihai93@gmail.com>
Change-Id: Ibd77a8fa492836f5892de75088fadb6515812beb
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-07-21 04:32:41 +00:00
Dinesh Bhor 5f59145276 Use os-testr and add PY35 support
masakari-monitors should use os-testr instead of testr as
it is more powerful and provide much prettier output than testr.

This patch also disables the use of PY34 and adds PY35 for in tox
as the gating on python 3.4 is restricted to <= Mitaka in OpenStack.
This is due to the change from Ubuntu Trusty to Xenial, where only
python3.5 is available. Python 3 don't have 'file' builtin method so
to make it compatible with Python 2 and 3 used 'open' builtin method.
Also fixed the failing test cases due to that.

Change-Id: Ib84b0b28a845e49eaef969d0fc995b1adbb7b29d
2017-07-26 16:19:24 +05:30
Kengo Takahara 0cdbbf669d Remove log translations
Log messages are no longer being translated. This removes all use of
the _LC, _LE, _LI and _LW translation markers to simplify logging and to
avoid confusion with new contributions.

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Change-Id: Ic415d098199afb300eb7bd9967bf4a9acb457aec
2017-06-19 16:55:00 +09:00
poojajadhav f8c25dd2aa Add hacking check to ensure _ is imported
Added hacking check to ensure that _ is imported and allows multiple
imports from i18n module per line.

Change-Id: Ieffabd6f2fe866000c5dc1d9ce83acd2f9ab0450
2017-02-14 18:38:08 +05:30
Kengo Takahara dcb3211050 Add a mechanism to use the oslo libraries
Implement a mechanism for masakarimonitors to use oslo.log,
oslo.config and oslo.service.

Change-Id: I3e933d339b0998468464c6a804fff623f37afd55
2016-11-07 02:36:51 +00:00
Sampath Priyankara bb3728c9cc Initial Cookiecutter Commit.
Change-Id: I3a5df63fc0b4486bed457b7d42cd5d2b873fd307
2016-11-01 13:46:13 +09:00