Skip to content

Commit

Permalink
Added "in" filter functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianMarzahl committed Mar 10, 2021
1 parent 55f4835 commit 3949356
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 13 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# EXACT-Sync

[![PyPI version fury.io](https://badge.fury.io/py/EXCAT-Sync.svg)](https://pypi.python.org/pypi/EXCAT-Sync/)
[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)



Rest API sync with the EXACT Server https://github.com/ChristianMarzahl/Exact

[Browsable-API](https://documenter.getpostman.com/view/11308910/TVYF6xZo)
Expand Down
8 changes: 7 additions & 1 deletion exact_sync/v1/api/annotation_types_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def list_annotation_types_with_http_info(self, **kwargs): # noqa: E501
returns the request thread.
"""

all_params = ['limit', 'offset', 'id', 'name', 'name__contains', 'vector_type', 'vector_type__lte', 'vector_type__gte', 'vector_type__range', 'active', 'product'] # noqa: E501
all_params = ['limit', 'offset', 'id', 'id__in', 'name', 'name__contains', 'name__in', 'vector_type', 'vector_type__lte', 'vector_type__gte', 'vector_type__range', 'active', 'product'] # noqa: E501

all_params.append('omit')
all_params.append('fields')
Expand Down Expand Up @@ -303,12 +303,18 @@ def list_annotation_types_with_http_info(self, **kwargs): # noqa: E501
query_params.append(('offset', params['offset'])) # noqa: E501
if 'id' in params:
query_params.append(('id', params['id'])) # noqa: E501
if 'id__in' in params:
query_params.append(('id__in', params['id__in'])) # noqa: E501
if 'name' in params:
query_params.append(('name', params['name'])) # noqa: E501
if 'name__in' in params:
query_params.append(('name__in', params['name__in'])) # noqa: E501
if 'name__contains' in params:
query_params.append(('name__contains', params['name__contains'])) # noqa: E501
if 'vector_type' in params:
query_params.append(('vector_type', params['vector_type'])) # noqa: E501
if 'vector_type__in' in params:
query_params.append(('vector_type__in', params['vector_type__in'])) # noqa: E501
if 'vector_type__lte' in params:
query_params.append(('vector_type__lte', params['vector_type__lte'])) # noqa: E501
if 'vector_type__gte' in params:
Expand Down
6 changes: 5 additions & 1 deletion exact_sync/v1/api/annotations_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def list_annotations_with_http_info(self, **kwargs): # noqa: E501
returns the request thread.
"""

all_params = ['limit', 'offset', 'id', 'time', 'time__lte', 'time__gte', 'time__range', 'unique_identifier', 'unique_identifier__contains', 'description', 'description__contains', 'deleted', 'image', 'user', 'annotation_type', 'verified_by', 'verified_by__range', 'vector_x', 'vector_y', 'meta_data__isnull', 'vector__isnull', 'vector_type'] # noqa: E501
all_params = ['limit', 'offset', 'id', 'id__in' 'time', 'time__lte', 'time__gte', 'time__range', 'unique_identifier', 'unique_identifier__contains', 'unique_identifier__in', 'description', 'description__contains', 'deleted', 'image', 'user', 'annotation_type', 'verified_by', 'verified_by__range', 'vector_x', 'vector_y', 'meta_data__isnull', 'vector__isnull', 'vector_type'] # noqa: E501
all_params.append('omit')
all_params.append('fields')
all_params.append('expand')
Expand Down Expand Up @@ -328,6 +328,8 @@ def list_annotations_with_http_info(self, **kwargs): # noqa: E501
query_params.append(('offset', params['offset'])) # noqa: E501
if 'id' in params:
query_params.append(('id', params['id'])) # noqa: E501
if 'id__in' in params:
query_params.append(('id__in', params['id__in'])) # noqa: E501
if 'time' in params:
query_params.append(('time', params['time'])) # noqa: E501
if 'time__lte' in params:
Expand All @@ -340,6 +342,8 @@ def list_annotations_with_http_info(self, **kwargs): # noqa: E501
query_params.append(('unique_identifier', params['unique_identifier'])) # noqa: E501
if 'unique_identifier__contains' in params:
query_params.append(('unique_identifier__contains', params['unique_identifier__contains'])) # noqa: E501
if 'unique_identifier__in' in params:
query_params.append(('unique_identifier__in', params['unique_identifier__in'])) # noqa: E501
if 'description' in params:
query_params.append(('description', params['description'])) # noqa: E501
if 'description__contains' in params:
Expand Down
24 changes: 17 additions & 7 deletions exact_sync/v1/api/image_registration_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,13 @@ def list_image_registrations(self, **kwargs): # noqa: E501
:param async_req bool
:param int limit: Number of results to return per page.
:param int offset: The initial index from which to return the results.
:param str id: id
:param str target_image: target_image
:param str source_image: source_image
:param str registration_error__range: registration_error__range
:param str runtime__range: runtime__range
:param int id: id
:param int target_image: target_image
:param int source_image: source_image
:param str target_image__in: target_image list 1,2,3 etc
:param str source_image__in: target_image list 1,2,3 etc
:param int registration_error__range: registration_error__range
:param int runtime__range: runtime__range
:return: InlineResponse2008
If the method is called asynchronously,
returns the request thread.
Expand All @@ -299,15 +301,17 @@ def list_image_registrations_with_http_info(self, **kwargs): # noqa: E501
:param int offset: The initial index from which to return the results.
:param str id: id
:param str target_image: target_image
:param str source_image: source_image
:param int source_image: source_image
:param str target_image__in: target_image list 1,2,3 etc
:param str source_image__in: target_image list 1,2,3 etc
:param str registration_error__range: registration_error__range
:param str runtime__range: runtime__range
:return: InlineResponse2008
If the method is called asynchronously,
returns the request thread.
"""

all_params = ['limit', 'offset', 'id', 'target_image', 'source_image', 'registration_error__range', 'runtime__range'] # noqa: E501
all_params = ['limit', 'offset', 'id', "id__in", 'target_image', 'source_image', 'target_image__in', 'source_image__in', 'registration_error__range', 'runtime__range'] # noqa: E501
all_params.append('omit')
all_params.append('fields')
all_params.append('expand')
Expand Down Expand Up @@ -337,10 +341,16 @@ def list_image_registrations_with_http_info(self, **kwargs): # noqa: E501
query_params.append(('offset', params['offset'])) # noqa: E501
if 'id' in params:
query_params.append(('id', params['id'])) # noqa: E501
if 'id__in' in params:
query_params.append(('id__in', params['id__in'])) # noqa: E501
if 'target_image' in params:
query_params.append(('target_image', params['target_image'])) # noqa: E501
if 'source_image' in params:
query_params.append(('source_image', params['source_image'])) # noqa: E501
if 'target_image__in' in params:
query_params.append(('target_image__in', params['target_image__in'])) # noqa: E501
if 'source_image__in' in params:
query_params.append(('source_image__in', params['source_image__in'])) # noqa: E501
if 'registration_error__range' in params:
query_params.append(('registration_error__range', params['registration_error__range'])) # noqa: E501
if 'runtime__range' in params:
Expand Down
6 changes: 5 additions & 1 deletion exact_sync/v1/api/image_sets_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ def list_image_sets_with_http_info(self, **kwargs): # noqa: E501
returns the request thread.
"""

all_params = ['limit', 'offset', 'id', 'path', 'path__contains', 'name', 'name__contains', 'location', 'location__contains', 'description', 'description__contains', 'time', 'time__range', 'team', 'creator', 'public', 'main_annotation_type', 'set_tags', 'product', 'collaboration_type', 'priority', 'zip_state', 'images'] # noqa: E501
all_params = ['limit', 'offset', 'id', "id__in", 'path', 'path__contains', 'name', 'name__contains', 'name__in', 'location', 'location__contains', 'description', 'description__contains', 'time', 'time__range', 'team', 'creator', 'public', 'main_annotation_type', 'set_tags', 'product', 'collaboration_type', 'priority', 'zip_state', 'images'] # noqa: E501
all_params.append('omit')
all_params.append('expand')
all_params.append('fields')
Expand Down Expand Up @@ -373,12 +373,16 @@ def list_image_sets_with_http_info(self, **kwargs): # noqa: E501
query_params.append(('offset', params['offset'])) # noqa: E501
if 'id' in params:
query_params.append(('id', params['id'])) # noqa: E501
if 'id__in' in params:
query_params.append(('id__in', params['id__in'])) # noqa: E501
if 'path' in params:
query_params.append(('path', params['path'])) # noqa: E501
if 'path__contains' in params:
query_params.append(('path__contains', params['path__contains'])) # noqa: E501
if 'name' in params:
query_params.append(('name', params['name'])) # noqa: E501
if 'name__in' in params:
query_params.append(('name__in', params['name__in'])) # noqa: E501
if 'name__contains' in params:
query_params.append(('name__contains', params['name__contains'])) # noqa: E501
if 'location' in params:
Expand Down
8 changes: 7 additions & 1 deletion exact_sync/v1/api/images_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ def __list_images_with_http_info(self, **kwargs): # noqa: E501
returns the request thread.
"""

all_params = ['limit', 'offset', 'id', 'name', 'name__contains', 'filename', 'filename__contains', 'time', 'time__contains', 'mpp', 'mpp__range', 'objective_power', 'objective_power__range', 'width', 'width__range', 'height', 'height__range', 'image_set', 'image_type'] # noqa: E501
all_params = ['limit', 'offset', 'id', 'id__in', 'name', 'name__in', 'name__contains', 'filename', 'filename__in', 'filename__contains', 'time', 'time__contains', 'mpp', 'mpp__range', 'objective_power', 'objective_power__range', 'width', 'width__range', 'height', 'height__range', 'image_set', 'image_type'] # noqa: E501
all_params.append('omit')
all_params.append('fields')
all_params.append('expand')
Expand Down Expand Up @@ -553,12 +553,18 @@ def __list_images_with_http_info(self, **kwargs): # noqa: E501
query_params.append(('offset', params['offset'])) # noqa: E501
if 'id' in params:
query_params.append(('id', params['id'])) # noqa: E501
if 'id__in' in params:
query_params.append(('id__in', params['id__in'])) # noqa: E501
if 'name' in params:
query_params.append(('name', params['name'])) # noqa: E501
if 'name__in' in params:
query_params.append(('name__in', params['name__in'])) # noqa: E501
if 'name__contains' in params:
query_params.append(('name__contains', params['name__contains'])) # noqa: E501
if 'filename' in params:
query_params.append(('filename', params['filename'])) # noqa: E501
if 'filename__in' in params:
query_params.append(('filename__in', params['filename__in'])) # noqa: E501
if 'filename__contains' in params:
query_params.append(('filename__contains', params['filename__contains'])) # noqa: E501
if 'time' in params:
Expand Down
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="EXCAT-Sync",
version="0.0.23",
version="0.0.24",
author="Christian Marzahl",
author_email="[email protected]",
description="A package to download images and annotations from the EXACT Server https://github.com/ChristianMarzahl/Exact",
Expand All @@ -25,4 +25,8 @@
"Operating System :: OS Independent",
],
python_requires='>=3.6',
)
)


#python -m build
#python -m twine upload dist/*

0 comments on commit 3949356

Please sign in to comment.