Commit Graph

41 Commits

Author SHA1 Message Date
Hasan Acar 13121a1059 Making the gates happy
fix: allowlist_externals added to tox

fix: upgrading gevent

fix: pep8 issue fixed for slack_notifier

fix: change env list

Change-Id: Iefc7fdc89a398623aa3515c89240b53a49c10282
2024-03-06 13:42:44 +00:00
Martin Chacon Piza 5225304a26 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: Idc88314ead611a6bea4dba9115b0aed9e551bb87
2022-05-02 15:33:52 +02:00
Martin Chacon Piza 35a9b57f91 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.

Remove hacking and friends from lower-constraints, they are not needed
there at all.

Align lower-constraints for new pip [1]

Fix flake8 E305 and E117 and set W504 as ignored

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

Change-Id: Idae87291f4556eee77d40ab49f0d151435d70875
2021-02-23 17:20:15 +01:00
zhangchun 1b2ee4e5b6 bump py37 to py38 in tox.ini
in 'victoria' cycle, we should test py38 by default.
Trivial change

Change-Id: I6154d143e0cd0616ba27b6ae8b35fbbf88a70e4a
2020-11-02 10:42:27 +00:00
Martin Chacon Piza f519f2d67e Fix and unify cover environment
Fix cover environment and unify it accordingly to Project Testing
Interface [1].

[1] https://governance.openstack.org/tc/reference/pti/python.html#coverage-jobs

Change-Id: I24335128cb3566e4104ddc6dad9a53f1a5ec249b
2020-05-27 18:30:03 +02:00
Ghanshyam Mann fc8c53f221 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

monasca-notification 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: Ic69f559bc0bcd791fa33a978cd27cf1de10dba2d
2019-11-16 16:58:11 +00:00
pengyuesheng 13bc864da3 Update the constraints url
For more detail, see http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: Ib44307495bbba1e694a7e0dfb4c08fd516b7de56
2019-09-26 13:58:42 +08:00
Corey Bryant cd304f3ac3 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: I87be8b97790f73256e9b26b9756b5e8a2461314d
Story: #2005924
Task: #34223
2019-07-05 13:18:30 -04:00
prankul 99ee506665 Switch python3 versions of test jobs to match Train PTI
In Train, we will use python 3.6 and 3.7 for python3 runtime
in our gate jobs [1]. This commit also adds python 3.7.

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

Change-Id: If04a02179d37f5d088881d5d960b3e44b90e1023
2019-06-28 11:06:36 +00:00
Witek Bedyk 0e502cc463 [GateFix] Ignore false positive bandit B105 test failure
Bandit B105 hardcoded_password_string[1] is causing gate failure,
which is false positive.
Added a # nosec comment to skip Bandit testing of that line.

[1] https://bandit.readthedocs.io/en/latest/plugins/b105_hardcoded_password_string.html

Add local bindep.txt to include PostgreSQL dependendencies for testing.

Story: 2006058
Task: 34771

Change-Id: I579754a0e093e192366ad2783bd766473227e761
2019-06-27 17:57:12 +02:00
Ghanshyam Mann 2d129b3499 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: I579dea229152bde1178f06eab75bc19a44c474fd
2019-04-14 23:49:39 +00:00
Witek Bedyk 0f316afc87 Configure releasenotes job
Change-Id: Iedd229fa9669d0b6d6d59eb111a44bdf1d0bc80e
2019-02-01 09:40:26 +01:00
Nguyen Hai Truong cf0d349b56 Add python 3.6 unit test job
This is a mechanically generated patch to add a unit test job running
under Python 3.6 as part of the python3-first goal.

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

Change-Id: Ie416bb7ae6876e29f4ec2d376df09710a4a454ae
2018-11-06 01:28:18 -08:00
Sean McGinnis 9facd77247 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 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: If6b6ce5a6ad26c5a9bdc7ec819a1993411b848a4
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2018-10-30 10:10:00 -05:00
Chuck Short d008bbcab5 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: I5a184338147c858420b131e90837b7430fbf284c
Signed-off-by: Chuck Short <chucks@redhat.com>
2018-07-25 08:57:43 -04:00
Witold Bedyk 20d6557744 Convert README to reStructuredText
* Add PyPI validation check for README.rst [1]
* Add docutils to test-requirements.txt
* Add lower bound for jira

