This patch implements followings for py35 support using six(er) and 2to3.
- Python 3 map/filter returns iterator, must be converted to list
- use six.string_types instead of basestring
- use six.iteritems instead of iteritems
- use six.moves for using cPickle and SocketServer packages
- use six.assertCountEqual instead of assertItemsEqual
- remove relative imports
- update BytecodeAssembler(monasca_analytics/
banana/bytecode/assembler.py) for python3
Can be tested with:
tox -e py35
Change-Id: If1b92d0ffc56492950f6a02ebdbe1596d0dce368
This patch includes the following updates.
- Remove "findspark" and "libpgm" packages.
There are no longer in use.
- Rename "sklearn" to "scikit-learn".
"global-reqirements" needs "scikit-learn" instead of "sklearn" which is old package name.
- Pin scipy version less than 1.2.0.
Currently, according to upper-constraints.txt of openstack/requirements, scipy version is '1.2.0'.
However, this scipy version seems to be unable to import and use some scikit-learn libraries.
- Remove "docopt" and re-wite code wihtout "docopt".
"docopt" is not used in OpenStack.
- Remove requirements-check job.
Currently, "tornado" is a required package, but requirements-check job has a error.
However, to remove that error, adding "tornado" package to openstack/requirements was refused.
Change-Id: I3bb98ef733ff16558d241968b06c31fa7508d047
monasca_analytics/exception/aggregator.py
monasca_analytics/exception/ml.py
monasca_analytics/exception/sink.py
monasca_analytics/exception/source.py
test/config/test_connections.py
are empty files. We probably should delete it.
Change-Id: I7b6b3f90da3d11888f84f5e8efe0996598b875fb
When I submitted the patches, I used wrong copyright on them.
This patch changes the copyright to appropriate one.
Change-Id: I0a48e9d416b99d72b4534de1f0376fd712f3a721
In python 3, range() does what xrange() used to do and xrange() does not
exist. If you want to write code that will run on both Python 2 and
Python 3, you can't use xrange().
range() can actually be faster in some cases - eg. if iterating over the
same sequence multiple times. xrange() has to reconstruct the integer
object every time, but range() will have real integer objects.
(It will always perform worse in terms of memory however)
xrange() isn't usable in all cases where a real list is needed.
For instance, it doesn't support slices, or any list methods.
Change-Id: I5233438a864bb00d04ba7fb2b1688cacb0473691
Some of tests use different method of
assertTrue(isinstance(A, B)) or assertEqual(type(A), B).
The correct way is to use assertIsInstance(A, B) provided
by testtools
Change-Id: I127045563897bccf77b2ba5a8975b2d7706ec3f6
This make the fake data generation much faster and configurable.
For the cloud example, the phase 2 is now triggered in less than 5
seconds instead of 6 minutes.
Change-Id: I9967c94d28a380fa19afe9275e769f1465f4f922
As of this commit, to change the configuration using Banana, we
need to make an HTTP POST request to `/banana` REST API. This API is
temporary and is likely to be changed later.
The implementation is done entirely in the `banana` module. Under this
module there are:
* `typeck` module contains the type checker,
* `grammar` module contains the parser and the AST and,
* `eval` module contains the interpreter.
Additionally, a test framework has been created to ease the test of
particular conditions of the language.
Within the banana module, there is a README.md file for each associated
sub-module explaining further the details of the language.
Once this commit is merged, there's still a lot that can be improved:
- All components should be tested in Banana.
- The 'deadpathck' pass could be improved (see TODO)
- We don't support generated JSON ingestors yet.
- Imports will be key for reusability (not implemented).
Change-Id: I1305bdfa0606f30619b31404afbe0acf111c029f
This commit introduces 3 examples of LDPs that process
monasca metrics:
* `Aggregate` - compute simple stats per metric name.
* `Combine` - allow mixing of different metrics by providing
a simple expression parser that gets transformed into
CPython bytecode.
* `Derivative` - compute a metric derivative.
While quite simple, those examples, will help us improve the
framework by emphazing some of the problems we will face when
working on more complex solution such as:
* Spark's inability to share data between sliding windows.
* Ordering of data.
* Sampling of metrics / events.
Change-Id: I259022f20e9b288aa2a08c24ad4a5f41a20e6095
This patch fixes followings:
*two lines of Apache license in order to pass H103
*using homedir in PYTHONPATH
Co-Authored-By: Daisuke Fujita <fuzita.daisuke@jp.fujitsu.com>
Change-Id: I8fbe26ae8547879fdda0f840bfc5d582e0395588