14 Commits

Author SHA1 Message Date
Andreas Jaeger
441d6efcd8 Remove -U from pip install
'pip install -U' ugrades specified packages, this is not necessary
since we use constraints, remove the parameter '-U' from the line.

With tools/tox_install.sh - which a previous change of mine removed -
the -U was not harmful, but with the current set up, it might cause
upgrades, so remove it.

Change-Id: Ife6a6d88f636057f87d47fe79af8bfcff897ccc1
2017-12-02 19:27:29 +01:00
Andreas Jaeger
bad98c6722 Avoid tox_install.sh for constraints support
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.

This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.

Change-Id: Ib55145fd3f0ed0d8d56379c718e91ff55aa4aa27
2017-12-01 15:38:37 +01:00
Witold Bedyk
4d1715d3a9 Add bindep.txt
Change-Id: I89432f196f8cdaa66e3c113c55f5e84f15906dd6
2017-04-12 18:16:38 +02:00
Tomasz Trębski
cabc2ddd5f Migrate to ostestr framework and PY3
Following commits does several things:

* migrates CI of monasca-common to ostestr
* enables PY35 compatybility

Also:

* marked one tests as excluded under PY35 because changing
it would require affecting embedded kafka library which
will be eventually removed in future

Change-Id: I432a466e2620bc8d305ef2630307b636461c8e81
2017-03-02 19:51:04 +01:00
Craig Bryant
e8005cf1f1 Turn on bandit check as part of pep8
Add bandit job as part of pep8 in tox.ini

Had to ignore assert check since those are use for performance in the
validation code. Also, skipped bandit checks of monasca_common/kafka_lib
since that is just a clone of kafka-python and will be deleted in the
future

Change-Id: Ie2e726a8e45ef463c4e863792eed663ee472ed07
2017-02-09 09:04:56 -07:00
Joe Keen
cb2ec23cee Fork 0.9.5 kafka-python and require pykafka
To let other OpenStack projects move forward with new versions of kafka-python
we're forking kafka-python and embedding it in monasca-common.  This allows us
to migrate to the new async interfaces provided by more recent kafka clients
over time and not block other projects.

Requiring pykafka to allow us to have ~4x more throughput once we write to
their async interfaces.

Change-Id: Ifb6ab67ce1335a5ec4ed7dd8b0027dc9d46a6dda
Depends-On: I26f9c588f2818059ab6ba24f9fad8e213798a39c
2017-01-21 10:40:55 -07:00
Lukasz Wiecek
aae558035e Add proxy configuration for tox.ini file
Change-Id: I53b2fe578845d6a580efb2d8ef548b0b3e928eb1
2017-01-17 13:14:06 +01:00
gecong1973
b56e43aff7 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: I2e1a7ac2f9a8734ec60cf01ef04251fac3882452
2016-11-25 11:22:13 +08:00
Andreas Jaeger
21a38261d4 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: I27937c1fe02cd6fc04bd94a5162f78aef04b9c16
2016-08-30 20:14:13 +02:00
Laszlo Hegedus
c98478df18 Make monasca-common pep8 compatible
Cleaned up test-requirements.txt in order to use the latest hacking
package.
Removed the ignored pep8 checks and made the code pass all of them.

Also removed the OpenStack Foundation copyright notice that was put
there accidentally before.

Change-Id: I3d287eb71fc2bf0e4d52856c11cbc8a347cac2ed
2016-06-04 09:22:43 +00:00
Kaiyan Sheng
741a24e41a [monasca-common] Constraint tox targets with upper-constraints
This review is to prepare for adding monasca-common 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: I67a3e3fcb833e273900c490643197988efd5eb3b
2016-05-20 16:45:58 -06:00
Laszlo Hegedus
bfc88d4f05 Add unit tests for common Kafka module
Add tests for kafka producer and consumer modules. The test coverage
of monasca_common was was 9%. This is improved in this commit.

Show test coverage when running tox. Change the nosetests command to
show test coverage for the whole module.

Change-Id: I771a539aee5fa92c065ee16b5bb94c9ae7e7a09b
2016-05-17 10:50:12 +02:00
Haiwei Xu
e4ca678359 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: I0f59c977411d20751a26cac39504c51896b2eab8
Closes-Bug: #1368661
2015-12-02 13:34:00 +09:00
cindy oneill
21d3947845 initial python monasca-common code in monasca_common
This is the start of a python monasca-common package.
Initially it has a common python logging config,
common oslo opts, and mysql common code.

Change-Id: I15c32b72fc42a8c5ce9eeedf20ca3a11907bf29f
2015-09-01 13:56:39 -06:00