From 62726c6ea2e500be86c6fe172e47e593a2074b70 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 15:41:57 +0000 Subject: [PATCH] Updated Gaffer version to 2.3.1 --- docs/source/conf.py | 2 +- src/__init__.py | 2 +- src/fishbowl/__init__.py | 2 +- src/gafferpy/__init__.py | 2 +- src/gafferpy/generated_api/binaryoperators.py | 40 +++- src/gafferpy/generated_api/functions.py | 2 +- src/gafferpy/generated_api/operations.py | 197 +++++++++++++++++- src/gafferpy/generated_api/predicates.py | 2 +- src/gafferpy_examples/__init__.py | 2 +- tests/__init__.py | 2 +- tests/integration/__init__.py | 2 +- tests/unit/__init__.py | 2 +- 12 files changed, 245 insertions(+), 12 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 3146182e..9b3f3df1 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -22,7 +22,7 @@ author = "GCHQ" # The full version, including alpha/beta/rc tags -release = "2.2.0" +release = "2.3.1" # -- General configuration --------------------------------------------------- diff --git a/src/__init__.py b/src/__init__.py index 96e57ebe..94f5a385 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -1,4 +1,4 @@ -__version__ = "2.3.0" +__version__ = "2.3.1" __title__ = "gafferpy" __description__ = "Gaffer Python Shell" diff --git a/src/fishbowl/__init__.py b/src/fishbowl/__init__.py index a20c09d6..9124b59d 100644 --- a/src/fishbowl/__init__.py +++ b/src/fishbowl/__init__.py @@ -1,4 +1,4 @@ -__version__ = "2.3.0" +__version__ = "2.3.1" __title__ = "fishbowl" __description__ = "Gaffer Python Shell" diff --git a/src/gafferpy/__init__.py b/src/gafferpy/__init__.py index 96e57ebe..94f5a385 100644 --- a/src/gafferpy/__init__.py +++ b/src/gafferpy/__init__.py @@ -1,4 +1,4 @@ -__version__ = "2.3.0" +__version__ = "2.3.1" __title__ = "gafferpy" __description__ = "Gaffer Python Shell" diff --git a/src/gafferpy/generated_api/binaryoperators.py b/src/gafferpy/generated_api/binaryoperators.py index 44c717a8..f8040b75 100644 --- a/src/gafferpy/generated_api/binaryoperators.py +++ b/src/gafferpy/generated_api/binaryoperators.py @@ -1,5 +1,5 @@ # -# Copyright 2022 Crown Copyright +# Copyright 2022-2024 Crown Copyright # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. @@ -50,6 +50,44 @@ def to_json(self): return function_json +class DefaultResultAccumulator(AbstractBinaryOperator): + CLASS = "uk.gov.gchq.gaffer.federated.simple.merge.DefaultResultAccumulator" + + def __init__( + self, + schema: typing.Optional[typing.Dict] = None, + aggregate_elements: typing.Optional[bool] = None, + ): + super().__init__(_class_name=self.CLASS) + self.schema = schema + self.aggregate_elements = aggregate_elements + + def to_json(self): + function_json = super().to_json() + if self.schema is not None: + function_json["schema"] = self.schema + if self.aggregate_elements is not None: + function_json["aggregateElements"] = self.aggregate_elements + return function_json + + +class ElementAggregateOperator(AbstractBinaryOperator): + CLASS = "uk.gov.gchq.gaffer.federated.simple.merge.operator.ElementAggregateOperator" + + def __init__( + self, + schema: typing.Optional[typing.Dict] = None, + ): + super().__init__(_class_name=self.CLASS) + self.schema = schema + + def to_json(self): + function_json = super().to_json() + if self.schema is not None: + function_json["schema"] = self.schema + return function_json + + class HyperLogLogPlusAggregator(AbstractBinaryOperator): CLASS = "uk.gov.gchq.gaffer.sketches.clearspring.cardinality.binaryoperator.HyperLogLogPlusAggregator" diff --git a/src/gafferpy/generated_api/functions.py b/src/gafferpy/generated_api/functions.py index d3dc510b..1d0c5b85 100644 --- a/src/gafferpy/generated_api/functions.py +++ b/src/gafferpy/generated_api/functions.py @@ -1,5 +1,5 @@ # -# Copyright 2022 Crown Copyright +# Copyright 2022-2024 Crown Copyright # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. diff --git a/src/gafferpy/generated_api/operations.py b/src/gafferpy/generated_api/operations.py index 8d1c21b9..ff6e0633 100644 --- a/src/gafferpy/generated_api/operations.py +++ b/src/gafferpy/generated_api/operations.py @@ -1,5 +1,5 @@ # -# Copyright 2022 Crown Copyright +# Copyright 2022-2024 Crown Copyright # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. @@ -304,6 +304,179 @@ def to_json(self): return operation_json +class AddGraph(Operation): + """ + Adds a new Graph to the federated store + + Args: + graph_config: + owner: + schema: + public: + is_public: + write_predicate: + properties: + read_predicate: + options: Additional map of options + Returns: + java.lang.Void + """ + CLASS = "uk.gov.gchq.gaffer.federated.simple.operation.AddGraph" + + def __init__( + self, + graph_config: typing.Any, + owner: typing.Optional[str] = None, + schema: typing.Optional[typing.Dict] = None, + public: typing.Optional[typing.Any] = None, + is_public: typing.Optional[bool] = None, + write_predicate: typing.Optional[typing.Any] = None, + properties: typing.Optional[typing.Dict] = None, + read_predicate: typing.Optional[typing.Any] = None, + options: typing.Optional[typing.Dict[str, str]] = None + ): + + super().__init__(_class_name=self.CLASS, options=options) + self.owner = owner + self.schema = schema + self.public = public + self.graph_config = graph_config + self.is_public = is_public + self.write_predicate = write_predicate + self.properties = properties + self.read_predicate = read_predicate + + def to_json(self): + operation_json = super().to_json() + if self.owner is not None: + operation_json["owner"] = self.owner + if self.schema is not None: + operation_json["schema"] = self.schema + if self.public is not None: + operation_json["public"] = self.public + if self.graph_config is not None: + operation_json["graphConfig"] = self.graph_config + if self.is_public is not None: + operation_json["isPublic"] = self.is_public + if self.write_predicate is not None: + operation_json["writePredicate"] = self.write_predicate + if self.properties is not None: + operation_json["properties"] = self.properties + if self.read_predicate is not None: + operation_json["readPredicate"] = self.read_predicate + return operation_json + + +class ChangeGraphId(Operation): + """ + Changes Graph ID + + Args: + new_graph_id: + graph_id: + options: Additional map of options + Returns: + java.lang.Void + """ + CLASS = "uk.gov.gchq.gaffer.federated.simple.operation.ChangeGraphId" + + def __init__( + self, + new_graph_id: typing.Optional[str] = None, + graph_id: typing.Optional[str] = None, + options: typing.Optional[typing.Dict[str, str]] = None + ): + + super().__init__(_class_name=self.CLASS, options=options) + self.new_graph_id = new_graph_id + self.graph_id = graph_id + + def to_json(self): + operation_json = super().to_json() + if self.new_graph_id is not None: + operation_json["newGraphId"] = self.new_graph_id + if self.graph_id is not None: + operation_json["graphId"] = self.graph_id + return operation_json + + +class GetAllGraphIds(Operation): + """ + Get all the graph IDs available to a federated store + + Args: + options: Additional map of options + Returns: + java.util.Set + """ + CLASS = "uk.gov.gchq.gaffer.federated.simple.operation.GetAllGraphIds" + + def __init__( + self, + options: typing.Optional[typing.Dict[str, str]] = None + ): + + super().__init__(_class_name=self.CLASS, options=options) + + def to_json(self): + return super().to_json() + + +class GetAllGraphInfo(Operation): + """ + Get all the graph info from graphs in a federated store + + Args: + options: Additional map of options + Returns: + java.util.Map + """ + CLASS = "uk.gov.gchq.gaffer.federated.simple.operation.GetAllGraphInfo" + + def __init__( + self, + options: typing.Optional[typing.Dict[str, str]] = None + ): + + super().__init__(_class_name=self.CLASS, options=options) + + def to_json(self): + return super().to_json() + + +class RemoveGraph(Operation): + """ + Removes a new Graph from the federated store optionally deleting all data + + Args: + graph_id: + delete_all_data: + options: Additional map of options + Returns: + java.lang.Void + """ + CLASS = "uk.gov.gchq.gaffer.federated.simple.operation.RemoveGraph" + + def __init__( + self, + graph_id: str, + delete_all_data: typing.Optional[bool] = None, + options: typing.Optional[typing.Dict[str, str]] = None + ): + + super().__init__(_class_name=self.CLASS, options=options) + self.delete_all_data = delete_all_data + self.graph_id = graph_id + + def to_json(self): + operation_json = super().to_json() + if self.delete_all_data is not None: + operation_json["deleteAllData"] = self.delete_all_data + if self.graph_id is not None: + operation_json["graphId"] = self.graph_id + return operation_json + + class AddGraph(Operation): """ Adds a new Graph to the federated store @@ -3035,6 +3208,28 @@ def to_json(self): return operation_json +class GetGraphCreatedTime(Operation): + """ + Operation to retrieve Graph created date + + Args: + options: Additional map of options + Returns: + java.util.Map + """ + CLASS = "uk.gov.gchq.gaffer.operation.impl.get.GetGraphCreatedTime" + + def __init__( + self, + options: typing.Optional[typing.Dict[str, str]] = None + ): + + super().__init__(_class_name=self.CLASS, options=options) + + def to_json(self): + return super().to_json() + + class CancelScheduledJob(Operation): """ Cancels a scheduled job diff --git a/src/gafferpy/generated_api/predicates.py b/src/gafferpy/generated_api/predicates.py index 318fda07..4f13c5cf 100644 --- a/src/gafferpy/generated_api/predicates.py +++ b/src/gafferpy/generated_api/predicates.py @@ -1,5 +1,5 @@ # -# Copyright 2022 Crown Copyright +# Copyright 2022-2024 Crown Copyright # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. diff --git a/src/gafferpy_examples/__init__.py b/src/gafferpy_examples/__init__.py index 83b14e4c..11cf88e5 100644 --- a/src/gafferpy_examples/__init__.py +++ b/src/gafferpy_examples/__init__.py @@ -1,4 +1,4 @@ -__version__ = "2.3.0" +__version__ = "2.3.1" __title__ = "gafferpy_examples" __description__ = "Gaffer Python Shell" diff --git a/tests/__init__.py b/tests/__init__.py index 6764c339..af6e96ae 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,4 +1,4 @@ -__version__ = "2.0.0" +__version__ = "2.3.1" __title__ = "gafferpy" __description__ = "Gaffer Python Shell" diff --git a/tests/integration/__init__.py b/tests/integration/__init__.py index 6764c339..af6e96ae 100644 --- a/tests/integration/__init__.py +++ b/tests/integration/__init__.py @@ -1,4 +1,4 @@ -__version__ = "2.0.0" +__version__ = "2.3.1" __title__ = "gafferpy" __description__ = "Gaffer Python Shell" diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py index 6764c339..af6e96ae 100644 --- a/tests/unit/__init__.py +++ b/tests/unit/__init__.py @@ -1,4 +1,4 @@ -__version__ = "2.0.0" +__version__ = "2.3.1" __title__ = "gafferpy" __description__ = "Gaffer Python Shell"