Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Gaffer version to 2.3.1 #66

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = "GCHQ"

# The full version, including alpha/beta/rc tags
release = "2.2.0"
release = "2.3.1"

# -- General configuration ---------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "2.3.0"
__version__ = "2.3.1"

__title__ = "gafferpy"
__description__ = "Gaffer Python Shell"
Expand Down
2 changes: 1 addition & 1 deletion src/fishbowl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "2.3.0"
__version__ = "2.3.1"

__title__ = "fishbowl"
__description__ = "Gaffer Python Shell"
Expand Down
2 changes: 1 addition & 1 deletion src/gafferpy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "2.3.0"
__version__ = "2.3.1"

__title__ = "gafferpy"
__description__ = "Gaffer Python Shell"
Expand Down
40 changes: 39 additions & 1 deletion src/gafferpy/generated_api/binaryoperators.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion src/gafferpy/generated_api/functions.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
197 changes: 196 additions & 1 deletion src/gafferpy/generated_api/operations.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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<T>
"""
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<java.lang.String,java.lang.Object>
"""
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
Expand Down Expand Up @@ -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<java.lang.String,java.lang.String>
"""
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
Expand Down
2 changes: 1 addition & 1 deletion src/gafferpy/generated_api/predicates.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/gafferpy_examples/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "2.3.0"
__version__ = "2.3.1"

__title__ = "gafferpy_examples"
__description__ = "Gaffer Python Shell"
Expand Down
2 changes: 1 addition & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "2.0.0"
__version__ = "2.3.1"

__title__ = "gafferpy"
__description__ = "Gaffer Python Shell"
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "2.0.0"
__version__ = "2.3.1"

__title__ = "gafferpy"
__description__ = "Gaffer Python Shell"
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "2.0.0"
__version__ = "2.3.1"

__title__ = "gafferpy"
__description__ = "Gaffer Python Shell"
Expand Down
Loading