From 60f4937adc5c933ac485edc8abfca371235dec0d Mon Sep 17 00:00:00 2001 From: Dympna Laverty <118898375+dlaverty-r7@users.noreply.github.com> Date: Thu, 23 Nov 2023 10:58:46 +0000 Subject: [PATCH] Updated to use latest tooling (#2135) Co-authored-by: Dympna Laverty --- plugins/matplotlib/.CHECKSUM | 16 +++++++-------- plugins/matplotlib/Dockerfile | 7 +++++-- plugins/matplotlib/bin/komand_matplotlib | 20 +++++++++---------- .../komand_matplotlib/actions/__init__.py | 1 + .../create_distribution_plot/__init__.py | 2 +- .../create_distribution_plot/schema.py | 15 ++++++++------ .../actions/create_joint_plot/__init__.py | 2 +- .../actions/create_joint_plot/schema.py | 15 ++++++++------ .../actions/create_line_plot/__init__.py | 2 +- .../actions/create_line_plot/schema.py | 14 +++++++------ .../actions/create_pair_plot/__init__.py | 2 +- .../actions/create_pair_plot/schema.py | 15 ++++++++------ .../actions/create_scatter_plot/__init__.py | 2 +- .../actions/create_scatter_plot/schema.py | 14 +++++++------ .../komand_matplotlib/connection/__init__.py | 2 +- .../komand_matplotlib/connection/schema.py | 4 ++-- .../komand_matplotlib/tasks/__init__.py | 2 ++ .../komand_matplotlib/triggers/__init__.py | 1 + plugins/matplotlib/setup.py | 4 ++-- plugins/matplotlib/unit_test/__init__.py | 1 + .../test_create_distribution_plot.py | 20 +++++++++++++++++++ .../unit_test/test_create_joint_plot.py | 20 +++++++++++++++++++ .../unit_test/test_create_line_plot.py | 20 +++++++++++++++++++ .../unit_test/test_create_pair_plot.py | 20 +++++++++++++++++++ .../unit_test/test_create_scatter_plot.py | 20 +++++++++++++++++++ 25 files changed, 181 insertions(+), 60 deletions(-) create mode 100644 plugins/matplotlib/komand_matplotlib/tasks/__init__.py create mode 100644 plugins/matplotlib/unit_test/__init__.py create mode 100644 plugins/matplotlib/unit_test/test_create_distribution_plot.py create mode 100644 plugins/matplotlib/unit_test/test_create_joint_plot.py create mode 100644 plugins/matplotlib/unit_test/test_create_line_plot.py create mode 100644 plugins/matplotlib/unit_test/test_create_pair_plot.py create mode 100644 plugins/matplotlib/unit_test/test_create_scatter_plot.py diff --git a/plugins/matplotlib/.CHECKSUM b/plugins/matplotlib/.CHECKSUM index bb7e5cd458..6bbdfaabd9 100644 --- a/plugins/matplotlib/.CHECKSUM +++ b/plugins/matplotlib/.CHECKSUM @@ -1,31 +1,31 @@ { "spec": "a08b2fe669cda4852e9518a47ad56982", - "manifest": "cb9f2a0c6812a8be74169c3220a7ba57", - "setup": "60de923a251f440cf982a23c7e3775bc", + "manifest": "615cde7003c2d075e5803e4e076d1cd3", + "setup": "f2d218b8d7db702e36f203a43d524438", "schemas": [ { "identifier": "create_distribution_plot/schema.py", - "hash": "792f65b33c8a1df87d91b2d428cab53d" + "hash": "e935f247ea65f88d53c8ffc53e44e3ef" }, { "identifier": "create_joint_plot/schema.py", - "hash": "fc600281960a69cd96a77a88a2611035" + "hash": "eae8a3f2db5a56b9720d75abf7c2c460" }, { "identifier": "create_line_plot/schema.py", - "hash": "4936aa1cbf635ac563280326e103ca4a" + "hash": "fec3f1c55443414e0e1eefb4e045fe58" }, { "identifier": "create_pair_plot/schema.py", - "hash": "a6f7ae17608cdea4e4c956af0c0a0aa4" + "hash": "53bebfa27e5fd8d20c31e87396e72962" }, { "identifier": "create_scatter_plot/schema.py", - "hash": "ed4cf35a1ab1f9ce62ad4246c48235be" + "hash": "32553e9f1b62a73e3de638e6ce16b492" }, { "identifier": "connection/schema.py", - "hash": "9d48eac9e9c489dbd77132ce1378f009" + "hash": "bd524b567f9638ba1c6f7e0c9e45ff2e" } ] } \ No newline at end of file diff --git a/plugins/matplotlib/Dockerfile b/plugins/matplotlib/Dockerfile index 0c5d3c6a6c..f3662dc88f 100755 --- a/plugins/matplotlib/Dockerfile +++ b/plugins/matplotlib/Dockerfile @@ -4,14 +4,17 @@ LABEL organization=rapid7 LABEL sdk=python WORKDIR /python/src + ADD ./plugin.spec.yaml /plugin.spec.yaml -ADD . /python/src +ADD ./requirements.txt /python/src/requirements.txt RUN if [ -f requirements.txt ]; then pip install -r requirements.txt; fi +ADD . /python/src + RUN python setup.py build && python setup.py install # User to run plugin code. The two supported users are: root, nobody USER nobody -ENTRYPOINT ["/usr/local/bin/icon_matplotlib"] \ No newline at end of file +ENTRYPOINT ["/usr/local/bin/komand_matplotlib"] diff --git a/plugins/matplotlib/bin/komand_matplotlib b/plugins/matplotlib/bin/komand_matplotlib index 1da932da0e..97be0466a5 100755 --- a/plugins/matplotlib/bin/komand_matplotlib +++ b/plugins/matplotlib/bin/komand_matplotlib @@ -1,12 +1,12 @@ #!/usr/bin/env python -# GENERATED BY KOMAND SDK - DO NOT EDIT +# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT import os import json from sys import argv Name = "Matplotlib" Vendor = "rapid7" -Version = "1.0.2" +Version = "1.0.3" Description = "Provides graphing capability of base64 encoded CSV data using Matplotlib, NumPy, Pandas, and Seaborn" @@ -23,7 +23,7 @@ def main(): monkey.patch_all() import insightconnect_plugin_runtime - from komand_matplotlib import connection, actions, triggers + from komand_matplotlib import connection, actions, triggers, tasks class ICONMatplotlib(insightconnect_plugin_runtime.Plugin): def __init__(self): @@ -34,16 +34,16 @@ def main(): description=Description, connection=connection.Connection() ) + self.add_action(actions.CreateLinePlot()) + + self.add_action(actions.CreateScatterPlot()) + self.add_action(actions.CreateDistributionPlot()) - + self.add_action(actions.CreateJointPlot()) - - self.add_action(actions.CreateLinePlot()) - + self.add_action(actions.CreatePairPlot()) - - self.add_action(actions.CreateScatterPlot()) - + """Run plugin""" cli = insightconnect_plugin_runtime.CLI(ICONMatplotlib()) diff --git a/plugins/matplotlib/komand_matplotlib/actions/__init__.py b/plugins/matplotlib/komand_matplotlib/actions/__init__.py index a31f5cc5f2..932dbd2c77 100755 --- a/plugins/matplotlib/komand_matplotlib/actions/__init__.py +++ b/plugins/matplotlib/komand_matplotlib/actions/__init__.py @@ -9,3 +9,4 @@ from .create_joint_plot.action import CreateJointPlot from .create_pair_plot.action import CreatePairPlot + diff --git a/plugins/matplotlib/komand_matplotlib/actions/create_distribution_plot/__init__.py b/plugins/matplotlib/komand_matplotlib/actions/create_distribution_plot/__init__.py index 65cb884ba5..fbe98c7462 100755 --- a/plugins/matplotlib/komand_matplotlib/actions/create_distribution_plot/__init__.py +++ b/plugins/matplotlib/komand_matplotlib/actions/create_distribution_plot/__init__.py @@ -1,2 +1,2 @@ # GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT -from .action import CreateDistributionPlot \ No newline at end of file +from .action import CreateDistributionPlot diff --git a/plugins/matplotlib/komand_matplotlib/actions/create_distribution_plot/schema.py b/plugins/matplotlib/komand_matplotlib/actions/create_distribution_plot/schema.py index bfca3691ea..1614a8f2a4 100755 --- a/plugins/matplotlib/komand_matplotlib/actions/create_distribution_plot/schema.py +++ b/plugins/matplotlib/komand_matplotlib/actions/create_distribution_plot/schema.py @@ -21,7 +21,7 @@ class Output: class CreateDistributionPlotInput(insightconnect_plugin_runtime.Input): - schema = json.loads(""" + schema = json.loads(r""" { "type": "object", "title": "Variables", @@ -30,6 +30,7 @@ class CreateDistributionPlotInput(insightconnect_plugin_runtime.Input): "type": "string", "title": "Color Palette", "description": "Color palette of the plot", + "default": "dark", "enum": [ "deep", "muted", @@ -49,7 +50,7 @@ class CreateDistributionPlotInput(insightconnect_plugin_runtime.Input): "csv_data": { "type": "string", "format": "bytes", - "display_type": "bytes", + "displayType": "bytes", "title": "CSV Data", "description": "Base64 encoded CSV data from which to create the plot", "order": 1 @@ -58,12 +59,14 @@ class CreateDistributionPlotInput(insightconnect_plugin_runtime.Input): "type": "boolean", "title": "KDE", "description": "Display a kernel density estimation line on the plot", + "default": false, "order": 3 }, "margin_style": { "type": "string", "title": "Margin Style", "description": "Style of the margin of the plot", + "default": "dark", "enum": [ "darkgrid", "whitegrid", @@ -90,7 +93,7 @@ def __init__(self): class CreateDistributionPlotOutput(insightconnect_plugin_runtime.Output): - schema = json.loads(""" + schema = json.loads(r""" { "type": "object", "title": "Variables", @@ -98,7 +101,7 @@ class CreateDistributionPlotOutput(insightconnect_plugin_runtime.Output): "csv": { "type": "string", "format": "bytes", - "display_type": "bytes", + "displayType": "bytes", "title": "CSV", "description": "Base64 encoded CSV data used to generate the plot", "order": 1 @@ -106,7 +109,7 @@ class CreateDistributionPlotOutput(insightconnect_plugin_runtime.Output): "plot": { "type": "string", "format": "bytes", - "display_type": "bytes", + "displayType": "bytes", "title": "Plot", "description": "Base64 encoded PNG plot data (can be attached to an email)", "order": 2 @@ -121,4 +124,4 @@ class CreateDistributionPlotOutput(insightconnect_plugin_runtime.Output): """) def __init__(self): - super(self.__class__, self).__init__(self.schema) \ No newline at end of file + super(self.__class__, self).__init__(self.schema) diff --git a/plugins/matplotlib/komand_matplotlib/actions/create_joint_plot/__init__.py b/plugins/matplotlib/komand_matplotlib/actions/create_joint_plot/__init__.py index 251680cb55..e32d13e3df 100755 --- a/plugins/matplotlib/komand_matplotlib/actions/create_joint_plot/__init__.py +++ b/plugins/matplotlib/komand_matplotlib/actions/create_joint_plot/__init__.py @@ -1,2 +1,2 @@ # GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT -from .action import CreateJointPlot \ No newline at end of file +from .action import CreateJointPlot diff --git a/plugins/matplotlib/komand_matplotlib/actions/create_joint_plot/schema.py b/plugins/matplotlib/komand_matplotlib/actions/create_joint_plot/schema.py index 1e589fccd8..cdcdcf2549 100755 --- a/plugins/matplotlib/komand_matplotlib/actions/create_joint_plot/schema.py +++ b/plugins/matplotlib/komand_matplotlib/actions/create_joint_plot/schema.py @@ -22,7 +22,7 @@ class Output: class CreateJointPlotInput(insightconnect_plugin_runtime.Input): - schema = json.loads(""" + schema = json.loads(r""" { "type": "object", "title": "Variables", @@ -31,6 +31,7 @@ class CreateJointPlotInput(insightconnect_plugin_runtime.Input): "type": "string", "title": "Color Palette", "description": "Color palette of the plot", + "default": "dark", "enum": [ "deep", "muted", @@ -44,7 +45,7 @@ class CreateJointPlotInput(insightconnect_plugin_runtime.Input): "csv_data": { "type": "string", "format": "bytes", - "display_type": "bytes", + "displayType": "bytes", "title": "CSV Data", "description": "Base64 encoded CSV data from which to create the plot", "order": 1 @@ -53,6 +54,7 @@ class CreateJointPlotInput(insightconnect_plugin_runtime.Input): "type": "string", "title": "Kind", "description": "Kind of data representation to use in the created plot", + "default": "scatter", "enum": [ "scatter", "reg", @@ -66,6 +68,7 @@ class CreateJointPlotInput(insightconnect_plugin_runtime.Input): "type": "string", "title": "Margin Style", "description": "Style of the margin of the plot", + "default": "dark", "enum": [ "darkgrid", "whitegrid", @@ -105,7 +108,7 @@ def __init__(self): class CreateJointPlotOutput(insightconnect_plugin_runtime.Output): - schema = json.loads(""" + schema = json.loads(r""" { "type": "object", "title": "Variables", @@ -113,7 +116,7 @@ class CreateJointPlotOutput(insightconnect_plugin_runtime.Output): "csv": { "type": "string", "format": "bytes", - "display_type": "bytes", + "displayType": "bytes", "title": "CSV", "description": "Base64 encoded CSV data used to generate the plot", "order": 1 @@ -121,7 +124,7 @@ class CreateJointPlotOutput(insightconnect_plugin_runtime.Output): "plot": { "type": "string", "format": "bytes", - "display_type": "bytes", + "displayType": "bytes", "title": "Plot", "description": "Base64 encoded PNG plot data (can be attached to an email)", "order": 2 @@ -136,4 +139,4 @@ class CreateJointPlotOutput(insightconnect_plugin_runtime.Output): """) def __init__(self): - super(self.__class__, self).__init__(self.schema) \ No newline at end of file + super(self.__class__, self).__init__(self.schema) diff --git a/plugins/matplotlib/komand_matplotlib/actions/create_line_plot/__init__.py b/plugins/matplotlib/komand_matplotlib/actions/create_line_plot/__init__.py index 582cab813f..68e0d4301d 100755 --- a/plugins/matplotlib/komand_matplotlib/actions/create_line_plot/__init__.py +++ b/plugins/matplotlib/komand_matplotlib/actions/create_line_plot/__init__.py @@ -1,2 +1,2 @@ # GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT -from .action import CreateLinePlot \ No newline at end of file +from .action import CreateLinePlot diff --git a/plugins/matplotlib/komand_matplotlib/actions/create_line_plot/schema.py b/plugins/matplotlib/komand_matplotlib/actions/create_line_plot/schema.py index 3cd86bc548..7521920376 100755 --- a/plugins/matplotlib/komand_matplotlib/actions/create_line_plot/schema.py +++ b/plugins/matplotlib/komand_matplotlib/actions/create_line_plot/schema.py @@ -22,7 +22,7 @@ class Output: class CreateLinePlotInput(insightconnect_plugin_runtime.Input): - schema = json.loads(""" + schema = json.loads(r""" { "type": "object", "title": "Variables", @@ -31,6 +31,7 @@ class CreateLinePlotInput(insightconnect_plugin_runtime.Input): "type": "string", "title": "Color Palette", "description": "Color palette of the plot", + "default": "dark", "enum": [ "deep", "muted", @@ -44,7 +45,7 @@ class CreateLinePlotInput(insightconnect_plugin_runtime.Input): "csv_data": { "type": "string", "format": "bytes", - "display_type": "bytes", + "displayType": "bytes", "title": "CSV Data", "description": "Base64 encoded CSV data from which to create the plot", "order": 1 @@ -59,6 +60,7 @@ class CreateLinePlotInput(insightconnect_plugin_runtime.Input): "type": "string", "title": "Margin Style", "description": "Style of the margin of the plot", + "default": "dark", "enum": [ "darkgrid", "whitegrid", @@ -97,7 +99,7 @@ def __init__(self): class CreateLinePlotOutput(insightconnect_plugin_runtime.Output): - schema = json.loads(""" + schema = json.loads(r""" { "type": "object", "title": "Variables", @@ -105,7 +107,7 @@ class CreateLinePlotOutput(insightconnect_plugin_runtime.Output): "csv": { "type": "string", "format": "bytes", - "display_type": "bytes", + "displayType": "bytes", "title": "CSV", "description": "Base64 encoded CSV data used to generate the plot", "order": 1 @@ -113,7 +115,7 @@ class CreateLinePlotOutput(insightconnect_plugin_runtime.Output): "plot": { "type": "string", "format": "bytes", - "display_type": "bytes", + "displayType": "bytes", "title": "Plot", "description": "Base64 encoded PNG plot data (can be attached to an email)", "order": 2 @@ -128,4 +130,4 @@ class CreateLinePlotOutput(insightconnect_plugin_runtime.Output): """) def __init__(self): - super(self.__class__, self).__init__(self.schema) \ No newline at end of file + super(self.__class__, self).__init__(self.schema) diff --git a/plugins/matplotlib/komand_matplotlib/actions/create_pair_plot/__init__.py b/plugins/matplotlib/komand_matplotlib/actions/create_pair_plot/__init__.py index 62abcd3031..4761b1d0b0 100755 --- a/plugins/matplotlib/komand_matplotlib/actions/create_pair_plot/__init__.py +++ b/plugins/matplotlib/komand_matplotlib/actions/create_pair_plot/__init__.py @@ -1,2 +1,2 @@ # GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT -from .action import CreatePairPlot \ No newline at end of file +from .action import CreatePairPlot diff --git a/plugins/matplotlib/komand_matplotlib/actions/create_pair_plot/schema.py b/plugins/matplotlib/komand_matplotlib/actions/create_pair_plot/schema.py index f13245364e..847dcbee8d 100755 --- a/plugins/matplotlib/komand_matplotlib/actions/create_pair_plot/schema.py +++ b/plugins/matplotlib/komand_matplotlib/actions/create_pair_plot/schema.py @@ -21,7 +21,7 @@ class Output: class CreatePairPlotInput(insightconnect_plugin_runtime.Input): - schema = json.loads(""" + schema = json.loads(r""" { "type": "object", "title": "Variables", @@ -30,6 +30,7 @@ class CreatePairPlotInput(insightconnect_plugin_runtime.Input): "type": "string", "title": "Color Palette", "description": "Color palette of the plot", + "default": "dark", "enum": [ "deep", "muted", @@ -43,7 +44,7 @@ class CreatePairPlotInput(insightconnect_plugin_runtime.Input): "csv_data": { "type": "string", "format": "bytes", - "display_type": "bytes", + "displayType": "bytes", "title": "CSV Data", "description": "Base64 encoded CSV data from which to create the plot", "order": 1 @@ -58,6 +59,7 @@ class CreatePairPlotInput(insightconnect_plugin_runtime.Input): "type": "string", "title": "Kind", "description": "Kind of data representation to use in the created plot", + "default": "scatter", "enum": [ "scatter", "reg", @@ -71,6 +73,7 @@ class CreatePairPlotInput(insightconnect_plugin_runtime.Input): "type": "string", "title": "Margin Style", "description": "Style of the margin of the plot", + "default": "dark", "enum": [ "darkgrid", "whitegrid", @@ -96,7 +99,7 @@ def __init__(self): class CreatePairPlotOutput(insightconnect_plugin_runtime.Output): - schema = json.loads(""" + schema = json.loads(r""" { "type": "object", "title": "Variables", @@ -104,7 +107,7 @@ class CreatePairPlotOutput(insightconnect_plugin_runtime.Output): "csv": { "type": "string", "format": "bytes", - "display_type": "bytes", + "displayType": "bytes", "title": "CSV", "description": "Base64 encoded CSV data used to generate the plot", "order": 1 @@ -112,7 +115,7 @@ class CreatePairPlotOutput(insightconnect_plugin_runtime.Output): "plot": { "type": "string", "format": "bytes", - "display_type": "bytes", + "displayType": "bytes", "title": "Plot", "description": "Base64 encoded PNG plot data (can be attached to an email)", "order": 2 @@ -127,4 +130,4 @@ class CreatePairPlotOutput(insightconnect_plugin_runtime.Output): """) def __init__(self): - super(self.__class__, self).__init__(self.schema) \ No newline at end of file + super(self.__class__, self).__init__(self.schema) diff --git a/plugins/matplotlib/komand_matplotlib/actions/create_scatter_plot/__init__.py b/plugins/matplotlib/komand_matplotlib/actions/create_scatter_plot/__init__.py index 931b88a9a5..870b13625e 100755 --- a/plugins/matplotlib/komand_matplotlib/actions/create_scatter_plot/__init__.py +++ b/plugins/matplotlib/komand_matplotlib/actions/create_scatter_plot/__init__.py @@ -1,2 +1,2 @@ # GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT -from .action import CreateScatterPlot \ No newline at end of file +from .action import CreateScatterPlot diff --git a/plugins/matplotlib/komand_matplotlib/actions/create_scatter_plot/schema.py b/plugins/matplotlib/komand_matplotlib/actions/create_scatter_plot/schema.py index f4e9561d41..8c6e5c241c 100755 --- a/plugins/matplotlib/komand_matplotlib/actions/create_scatter_plot/schema.py +++ b/plugins/matplotlib/komand_matplotlib/actions/create_scatter_plot/schema.py @@ -22,7 +22,7 @@ class Output: class CreateScatterPlotInput(insightconnect_plugin_runtime.Input): - schema = json.loads(""" + schema = json.loads(r""" { "type": "object", "title": "Variables", @@ -31,6 +31,7 @@ class CreateScatterPlotInput(insightconnect_plugin_runtime.Input): "type": "string", "title": "Color Palette", "description": "Color palette of the plot", + "default": "dark", "enum": [ "deep", "muted", @@ -44,7 +45,7 @@ class CreateScatterPlotInput(insightconnect_plugin_runtime.Input): "csv_data": { "type": "string", "format": "bytes", - "display_type": "bytes", + "displayType": "bytes", "title": "CSV Data", "description": "Base64 encoded CSV data from which to create the plot", "order": 1 @@ -59,6 +60,7 @@ class CreateScatterPlotInput(insightconnect_plugin_runtime.Input): "type": "string", "title": "Margin Style", "description": "Style of the margin of the plot", + "default": "dark", "enum": [ "darkgrid", "whitegrid", @@ -97,7 +99,7 @@ def __init__(self): class CreateScatterPlotOutput(insightconnect_plugin_runtime.Output): - schema = json.loads(""" + schema = json.loads(r""" { "type": "object", "title": "Variables", @@ -105,7 +107,7 @@ class CreateScatterPlotOutput(insightconnect_plugin_runtime.Output): "csv": { "type": "string", "format": "bytes", - "display_type": "bytes", + "displayType": "bytes", "title": "CSV", "description": "Base64 encoded CSV data used to generate the plot", "order": 1 @@ -113,7 +115,7 @@ class CreateScatterPlotOutput(insightconnect_plugin_runtime.Output): "plot": { "type": "string", "format": "bytes", - "display_type": "bytes", + "displayType": "bytes", "title": "Plot", "description": "Base64 encoded PNG plot data (can be attached to an email)", "order": 2 @@ -128,4 +130,4 @@ class CreateScatterPlotOutput(insightconnect_plugin_runtime.Output): """) def __init__(self): - super(self.__class__, self).__init__(self.schema) \ No newline at end of file + super(self.__class__, self).__init__(self.schema) diff --git a/plugins/matplotlib/komand_matplotlib/connection/__init__.py b/plugins/matplotlib/komand_matplotlib/connection/__init__.py index 4ca63d742e..c78d3356be 100755 --- a/plugins/matplotlib/komand_matplotlib/connection/__init__.py +++ b/plugins/matplotlib/komand_matplotlib/connection/__init__.py @@ -1,2 +1,2 @@ # GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT -from .connection import Connection \ No newline at end of file +from .connection import Connection diff --git a/plugins/matplotlib/komand_matplotlib/connection/schema.py b/plugins/matplotlib/komand_matplotlib/connection/schema.py index 81a531a655..10cc2e684f 100755 --- a/plugins/matplotlib/komand_matplotlib/connection/schema.py +++ b/plugins/matplotlib/komand_matplotlib/connection/schema.py @@ -8,9 +8,9 @@ class Input: class ConnectionSchema(insightconnect_plugin_runtime.Input): - schema = json.loads(""" + schema = json.loads(r""" {} """) def __init__(self): - super(self.__class__, self).__init__(self.schema) \ No newline at end of file + super(self.__class__, self).__init__(self.schema) diff --git a/plugins/matplotlib/komand_matplotlib/tasks/__init__.py b/plugins/matplotlib/komand_matplotlib/tasks/__init__.py new file mode 100644 index 0000000000..7020c9a4ad --- /dev/null +++ b/plugins/matplotlib/komand_matplotlib/tasks/__init__.py @@ -0,0 +1,2 @@ +# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT + diff --git a/plugins/matplotlib/komand_matplotlib/triggers/__init__.py b/plugins/matplotlib/komand_matplotlib/triggers/__init__.py index 797e426edf..7020c9a4ad 100755 --- a/plugins/matplotlib/komand_matplotlib/triggers/__init__.py +++ b/plugins/matplotlib/komand_matplotlib/triggers/__init__.py @@ -1 +1,2 @@ # GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT + diff --git a/plugins/matplotlib/setup.py b/plugins/matplotlib/setup.py index 84d659d97e..b3f4a4d8d5 100755 --- a/plugins/matplotlib/setup.py +++ b/plugins/matplotlib/setup.py @@ -1,9 +1,9 @@ -# GENERATED BY KOMAND SDK - DO NOT EDIT +# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT from setuptools import setup, find_packages setup(name="matplotlib-rapid7-plugin", - version="1.0.2", + version="1.0.3", description="Provides graphing capability of base64 encoded CSV data using Matplotlib, NumPy, Pandas, and Seaborn", author="rapid7", author_email="", diff --git a/plugins/matplotlib/unit_test/__init__.py b/plugins/matplotlib/unit_test/__init__.py new file mode 100644 index 0000000000..797e426edf --- /dev/null +++ b/plugins/matplotlib/unit_test/__init__.py @@ -0,0 +1 @@ +# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT diff --git a/plugins/matplotlib/unit_test/test_create_distribution_plot.py b/plugins/matplotlib/unit_test/test_create_distribution_plot.py new file mode 100644 index 0000000000..92552af832 --- /dev/null +++ b/plugins/matplotlib/unit_test/test_create_distribution_plot.py @@ -0,0 +1,20 @@ +import sys +import os +sys.path.append(os.path.abspath('../')) + +from unittest import TestCase +from icon_matplotlib.connection.connection import Connection +from icon_matplotlib.actions.create_distribution_plot import CreateDistributionPlot +import json +import logging + + +class TestCreateDistributionPlot(TestCase): + def test_create_distribution_plot(self): + """ + DO NOT USE PRODUCTION/SENSITIVE DATA FOR UNIT TESTS + + TODO: Implement test cases here + """ + + self.fail("Unimplemented Test Case") \ No newline at end of file diff --git a/plugins/matplotlib/unit_test/test_create_joint_plot.py b/plugins/matplotlib/unit_test/test_create_joint_plot.py new file mode 100644 index 0000000000..563a185def --- /dev/null +++ b/plugins/matplotlib/unit_test/test_create_joint_plot.py @@ -0,0 +1,20 @@ +import sys +import os +sys.path.append(os.path.abspath('../')) + +from unittest import TestCase +from icon_matplotlib.connection.connection import Connection +from icon_matplotlib.actions.create_joint_plot import CreateJointPlot +import json +import logging + + +class TestCreateJointPlot(TestCase): + def test_create_joint_plot(self): + """ + DO NOT USE PRODUCTION/SENSITIVE DATA FOR UNIT TESTS + + TODO: Implement test cases here + """ + + self.fail("Unimplemented Test Case") \ No newline at end of file diff --git a/plugins/matplotlib/unit_test/test_create_line_plot.py b/plugins/matplotlib/unit_test/test_create_line_plot.py new file mode 100644 index 0000000000..9dc15da8f4 --- /dev/null +++ b/plugins/matplotlib/unit_test/test_create_line_plot.py @@ -0,0 +1,20 @@ +import sys +import os +sys.path.append(os.path.abspath('../')) + +from unittest import TestCase +from icon_matplotlib.connection.connection import Connection +from icon_matplotlib.actions.create_line_plot import CreateLinePlot +import json +import logging + + +class TestCreateLinePlot(TestCase): + def test_create_line_plot(self): + """ + DO NOT USE PRODUCTION/SENSITIVE DATA FOR UNIT TESTS + + TODO: Implement test cases here + """ + + self.fail("Unimplemented Test Case") \ No newline at end of file diff --git a/plugins/matplotlib/unit_test/test_create_pair_plot.py b/plugins/matplotlib/unit_test/test_create_pair_plot.py new file mode 100644 index 0000000000..16d98fc650 --- /dev/null +++ b/plugins/matplotlib/unit_test/test_create_pair_plot.py @@ -0,0 +1,20 @@ +import sys +import os +sys.path.append(os.path.abspath('../')) + +from unittest import TestCase +from icon_matplotlib.connection.connection import Connection +from icon_matplotlib.actions.create_pair_plot import CreatePairPlot +import json +import logging + + +class TestCreatePairPlot(TestCase): + def test_create_pair_plot(self): + """ + DO NOT USE PRODUCTION/SENSITIVE DATA FOR UNIT TESTS + + TODO: Implement test cases here + """ + + self.fail("Unimplemented Test Case") \ No newline at end of file diff --git a/plugins/matplotlib/unit_test/test_create_scatter_plot.py b/plugins/matplotlib/unit_test/test_create_scatter_plot.py new file mode 100644 index 0000000000..7feb200dce --- /dev/null +++ b/plugins/matplotlib/unit_test/test_create_scatter_plot.py @@ -0,0 +1,20 @@ +import sys +import os +sys.path.append(os.path.abspath('../')) + +from unittest import TestCase +from icon_matplotlib.connection.connection import Connection +from icon_matplotlib.actions.create_scatter_plot import CreateScatterPlot +import json +import logging + + +class TestCreateScatterPlot(TestCase): + def test_create_scatter_plot(self): + """ + DO NOT USE PRODUCTION/SENSITIVE DATA FOR UNIT TESTS + + TODO: Implement test cases here + """ + + self.fail("Unimplemented Test Case") \ No newline at end of file