[1] https://docs.openstack.org/project-team-guide/project-setup/python.html#running-the-style-checks

Change-Id: I5d90ccb1b919c4bab66b468a8ddb714ffc5f1635
Story: 2001980
Task: 20013
2018-06-19 15:19:00 +02:00
huang.zhiping 086428009c 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: I5db260ef3cdd09a5cf6b87733db34b5ad830deab
2018-06-09 11:11:10 +08:00
Zuul 6b99ff9253 Merge "Fix lower-constraints job" 2018-04-23 09:36:46 +00:00
Witold Bedyk 9a6edb40a5 Fix lower-constraints job
* update requirements from global-requirements
* move common commands to [testenv]
* bump monasca-statsd to 1.4.0 which is the first version with Python 3
  support
* add funcsigs, Jinja2 and jira to lower-constraints.txt

Depends-On: https://review.openstack.org/562151
Change-Id: I427dd136b385f8784e6d16b174dcadf3ffa555a7
2018-04-18 10:53:31 +02:00
Jui Chandwaskar d396753a83 Update pep8 checks
* Set max line length to 100
* Clean up code for pep8 checks

Change-Id: Ie00dc204f522fb2112f02f4151ec8a15d5523459
Signed-off-by: Jui Chandwaskar <jchandwaskar@op5.com>
2018-04-11 14:16:27 +02:00
Doug Hellmann 347049e78f 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: Id195a44f356607f68dd88246f09ae0a4f46ca64a
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-22 15:48:57 -04:00
Witold Bedyk ba64c4e922 Clean up tox.ini
Change-Id: Ic766773ddcf51811867b0598fc890bee740d0d02
2018-02-09 15:31:24 +01:00
Tomasz Trębski e1a9b9a96a Integrate with oslo.conf and oslo.log
Change upgrades the monasca-notification to leverage
the capabilities of both oslo.log and oslo.conf:

- configuration of logging separated from application settings
- ability to enforce data types for application settings
- ability to use oslo.config-generator capabilities
- automatic configuration parsing done by oslo.cfg

That change will bring it closer to the rest of monasca
components where such transition has happened already.
However, in the rest of monasca, oslo.cfg was partially
or fully implemented whereas monasca-notification has
been relying on YAML based configuration file.

Therefore backward compatybility for such format will
be kept for now.

Story: 2000959
Task: 4093
Task: 4092

Change-Id: Ia75c3b60d0fada854178f21ca5ccb9e6a880f37f
2017-10-20 09:32:11 +02:00
Haruki Yamanashi 46a36adde0 Add unit test for Jira
Add unit test for Jira notifier which achieves 100% coverage.

Change-Id: Iae22a35a5bec5f173c3fae60df393d55b805e0fb
2017-07-19 16:58:24 +09:00
Tomasz Trębski fe78b6d698 Make monasca-notification Py35 compatible
Adjust the monasca-notification to run
under Python3.5

Story: 2000975
Task: 4130

Change-Id: I3bf2725fb2904374d7bae51ebf061a47dcbef0c0
2017-07-18 13:31:41 +02:00
Tomasz Trębski c9f0a8e63c Enable Py35 tests to run
Python3.5 tests were not running because Python3 has not
Queue module (instead have queue module). Commit
does not fix failing tests but gives an insight in what
exactly is failing and allows to fix them in future.

Also applied sixer utility to fix common Py2-Py3 compatybility
issues.

Additionally:
* removed unconstrained mysql and psycopg drivers from tox.ini.
  Instead added them to test-requirements to be picked up
  by requirements bot. That also allowed to remove 3 tox
  environments.
* added removing .testrepository/times.dbm (may cause py3 environment
  to fail if present)

Change-Id: I9bcc33dad80fdfbf60d95c4bb0ce7f79f642a414
2017-04-07 19:15:10 +00:00
Craig Bryant ef9db22744 Turn on bandit check as part of pep8
Add bandit job as part of pep8 in tox.ini

Had to mark two instances of try except pass as OK so that bandit
will pass

