Commit Graph

29 Commits

Author SHA1 Message Date
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
Martin Chacon Piza 44fe8f1c39 [goal] Migrate testing to ubuntu focal
As per victoria cycle testing runtime and community goal[1]
we need to migrate upstream CI/CD to Ubuntu Focal(20.04).

Bump the pyflakes to 2.1.1 as min version to run pep8 jobs
on py3.8 which is default python vesion in ubuntu focal.

Bump netaddr to 0.7.20 in lower-constraints.txt
since it is the min version with py3.8 support [2]

Bump psycopg2 to 2.8.4 in lower-constraints.txt
since it is the min version with py3.8 support [3]

Story: #2007865
Task: #40197

[1] https://governance.openstack.org/tc/goals/selected/victoria/migrate-ci-cd-jobs-to-ubuntu-focal.html
[2] cc2a9bb31f
[3] https://pypi.org/project/psycopg2/2.8.4/

Change-Id: I736f141b53d5fb985e5deaa5d77c552ebad6fccd
2020-09-29 15:10:52 -05:00
Sean McGinnis db7377f476 Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: I380f25044c8f7b496d485aabf09215468f955818
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-23 10:29:22 +00: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
Witek Bedyk 1837192534 Blacklist bandit and update sphinx requirement
The change blacklists the buggy version of bandit (1.6.0) and syncs
sphinx dependency with global requirements. It caps python 2 since
sphinx 2.0 no longer supports Python 2.7.

Change-Id: I21c8a7ef793874a5ab7a4d277c9c3eb13896503d
Story: 2005676
Task: 30990
2019-05-15 15:56:49 +02:00
Dobroslaw Zybort 85d7d6520d Bump psycopg2 lowest version
There is a bug in 2.6 line of psycopg2 that does not properly detect
Postgresql 10 versions.

https://github.com/psycopg/psycopg2/issues/489

Change-Id: If5f773fb9e1ee2cb4e3fff71cd65539caa065e10
2019-04-08 09:12:48 +02:00
melissaml 226a070b4a Update hacking version to latest
Story: 2004930
Task: 29317

Change-Id: I8d7ad198599943fc23a8a55d25eab672c096725d
2019-02-08 15:49:23 +01: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
Andreas Jaeger 99796ebb7f Update requirements manually
The global requirments sync for this repo fails since it lists
packages that are not in the global list. Manually sync
requirements.

Failure log from requirements sync:
http://logs.openstack.org/d8/d89aad257d43fe02e42e44b2a0187dbd9f505c36/post/propose-update-requirements/15a7777/job-output.txt.gz#_2018-01-31_06_57_19_908947

Errors are:
'jira' is not in global-requirements.txt or blacklist.txt

Change-Id: If85ee1bf750d310f7a3d2f52c6fd224a9ed822a2
2018-01-31 09:16:04 +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
Koji Nakazono 46b9afd03c Fix insert notification type of ORM
This patch fixes insert_notification_method_types of ORM.

Change-Id: I944f7cea583dd56cd1c777b1633498dde2abd31b
Story: 2001069
Task: 4685
2017-06-22 09:04:09 +09:00
OpenStack Proposal Bot 824d6ebe7f Updated from global requirements
Change-Id: Iec0c5fdcb9111e1641d871aec80fecf687d4fd9e
2017-05-15 00:46:52 +00:00
OpenStack Proposal Bot ff55e942fc Updated from global requirements
Change-Id: Id6dac62a83b1c049677c65c7ac7e979f3bfdf20b
2017-05-10 05:34:28 +00: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
OpenStack Proposal Bot 8c29814229 Updated from global requirements
Change-Id: I3b0a0b56dc5ee50da9d9a1ab0076634c8b5c91f6
2017-04-05 21:04:01 +00:00
OpenStack Proposal Bot 6da9a1eca9 Updated from global requirements
Change-Id: Ib026465c7d17b59712f4973264c1b2d376e9b339
2017-03-15 12:44:59 +00:00
OpenStack Proposal Bot 6c9b1bd636 Updated from global requirements
Change-Id: I0f003c26af567579c87fdf92da7940577c1a08dc
2017-02-11 17:44:24 +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
OpenStack Proposal Bot 5ea9ace311 Updated from global requirements
Change-Id: I11c158b3e808459a6660581305a7177b84b89676
2017-01-20 09:58:07 +00: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
OpenStack Proposal Bot 4c39e3ad67 Updated from global requirements
Change-Id: I0385ab1a77293d9175d980a4cfa400adead5a845
2016-09-03 01:56:37 +00: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
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
Joe Keen 5d13cdfaca Updated test-requirements.txt because of mock update
Change-Id: I828e8d77d4c07d96449e3d1e5d8ffa42042068bf
2015-07-10 17:11:54 -06:00
Tim Kuhlman c15a3471b9 Add nosexcover to test requirements, it is useful for coverage reports
Change-Id: I2eb00ff8053086d6c7f0d8ebb95c98f2b6a35444
2015-06-16 16:54:36 -06:00
Christian Berendt acd945035e Use hacking instead of flake8/pep8
Change-Id: I77afe69bb9b90aa85e3e8e688c9fa6835e4166af
2014-07-24 11:47:14 +02: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
Tim Kuhlman 17a7694ea7 Added requirements files. 2014-03-25 11:02:18 -06:00