Sign inSign up

beetaone/comparison-filter

By beetaone

Updated almost 2 years ago

Image
0

185

beetaone/comparison-filter repository overview

Comparison Filter

nameComparison Filter
versionv1.0.1
GitHubcomparison-filter
DockerHubbeetaone/comparison-filter
authorsJakub Grzelak, Paul Gaiduk

Table of Content


Description

This module is responsible for filtering the data based on an algebraic comparisons : <, >, <=, >=, ==, !=.

Module Variables

The following module configurations can be provided in a data service designer section on beetaone platform:

Environment VariablestypeDescription
INPUT_LABELstringThe input label on which anomaly is detected
CONDITIONstringCondition for filtering data
COMPARE_VALUEstringThe value to compare with
MODULE_NAMEstringName of the module
MODULE_TYPEstringType of the module (Input, Processing, Output)
LOG_LEVELstringAllowed log levels: DEBUG, INFO, WARNING, ERROR, CRITICAL. Refer to logging package documentation.
INGRESS_HOSTstringHost to which data will be received
INGRESS_PORTstringPort to which data will be received
EGRESS_URLSstringHTTP ReST endpoint for the next module

Module Testing

To test module navigate to test directory. In test/assets edit both .json file to provide input for the module and expected output. During a test, data received from the listeners are compared against expected output data. You can run tests with make run_test.

Dependencies

The following are module dependencies:

  • bottle
  • requests

The following are developer dependencies:

  • pytest
  • flake8
  • black

Input

Input to this module is JSON body single object:

Example of single object:

{
  temperature: 15
}

Output

Output of this module is JSON body the same as input data if chosen comparison condition is satisfied:

{
  temperature: 15
}

Tag summary

Content type

Image

Digest

sha256:5fe3fd76f

Size

49.1 MB

Last updated

almost 2 years ago

docker pull beetaone/comparison-filter:v1.0.1