Change-Id: If3b78e9dcbfc65c232a6ba35665430a6463841e6
2017-02-07 12:13:12 -07:00
Tomasz Trębski 5de3ee9f23 Migrate tests to ostestr
Following commits migrates running
monasca-notification tests from nosetest
to ostestr, similar to other openstack projects.
Additionally, it enables calculating coverage
and py35 tests.

Extra:
* added debug environment with oslo_debug_helper

Change-Id: I555176b7f2ed54c3222312da341d433f429c5c6a
2017-01-19 06:15:40 +01:00
Andreas Jaeger 8f5b357b73 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: I97e88cef6d58dfc11110d2851330a06c8d8a4283
2016-08-30 20:15:57 +02:00
Ovidiu Rusu 18863c724f Removed H302, H305 and H307
I unlock the hacking requirements in test-requirements.txt

H302 and H305 have already been removed from the OpenStack Hacking
library. Removing them from the tox file shouldn't have required
any code changes.

Change-Id: I83f8940cbc24f2c4ae25ead3803faeea49008b58
2016-08-05 16:54:53 +03:00
Bogdan Carpusor b28dd60726 Fix H904: wrapping using paratheses
Enabled H904 in tox.ini and made changes in relevant files
in order to follow the standard.
Modified the test-requirements file in order to use the newer
version of the hacking library.

Change-Id: I47dd0308eba41dee5f59928499539386731d786b
2016-08-03 11:38:35 +03:00
Kaiyan Sheng 17522adab7 [monasca-notification] Constraint tox targets with upper-constraints
This review is to prepare for adding monasca-notification into openstack
global-requirements. After this project gets into global requirements,
it will be in upper-constraints.txt. If we make changes on this
specific project, we need to replace it in the upper-constraints with
source based specifier before applying it to pip install.

Change-Id: Icd60219145f99b5321800db10da83fcaec621c77
2016-05-20 16:30:07 -06:00
Michael James Hoppal 1fcb2fdf57 Change tox file
Add upper-constraints and min tox version.

This will prevent taking in packages that
are greater then what is defined in the
upper-constraints

Change-Id: Id5ac796b49bd9dc163fb017f43aadfde515cddbe
2016-04-20 15:55:37 -06:00
Jenkins cfd9b46b5f Merge "Migrate from MysqlDB to pymysql" 2016-01-08 18:38:01 +00:00
Michal Zielonka 94f5bdbd62 Migrate from MysqlDB to pymysql
Change-Id: I61b7a35badaa4a3480a1c786152b07c17a99bf80
2015-12-16 09:51:28 +01:00
Ondřej Nový a95852239d 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: I54711ed40598e8ee4b0385199b14f743aa4e4f04
2015-12-11 21:19:55 +01:00
Haiwei Xu 51b0b28a05 Delete python bytecode before every test run
Bring over the cleaning line from run_tests.sh for the pyc files to
all the tox runs.

This should eliminate the need to clean -x -i to kill pyc files in
your local directory to get tests to pass.

Change-Id: I3e1c53a26440aaff5dd92cd5381d71a1d411ebe8
Closes-Bug: #1368661
2015-12-02 13:27:30 +09:00
Michal Zielonka a82a49a1e8 Add configurable database setting (mysql, postgres, orm)
We used sqlalchemy.core for execute query for orm.
The configuration of db is based on monasca-api.
The default mode is mysql connection so we can use old configuration.

Change-Id: Iebb4d6dfca6d43298ced407178e7f9673a83a7ca
2015-08-04 22:34:57 +02:00
Christian Berendt acd945035e Use hacking instead of flake8/pep8
Change-Id: I77afe69bb9b90aa85e3e8e688c9fa6835e4166af
2014-07-24 11:47:14 +02:00
Tim Kuhlman aab28f8138 Added virtual env to the tox.ini so the push to pypi will work correctly
Change-Id: I793a384cbba604c6c543c524c6c32217c590346a
2014-07-17 09:55:00 -06:00
Tim Kuhlman e6e54c6576 Rename to monasca, setup for tox, removed legacy bits
Removed manual tests which are no longer valid with a modern mini-mon
Removed debian creation bits all distribution is with pypi now
Minor pep8 fixes

Change-Id: I1f2fc4d0ad6375f4c39446f9627247945066e4ad
2014-07-16 15:59:00 -06:00