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
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
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
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>
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>
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
* 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
* Set max line length to 100
* Clean up code for pep8 checks
Change-Id: Ie00dc204f522fb2112f02f4151ec8a15d5523459
Signed-off-by: Jui Chandwaskar <jchandwaskar@op5.com>
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>
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
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
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
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
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
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
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
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
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
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
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