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

Commit

Permalink
Merge pull request #15 from gchq/gh-11-upgrade
Browse files Browse the repository at this point in the history
Gh 11 upgrade
  • Loading branch information
p013570 authored Nov 7, 2016
2 parents 20ba6fe + 96570f7 commit ab178d2
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 54 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ cache:
- $HOME/.m2
jdk:
- oraclejdk8
install: travis_wait git clone https://github.com/gchq/Gaffer.git gafferTmp && cd gafferTmp && git checkout gaffer2-0.4.4 && mvn -q clean install -Pquick && cd ../ && rm -rf gafferTmp
install: travis_wait git clone https://github.com/gchq/Gaffer.git gafferTmp && cd gafferTmp && git checkout gaffer2-0.4.6 && mvn -q clean install -Pquick && cd ../ && rm -rf gafferTmp
script: mvn install -PreducedMemory -Dfindbugs.skip=true && mvn findbugs:findbugs && mvn javadoc:javadoc
2 changes: 1 addition & 1 deletion NOTICES
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Gaffer tools is built using maven. This process will automatically pull in depen
projects below.


Gaffer (gaffer:gaffer2:0.4.4):
Gaffer (gaffer:gaffer2:0.4.6):

- Apache License, Version 2.0

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ In order to use these tools you will first need to have the relevant version of
```bash
git clone https://github.com/gchq/Gaffer.git
cd Gaffer
git checkout gaffer2-0.4.4
git checkout gaffer2-0.4.6
mvn clean install -Pquick
```
```
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>gaffer</groupId>
<artifactId>gaffer2</artifactId>
<version>0.4.4</version>
<version>0.4.6</version>
</parent>

<artifactId>gaffer-tools</artifactId>
Expand All @@ -36,7 +36,7 @@
</modules>

<properties>
<gaffer.version>0.4.4</gaffer.version>
<gaffer.version>0.4.6</gaffer.version>
<scm.url>
https://github.com/gchq/gaffer-tools
</scm.url>
Expand Down
6 changes: 3 additions & 3 deletions python-shell/src/main/python/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ def get_elements(gc):
filter_functions=[
g.FilterFunction(
class_name='gaffer.function.simple.filter.IsEqual',
selection=[g.IdentifierKey('VERTEX')],
selection=['VERTEX'],
function_fields={'value': '1'}
)
],
transform_functions=[
g.TransformFunction(
class_name='gaffer.rest.example.ExampleTransformFunction',
selection=[g.IdentifierKey('VERTEX')],
projection=[g.PropertyKey('newProperty')]
selection=['VERTEX'],
projection=['newProperty']
)
]
)
Expand Down
41 changes: 3 additions & 38 deletions python-shell/src/main/python/gaffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,7 @@ def __init__(self, class_name, selection, function_fields=None):

def toJson(self):
function_context = super().toJson()

selection_json = []
for item in self.selection:
selection_json.append(item.toJson())
function_context['selection'] = selection_json
function_context['selection'] = self.selection

return function_context

Expand All @@ -267,43 +263,12 @@ def __init__(self, class_name, selection, projection, function_fields=None):

def toJson(self):
function_context = super().toJson()

selection_json = []
for item in self.selection:
selection_json.append(item.toJson())
function_context['selection'] = selection_json
function_context['selection'] = selection_json

projection_json = []
for item in self.projection:
projection_json.append(item.toJson())
function_context['projection'] = projection_json
function_context['selection'] = self.selection
function_context['projection'] = self.projection

return function_context


class PropertyKey(ToJson):
def __init__(self, key):
# Validate the arguments
if not isinstance(key, str):
raise TypeError('key must be a string')
self.key = key

def toJson(self):
return {'key': self.key, 'isId': False}


class IdentifierKey(ToJson):
def __init__(self, key):
# Validate the arguments
if not isinstance(key, str):
raise TypeError('key must be a string')
self.key = key

def toJson(self):
return {'key': self.key, 'isId': True}


class IncludeEdges:
ALL = 'ALL'
DIRECTED = 'DIRECTED'
Expand Down
2 changes: 1 addition & 1 deletion road-traffic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ To run the demo you will first need to build the corresponding version of Gaffer
```bash
git clone https://github.com/gchq/Gaffer.git
cd Gaffer
git checkout gaffer2-0.4.4
git checkout gaffer2-0.4.6
mvn clean install -Pquick
```

Expand Down
4 changes: 2 additions & 2 deletions road-traffic/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
</dependency>
<dependency>
<groupId>gaffer</groupId>
<artifactId>simple-types-library</artifactId>
<artifactId>types-library</artifactId>
<version>${gaffer.version}</version>
</dependency>
<dependency>
<groupId>gaffer</groupId>
<artifactId>simple-function-library</artifactId>
<artifactId>function-library</artifactId>
<version>${gaffer.version}</version>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions tinkerpop/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
</dependency>
<dependency>
<groupId>gaffer</groupId>
<artifactId>simple-function-library</artifactId>
<artifactId>function-library</artifactId>
<version>${gaffer.version}</version>
</dependency>
<dependency>
<groupId>gaffer</groupId>
<artifactId>simple-serialisation-library</artifactId>
<artifactId>serialisation-library</artifactId>
<version>${gaffer.version}</version>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
package gaffer.gafferpop.groovyplugin;

import gaffer.data.element.ElementComponentKey;
import gaffer.data.element.IdentifierType;
import gaffer.data.element.function.ElementFilter;
import gaffer.data.element.function.ElementTransformer;
Expand All @@ -39,7 +38,6 @@ public final class GafferPopGremlinPlugin extends AbstractGremlinPlugin {
add(getPackage(ViewElementDefinition.class));
add(getPackage(ElementFilter.class));
add(getPackage(ElementTransformer.class));
add(getPackage(ElementComponentKey.class));
add(getPackage(IdentifierType.class));
add(getPackage(Exists.class));
add(getPackage(Concat.class));
Expand Down

0 comments on commit ab178d2

Please sign in to comment.