Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Commit

Permalink
Updated Gaffer version to 2.0.0-alpha-0.6 (#1067)
Browse files Browse the repository at this point in the history
Co-authored-by: t92549 <t92549@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and t92549 authored May 12, 2023
1 parent 9883c86 commit a0d1388
Show file tree
Hide file tree
Showing 10 changed files with 194 additions and 125 deletions.
2 changes: 1 addition & 1 deletion NOTICES
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gaffer tools is built using maven. This process will automatically pull in depen
projects below.


Gaffer (uk.gov.gchq.gaffer:gaffer2:2.0.0-alpha-0.5):
Gaffer (uk.gov.gchq.gaffer:gaffer2:2.0.0-alpha-0.6):

- Apache License, Version 2.0

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>uk.gov.gchq.gaffer</groupId>
<artifactId>gaffer2</artifactId>
<version>2.0.0-alpha-0.5</version>
<version>2.0.0-alpha-0.6</version>
</parent>

<artifactId>gaffer-tools</artifactId>
Expand All @@ -31,7 +31,7 @@
<!-- For <modules> see default profile -->

<properties>
<gaffer.version>2.0.0-alpha-0.5</gaffer.version>
<gaffer.version>2.0.0-alpha-0.6</gaffer.version>
<scm.url>
https://github.com/gchq/gaffer-tools
</scm.url>
Expand Down
2 changes: 1 addition & 1 deletion python-shell/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "2.0.0-alpha-0.5"
__version__ = "2.0.0-alpha-0.6"

__title__ = "gafferpy"
__description__ = "Gaffer Python Shell"
Expand Down
2 changes: 1 addition & 1 deletion python-shell/src/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "2.0.0-alpha-0.5"
__version__ = "2.0.0-alpha-0.6"

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

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

__title__ = "gafferpy"
__description__ = "Gaffer Python Shell"
Expand Down
138 changes: 119 additions & 19 deletions python-shell/src/gafferpy/generated_api/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,24 +214,86 @@ def to_json(self):
return super().to_json()


class CsvElementGenerator(AbstractFunction):
CLASS = "uk.gov.gchq.gaffer.data.generator.CsvElementGenerator"
class CsvGenerator(AbstractFunction):
CLASS = "uk.gov.gchq.gaffer.data.generator.CsvGenerator"

def __init__(
self,
quoted=None,
comma_replacement=None,
include_default_fields=None,
include_schema_properties=None,
constants=None,
fields=None):
super().__init__(_class_name=self.CLASS)
self.quoted = quoted
self.comma_replacement = comma_replacement
self.include_default_fields = include_default_fields
self.include_schema_properties = include_schema_properties
self.constants = constants
self.fields = fields

def to_json(self):
function_json = super().to_json()
if self.quoted is not None:
function_json["quoted"] = self.quoted
if self.comma_replacement is not None:
function_json["commaReplacement"] = self.comma_replacement
if self.include_default_fields is not None:
function_json["includeDefaultFields"] = self.include_default_fields
if self.include_schema_properties is not None:
function_json["includeSchemaProperties"] = self.include_schema_properties
if self.constants is not None:
function_json["constants"] = self.constants
if self.fields is not None:
function_json["fields"] = self.fields
return function_json


class JsonToElementGenerator(AbstractFunction):
CLASS = "uk.gov.gchq.gaffer.data.generator.JsonToElementGenerator"

def __init__(self):
super().__init__(_class_name=self.CLASS)

def to_json(self):
return super().to_json()


class MapGenerator(AbstractFunction):
CLASS = "uk.gov.gchq.gaffer.data.generator.MapGenerator"

def __init__(
self,
constants=None,
fields=None):
super().__init__(_class_name=self.CLASS)
self.constants = constants
self.fields = fields

def to_json(self):
function_json = super().to_json()
if self.constants is not None:
function_json["constants"] = self.constants
if self.fields is not None:
function_json["fields"] = self.fields
return function_json


class Neo4jCsvElementGenerator(AbstractFunction):
CLASS = "uk.gov.gchq.gaffer.data.generator.Neo4jCsvElementGenerator"

def __init__(
self,
first_row=None,
trim=None,
delimiter=None,
null_string=None,
header=None,
csv_format=None):
null_string=None):
super().__init__(_class_name=self.CLASS)
self.first_row = first_row
self.trim = trim
self.delimiter = delimiter
self.null_string = null_string
self.header = header
self.csv_format = csv_format

