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
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.6.14
3.6.15
4 changes: 2 additions & 2 deletions search-api-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1141,11 +1141,11 @@ paths:
'/reindex-status/{identifier}':
get:
summary: Retrieves a json containing information about a particularitem in the queue including its priority level, and its position in the queue.
description: To retrieve infomration about an individual entity in the queue, include either the id used when submitting the reindex request (uuid or hubmap_id) or the job_id (returned when submitting the request) as a path variable.
description: To retrieve infomration about an individual entity in the queue, include either the id used when submitting the reindex request (uuid or hubmap_id) or the reference_id (returned when submitting the request) as a path variable.
parameters:
- name: identifier
in: path
description: The id of the chosen entity. Either the original id used during reindex submission (uuid or HuBMAP ID, whichever was used) or the job_id returned when the reindex was submitted.
description: The id of the chosen entity. Either the original id used during reindex submission (uuid or HuBMAP ID, whichever was used) or the reference_id returned when the reindex was submitted.
responses:
'200':
description: Returns the status data as a json describing the current state of the chosen entity.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ def get_assay_type_for_viz(doc):
# Check if the main entity can be visualized by portal-visualization.
doc['visualization'] = has_visualization(doc, get_assay_type_for_viz)

# Set the 'spatial' field for search based off of the presence of the 'spatial' hint
if ('spatial' in assay_details.get('vitessce-hints', [])):
doc['spatial'] = True

if not doc['visualization']:
# If an entity doesn't have a visualization,
# check its descendants for a supporting image pyramid.
Expand All @@ -225,9 +229,9 @@ def get_assay_type_for_descendants(descendant):
uuid = descendant
return _get_assay_details_by_uuid(uuid, transformation_resources)

# Filter any unpublished/non-QA descendants
# Filter any unpublished/non-QA descendants and multi-assay splits
descendants = [descendant for descendant in descendants if [
'Published', 'QA'].count(descendant.get('status')) > 0]
'Published', 'QA'].count(descendant.get('status')) > 0 and descendant.get('creation_action') != CreationAction.MULTI_ASSAY_SPLIT]
# Sort by the descendant's last modified timestamp, descending
descendants.sort(
key=lambda x: x['last_modified_timestamp'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,57 @@ def test_processed_dataset_type(mocker):
assert input_processed_doc == output_processed_doc


def mock_spatial_soft_assay(uuid=None, headers=None):
return mock_response({
"assaytype": "salmon_rnaseq_sciseq",
"contains-pii": True,
"pipeline-shorthand": "Salmon",
"description": "sciRNA-seq [Salmon]",
"primary": False,
"vitessce-hints": [
"is_sc",
"rna",
"spatial"
]
})


def test_spatial_dataset_type(mocker):
mocker.patch('requests.get', side_effect=[
mock_spatial_soft_assay(),
mock_empty_descendants()])
input_processed_doc = {
'uuid': '22684b9011fc5aea5cb3f89670a461e8',
'dataset_type': 'RNAseq [Salmon]',
'entity_type': 'Dataset',
'creation_action': 'Central Process'
}

output_processed_doc = {
'assay_display_name': ['sciRNA-seq [Salmon]'],
'dataset_type': 'RNAseq [Salmon]',
'entity_type': 'Dataset',
'mapped_data_types': ['sciRNA-seq [Salmon]'],
'pipeline': 'Salmon',
'raw_dataset_type': 'RNAseq',
'assay_modality': 'single',
'creation_action': 'Central Process',
'processing': 'processed',
'processing_type': 'hubmap',
'uuid': '22684b9011fc5aea5cb3f89670a461e8',
'soft_assaytype': 'salmon_rnaseq_sciseq',
'vitessce-hints': [
"is_sc",
"rna",
"spatial"
],
'visualization': True,
'spatial': True,
}
add_assay_details(input_processed_doc, mock_transformation_resources)
assert input_processed_doc == output_processed_doc


def mock_empty_soft_assay(uuid=None, headers=None):
return mock_response({})

Expand Down
4 changes: 2 additions & 2 deletions src/hubmap_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ def enqueue_reindex(self, entity_id, reindex_queue, priority):
logger.info(f"Enqueueing reindex for {entity['entity_type']} of uuid: {entity_id}")
subsequent_priority = max(priority, 2)

job_id = reindex_queue.enqueue(
reference_id = reindex_queue.enqueue(
job_metadata = {"uuid": entity.get('uuid'), "hubmap_id": entity.get('hubmap_id')},
task_func=reindex_entity_queued_wrapper,
entity_id=entity_id,
Expand Down Expand Up @@ -816,7 +816,7 @@ def enqueue_reindex(self, entity_id, reindex_queue, priority):
priority=subsequent_priority
)
logger.info(f"Finished executing translate() on {entity['entity_type']} of uuid: {entity_id}")
return job_id
return reference_id
except ValueError as e:
raise ValueError(e)
except RedisError as e:
Expand Down
4 changes: 2 additions & 2 deletions src/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Flask==3.0.3
Flask==3.1.3
jsonschema==4.25.1
# The commons package requires requests>=2.22.0 and PyYAML>=5.3.1
requests==2.32.5
Expand All @@ -11,7 +11,7 @@ portal-visualization==0.5.1
# Default is main branch specified in search-api's docker-compose.development.yml if not set
# git+https://github.com/hubmapconsortium/commons.git@${COMMONS_BRANCH}#egg=hubmap-commons

hubmap-commons==2.1.22
hubmap-commons==2.1.23
atlas-consortia-jobq>=0.1.0
# The use of `-r` lets us specify the transitive requirements in one place
-r search-adaptor/src/requirements.txt
2 changes: 1 addition & 1 deletion src/search-adaptor
Submodule search-adaptor updated 2 files
+1 −1 VERSION
+6 −4 src/app.py
Loading