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 #134 from gchq/release-0.7.5
Browse files Browse the repository at this point in the history
Updating master with release 0.7.5
  • Loading branch information
p013570 authored Jun 27, 2017
2 parents 3f596ad + c7790b4 commit 57e8525
Show file tree
Hide file tree
Showing 34 changed files with 516 additions and 64 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ target/
.idea
*/.classpath
__pycache__
*.pem
*.pem
*.pyc
17 changes: 15 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,34 @@ cache:
timeout: 1000
directories:
- $HOME/.m2
dist: trusty
jdk:
- oraclejdk8
sudo: false
addons:
firefox: latest
apt:
packages:
- oracle-java8-installer
- python3
env:
global:
- secure: "G58eMiza1eSFALXesop4TO+mWELR3fj9BSgxZ1kW8+mrGAmaI7OdKIcloyNoPE06+BoO2vJGGoyA9H7RqPOOh4PG71VJY0R8o9KGJMtTGyWMiKHhnrKC1/LUb7d+yAXYGxJE6abZ+JsU551zI7i4/Y8/8G0EkxXpny3MyLdMbZ2ZuQsdKPyQfQMhknhv0MxyE5StbZzV3d+UVSCadMSb1sMk698D7QnUi+QVXzPhdiq2+YBqJBXE++z8sZmF/9I1NbU5r6s+IFMUaqCgLHg3BxCko4UXxB5M8CuDr35Bkto9QJmUIaJawN3JmEotmBwplz1wVPDW0fVXILegCOznm1AbNbuu+LGPIPemAmQDh8G6H2QXoMJipyBNuW5kwscST5IL7PWyyRc/vd0BJQZvuZDY1pnM/8IAjEDT6WyDhS9ARBOlNjh9fEA9BEvZ9uVvjYldXcqpvOaItunPTGygmegTeky9FwaQJXHXyWqSRttgrs0ePVCfKH8U8sNfuiFo+4WMuSlIfuPwuPWIncuaImWIE8WTRroLShq1Or8bADdS1GmVXMYWOoW61nzgQjFVJx/pNJu05Eu1uChAtH371Y804R5vVUlmmC9Rn3VmVLwJxTcSSL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build-extras -B
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- curl -OL https://github.com/mozilla/geckodriver/releases/download/v0.17.0/geckodriver-v0.17.0-linux64.tar.gz
- tar -xf geckodriver-v0.17.0-linux64.tar.gz
- mv geckodriver ui/
script:
- mvn -q test -P travis,build-extras -B
- mvn install -P quick,travis,road-traffic-demo -pl ui &
- sleep 2m
- mvn verify -P travis,system-test -Dwebdriver.gecko.driver=geckodriver -pl ui
- cd python-shell && python3 -m unittest discover -s src && cd ../
after_success:
- ./cd/before_deploy.sh
- travis_wait 45 ./cd/deploy.sh
7 changes: 6 additions & 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:0.7.4):
Gaffer (uk.gov.gchq.gaffer:gaffer2:0.7.5):

- Apache License, Version 2.0

Expand All @@ -47,6 +47,11 @@ mike-hogan/jarjar-forkfork:
- Apache License, Version 2.0


Selenium (org.seleniumhq.selenium:selenium-server:3.4.0)

- Apache License, Version 2.0


----------------------------------------------------------------------

The UI contains the following javascript dependencies
Expand Down
2 changes: 1 addition & 1 deletion federated-rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>uk.gov.gchq.gaffer</groupId>
<artifactId>gaffer-tools</artifactId>
<version>0.7.4.1</version>
<version>0.7.5</version>
</parent>
<artifactId>federated-rest</artifactId>
<packaging>war</packaging>
Expand Down
2 changes: 1 addition & 1 deletion graffer-ql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>uk.gov.gchq.gaffer</groupId>
<artifactId>gaffer-tools</artifactId>
<version>0.7.4.1</version>
<version>0.7.5</version>
</parent>

<artifactId>graffer-ql</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion mini-accumulo-cluster/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>uk.gov.gchq.gaffer</groupId>
<artifactId>gaffer-tools</artifactId>
<version>0.7.4.1</version>
<version>0.7.5</version>
</parent>

<artifactId>mini-accumulo-cluster</artifactId>
Expand Down
66 changes: 63 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
<parent>
<groupId>uk.gov.gchq.gaffer</groupId>
<artifactId>gaffer2</artifactId>
<version>0.7.4</version>
<version>0.7.5</version>
</parent>

<artifactId>gaffer-tools</artifactId>
<version>0.7.4.1</version>
<version>0.7.5</version>
<packaging>pom</packaging>

<modules>
Expand All @@ -38,7 +38,7 @@
</modules>

<properties>
<gaffer.version>0.7.4</gaffer.version>
<gaffer.version>0.7.5</gaffer.version>
<scm.url>
https://github.com/gchq/gaffer-tools
</scm.url>
Expand Down Expand Up @@ -72,4 +72,64 @@
</license>
</licenses>

