Skip to content
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
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM fcollman/render-python-base:latest
MAINTAINER Forrest Collman (forrest.collman@gmail.com)

RUN mkdir -p /usr/local/render-python
COPY . /usr/local/render-python
WORKDIR /usr/local/render-python
RUN python setup.py install
RUN mkdir -p /shared/render-python
COPY . /shared/render-python
RUN pip install -e /shared/render-python
WORKDIR /shared/render-python

ENTRYPOINT [ "/usr/bin/tini", "--" ]
CMD [ "/bin/bash" ]
18 changes: 13 additions & 5 deletions integration_tests/test_client_integrated.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,12 @@ def test_importTransformChangesClient(render, teststack):
teststack, deststack, TCCjson, changeMode='APPEND', render=render)
renderapi.stack.set_stack_state(deststack, 'COMPLETE', render=render)
os.remove(TCCjson)

output_ts = renderapi.tilespec.get_tile_specs_from_stack(
deststack, render=render)

assert all([ts.tforms[-1].to_dict() == tform_to_append.to_dict()
for ts in renderapi.tilespec.get_tile_specs_from_stack(
deststack, render=render)])
for ts in output_ts])
renderapi.stack.delete_stack(deststack, render=render)


Expand All @@ -188,14 +191,19 @@ def test_transformSectionClient(render, teststack,
deststack = 'test_stack_TSC'
transformId = 'TSC_testtransform'
zvalues = renderapi.stack.get_z_values_for_stack(teststack, render=render)
tform = renderapi.transform.AffineModel()
tform = renderapi.transform.AffineModel(transformId=transformId)

renderapi.client.transformSectionClient(
teststack, transformId, tform.className,
tform.dataString.replace(" ", ","), zvalues, targetStack=deststack,
render=render)
renderapi.stack.set_stack_state(deststack, 'COMPLETE', render=render)

output_ts = renderapi.tilespec.get_tile_specs_from_stack(
deststack, render=render)
root.debug(output_ts[0].tforms[-1].to_dict())
root.debug(output_ts[-1].tforms[-1].to_dict())
root.debug(tform.to_dict())
assert all([ts.tforms[-1].to_dict() == tform.to_dict()
for ts in renderapi.tilespec.get_tile_specs_from_stack(
deststack, render=render)])
for ts in output_ts])
renderapi.stack.delete_stack(deststack, render=render)
17 changes: 9 additions & 8 deletions integration_tests/test_data.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import os

render_host = 'renderservice'
render_port = 8080
client_script_location = ('/var/www/render/render-ws-java-client/'
'src/main/scripts/')
tilespec_file = ('/var/www/render/examples/'
'example_1/cycle1_step1_acquire_tiles.json')
tform_file = ('/var/www/render/examples/'
'example_1/cycle1_step1_acquire_transforms.json')
render_host = os.environ.get('RENDER_HOST','renderservice')
render_port = os.environ.get('RENDER_PORT',8080)
client_script_location = os.environ.get('RENDER_CLIENT_SCRIPTS',
('/var/www/render/render-ws-java-client/'
'src/main/scripts/'))
example_dir = os.environ.get('RENDER_EXAMPLE_DATA','/var/www/render/examples/')
tilespec_file = os.path.join(example_dir,'example_1','cycle1_step1_acquire_tiles.json')
tform_file = os.path.join(example_dir,'example_1','cycle1_step1_acquire_transforms.json')
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def run_tests(self):
required = f.read().splitlines()

setup(name='render-python',
version='1.0.1',
version='1.0.2',
description=' a python API to interact via python with render '
'databases see https://github.com/saalfeldlab/render',
author='Forrest Collman, Russel Torres, Eric Perlman, Sharmi Seshamani',
Expand Down
2 changes: 1 addition & 1 deletion test/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ def test_decorator():
(owner,host,port,project,client_scripts)=my_decorated(5,render=r)
assert(owner == args['owner'])
(owner,host,port,project,client_scripts)=my_decorated(5,owner='newowner',render=r)
assert(owner == 'newowner')
assert(owner == 'newowner')