def to_json(self):
function_json = super().to_json()
Expand All @@ -243,25 +305,25 @@ def to_json(self):
function_json["delimiter"] = self.delimiter
if self.null_string is not None:
function_json["nullString"] = self.null_string
if self.header is not None:
function_json["header"] = self.header
if self.csv_format is not None:
function_json["csvFormat"] = self.csv_format
return function_json


class CsvGenerator(AbstractFunction):
CLASS = "uk.gov.gchq.gaffer.data.generator.CsvGenerator"
class Neo4jCsvGenerator(AbstractFunction):
CLASS = "uk.gov.gchq.gaffer.data.generator.Neo4jCsvGenerator"

def __init__(
self,
quoted=None,
comma_replacement=None,
include_default_fields=None,
include_schema_properties=None,
constants=None,
fields=None):
super().__init__(_class_name=self.CLASS)
self.quoted = quoted
self.comma_replacement = comma_replacement
self.include_default_fields = include_default_fields
self.include_schema_properties = include_schema_properties
self.constants = constants
self.fields = fields

Expand All @@ -271,36 +333,74 @@ def to_json(self):
function_json["quoted"] = self.quoted
if self.comma_replacement is not None:
function_json["commaReplacement"] = self.comma_replacement
if self.include_default_fields is not None:
function_json["includeDefaultFields"] = self.include_default_fields
if self.include_schema_properties is not None:
function_json["includeSchemaProperties"] = self.include_schema_properties
if self.constants is not None:
function_json["constants"] = self.constants
if self.fields is not None:
function_json["fields"] = self.fields
return function_json


class JsonToElementGenerator(AbstractFunction):
CLASS = "uk.gov.gchq.gaffer.data.generator.JsonToElementGenerator"
class NeptuneCsvElementGenerator(AbstractFunction):
CLASS = "uk.gov.gchq.gaffer.data.generator.NeptuneCsvElementGenerator"

def __init__(self):
def __init__(
self,
first_row=None,
trim=None,
delimiter=None,
null_string=None):
super().__init__(_class_name=self.CLASS)
self.first_row = first_row
self.trim = trim
self.delimiter = delimiter
self.null_string = null_string

def to_json(self):
return super().to_json()
function_json = super().to_json()
if self.first_row is not None:
function_json["firstRow"] = self.first_row
if self.trim is not None:
function_json["trim"] = self.trim
if self.delimiter is not None:
function_json["delimiter"] = self.delimiter
if self.null_string is not None:
function_json["nullString"] = self.null_string
return function_json


class MapGenerator(AbstractFunction):
CLASS = "uk.gov.gchq.gaffer.data.generator.MapGenerator"
class NeptuneCsvGenerator(AbstractFunction):
CLASS = "uk.gov.gchq.gaffer.data.generator.NeptuneCsvGenerator"

def __init__(
self,
quoted=None,
comma_replacement=None,
include_default_fields=None,
include_schema_properties=None,
constants=None,
fields=None):
super().__init__(_class_name=self.CLASS)
self.quoted = quoted
self.comma_replacement = comma_replacement
self.include_default_fields = include_default_fields
self.include_schema_properties = include_schema_properties
self.constants = constants
self.fields = fields

def to_json(self):
function_json = super().to_json()
if self.quoted is not None:
function_json["quoted"] = self.quoted
if self.comma_replacement is not None:
function_json["commaReplacement"] = self.comma_replacement
if self.include_default_fields is not None:
function_json["includeDefaultFields"] = self.include_default_fields
if self.include_schema_properties is not None:
function_json["includeSchemaProperties"] = self.include_schema_properties
if self.constants is not None:
function_json["constants"] = self.constants
if self.fields is not None:
Expand Down
Loading

0 comments on commit a0d1388

Please sign in to comment.