<profiles>
<profile>
<id>system-test</id>
<properties>
<skip.surefire.tests>true</skip.surefire.tests>
<skip.failsafe.tests>false</skip.failsafe.tests>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${failsafe.version}</version>
<executions>
<execution>
<id>system-test</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<skipITs>${skip.failsafe.tests}</skipITs>
<excludes>
<exclude>**/*$*</exclude>
<exclude>**/performance/**</exclude>
</excludes>
<includes>
<include>**/*SystemTest.java</include>
<include>**/*ST.java</include>
<include>**/*STs.java</include>
<include>**/*SystemTests.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<executions>
<execution>
<id>validate</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<executions>
<execution>
<id>analyze-compile</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
2 changes: 1 addition & 1 deletion python-shell/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ This creates a distributable Python wheel which can installed locally to provide
The wheel file is install using pip:

```bash
pip3 install gaffer_shell-0.7.4-py2.py3-none-any.whl
pip3 install gaffer_shell-0.7.5-py2.py3-none-any.whl
```

After installation the shell can be imported into an application as below:
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__ = "0.7.4"
__version__ = "0.7.5"

__title__ = "gafferpy"
__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__ = "0.7.4"
__version__ = "0.7.5"

__title__ = "gafferpy"
__description__ = "Gaffer Python Shell"
Expand Down
12 changes: 9 additions & 3 deletions python-shell/src/gafferpy/gaffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ def to_json(self):
"""
raise NotImplementedError('Use an implementation')

def __str__(self):
return str(self.to_json())

def __eq__(self, other):
return self.to_json() == other.to_json()


class ResultConverter:
@staticmethod
Expand Down Expand Up @@ -114,12 +120,12 @@ def __init__(self, source, destination, directed):
super().__init__()
self.source = source
self.destination = destination
if isinstance(directed, DirectedType):
if isinstance(directed, str):
self.directed = directed
elif directed:
self.directed = True
self.directed = DirectedType.DIRECTED
else:
self.directed = False
self.directed = DirectedType.UNDIRECTED

def to_json(self):
return {
Expand Down
Empty file.
47 changes: 47 additions & 0 deletions python-shell/src/test/test_connector.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#
# Copyright 2016 Crown Copyright
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an 'AS IS' BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

import unittest

from gafferpy import gaffer as g
from gafferpy import gaffer_connector


class GafferConnectorTest(unittest.TestCase):
def test_execute_operation(self):
gc = gaffer_connector.GafferConnector('http://localhost:8080/rest/v1')
elements = gc.execute_operation(
g.GetElements(
seeds=[
g.EntitySeed('M5:10')
],
view=g.View(
edges=[
g.ElementDefinition(
group='JunctionLocatedAt'
)
]
)
)
)

self.assertEqual(
[g.Edge("JunctionLocatedAt", "M5:10", "390466,225615", True, {})],
elements)


if __name__ == "__main__":
unittest.main()
28 changes: 28 additions & 0 deletions python-shell/src/test/test_example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#
# Copyright 2016 Crown Copyright
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an 'AS IS' BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

import unittest

import example


class ExampleTest(unittest.TestCase):
def test_example_does_not_error(self):
example.run('http://localhost:8080/rest/v1')


if __name__ == "__main__":
unittest.main()
76 changes: 76 additions & 0 deletions python-shell/src/test/test_gaffer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#
# Copyright 2016 Crown Copyright
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an 'AS IS' BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

import unittest

from gafferpy import gaffer as g


class GafferTest(unittest.TestCase):
def test_create_edge_seed(self):
self.assertEqual(
{
'class': 'uk.gov.gchq.gaffer.operation.data.EdgeSeed',
'source': 'src',
'destination': 'dest',
'directed': 'DIRECTED'
},
g.EdgeSeed("src", "dest", g.DirectedType.DIRECTED).to_json()
)

self.assertEqual(
{
'class': 'uk.gov.gchq.gaffer.operation.data.EdgeSeed',
'source': 'src',
'destination': 'dest',
'directed': 'UNDIRECTED'
},
g.EdgeSeed("src", "dest", g.DirectedType.UNDIRECTED).to_json()
)

self.assertEqual(
{
'class': 'uk.gov.gchq.gaffer.operation.data.EdgeSeed',
'source': 'src',
'destination': 'dest',
'directed': 'EITHER'
},
g.EdgeSeed("src", "dest", g.DirectedType.EITHER).to_json()
)

self.assertEqual(
{
'class': 'uk.gov.gchq.gaffer.operation.data.EdgeSeed',
'source': 1,
'destination': 2,
'directed': 'DIRECTED'
},
g.EdgeSeed(1, 2, True).to_json()
)

self.assertEqual(
{
'class': 'uk.gov.gchq.gaffer.operation.data.EdgeSeed',
'source': 1,
'destination': 2,
'directed': 'UNDIRECTED'
},
g.EdgeSeed(1, 2, False).to_json()
)


if __name__ == "__main__":
unittest.main()
2 changes: 1 addition & 1 deletion schema-builder/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>uk.gov.gchq.gaffer</groupId>
<artifactId>gaffer-tools</artifactId>
<version>0.7.4.1</version>
<version>0.7.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Loading

0 comments on commit 57e8525

Please sign in to comment.