18 Commits

Author SHA1 Message Date
Adrian Czarnecki
5f168778c6 Use oslo-config-generator
To generate the sample config file, do what other OpenStack projects do
and use the oslo.config provided mechanism.

Story: 2001009
Task:  4201

Change-Id: I490de4110843f7dfd618a6a8cc8d6a4e35db65ce
2017-07-28 13:48:01 +02:00
Vu Cong Tuan
73659730ae Define extra hacking rules to ensure code quality
Enforce following codestyle rules:

* no xrange
* no LOG.warn usage (deprecated in favour of LOG.warning)
* usage of assertTrue(x) instead assertEqual(True, x)
* usage of assertIsNone(x) instead assertEqual(None, x)
* usage of assertIsNotNone(x) instead assertNotEqual(None, x)
  or assertIsNot(None, x)

Change-Id: Ib5b61816faae95937c99b1e4f651c6390b888070
2017-06-05 13:42:28 +07:00
Jenkins
825f2e9cce Merge "Fix requirements for influxdb and cassandra" 2017-05-30 05:33:23 +00:00
Dobroslaw Zybort
b7184a8ddd Remove nose from test-requirements
Clean after tests properly.

Change-Id: I44c8d26dc22d0e2cb88c3dd365e4691a8af76117
2017-05-15 07:36:36 +02:00
Thomas Bechtold
659ddefdb0 Fix requirements for influxdb and cassandra
Both are optional requirements (but one must be used) so add both to the
"extras" section instead of a commented entry in requirements.txt .

Change-Id: I1f0eca2474ca275f64314a7b30b18e534afefdee
2017-05-05 10:22:14 +02:00
Witold Bedyk
f1ae971c45 Add bindep.txt
Change-Id: Ia4483b6718717271088112868b560ed9d19e4799
2017-04-12 18:10:55 +02:00
Craig Bryant
7082ded836 Turn on bandit check as part of pep8
Add bandit job as part of pep8 in tox.ini

Had to fix one issue and mark two instances of try except pass as OK so that
bandit will pass

Change-Id: Ia1c96e27d1bae360c6ae0d4131665e2b712f573f
2017-02-08 11:22:18 -07:00
Laszlo Hegedus
b3f9359608 Add persister.py unit tests
Add unit tests for persister.py in root directory.
Additionally:
* switched to testr as it seems to be used in many
openstack projects
* enabled coverage

Change-Id: I429ef6a900808c192ad5613c13808583d33fde24
2017-01-12 09:18:29 +00:00
gecong1973
313cbcda44 Don't include openstack/common in flake8 exclude list
There is no this directory openstack/common which was used
to keep codes from oslo-incubator, we have retired oslo-incubator.
Removing openstack/commonfrom all OpenStack code in favor of the
Oslo libraries is a project wide goal for the Ocata release. So
don't use this directory any more. We should drop it for improving
searching efficiency.

Change-Id: I65e1a75c65d44ff50c9ab0c2ff8c66faa99c227b
2016-11-25 11:09:38 +08:00
Andreas Jaeger
b618c58cec 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: If8a11e1c4201570e1c1fa90ce35852704ff3bf13
2016-08-30 20:17:34 +02:00
Paula Madalina Crismaru
57e10bbcb7 Fixes H201: no 'except:' at least use 'except Exception:'
Enabled H201 on tox and changes made in relevant files.

Change-Id: I7e1f05d9f90b11ac89b371e66ed9a0010462ad01
2016-07-29 10:22:02 +03:00
Micu Matei-Marius
43194f0d72
Removed H302, H305 and H307
I unlock the hacking requirements in test-requirements.txt

Change-Id: I2a26845f16064be8c082d9cbe2e2d2bc48339314
Signed-off-by: Micu Matei-Marius <mmicu@cloudbasesolutions.com>
2016-06-30 22:22:23 +03:00
Kaiyan Sheng
3117fbad51 [monasca-persister] Constraint tox targets with upper-constraints
This review is to prepare for adding monasca-persister 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: Ife8c77d41815b262300068497f7197af35ef2f5a
2016-05-20 16:40:21 -06:00
Michael James Hoppal
1f16a2763a 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: I4a7aea0900efa767a4a557d20d601caa9938dfeb
2016-04-20 15:55:39 -06:00
Ondřej Nový
011469ebf0 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: Ief61149c2c094b8d3aee8912a26381e42f068cfe
2015-12-11 23:05:08 +01:00
Haiwei Xu
ab92eef888 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: Ifc8df1634336fdfd298c353ad808c77f48b87b68
Closes-Bug: #1368661
2015-12-02 13:34:55 +09:00
Deklan Dieterly
d3acf12034 Increase throughput of persister
Add batching to InfluxDB writes to improve throughput.

Change-Id: Ia173f55726cb11245f0bcf4580f1af8129c23aa3
2014-10-02 11:40:18 -06:00
Deklan Dieterly
3cf22f1c0d Add files for pypi.
Change-Id: Ib382ed1e15a7c124cab2124692e7d2e8e31bab1c
2014-09-30 15:21:50 -06:00