Skip to content

Commit a4ba308

Browse files
committed
[a] Remove files.url (#6549)
1 parent fcb3ab2 commit a4ba308

File tree

7 files changed

+69
-124
lines changed

7 files changed

+69
-124
lines changed

lambdas/service/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
# changes and reset the minor version to zero. Otherwise, increment only
122122
# the minor version for backwards compatible changes. A backwards
123123
# compatible change is one that does not require updates to clients.
124-
'version': '14.4',
124+
'version': '14.5',
125125
'description': fd(f'''
126126
# Overview
127127

lambdas/service/openapi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"openapi": "3.0.1",
33
"info": {
44
"title": "azul-service-dev",
5-
"version": "14.4",
5+
"version": "14.5",
66
"description": "\n# Overview\n\nAzul is a REST web service for querying metadata associated with\nboth experimental and analysis data from a data repository. In order\nto deliver response times that make it suitable for interactive use\ncases, the set of metadata properties that it exposes for sorting,\nfiltering, and aggregation is limited. Azul provides a uniform view\nof the metadata over a range of diverse schemas, effectively\nshielding clients from changes in the schemas as they occur over\ntime. It does so, however, at the expense of detail in the set of\nmetadata properties it exposes and in the accuracy with which it\naggregates them.\n\nAzul denormalizes and aggregates metadata into several different\nindices for selected entity types. Metadata entities can be queried\nusing the [Index](#operations-tag-Index) endpoints.\n\nA set of indices forms a catalog. There is a default catalog called\n`dcp2` which will be used unless a\ndifferent catalog name is specified using the `catalog` query\nparameter. Metadata from different catalogs is completely\nindependent: a response obtained by querying one catalog does not\nnecessarily correlate to a response obtained by querying another\none. Two catalogs can contain metadata from the same sources or\ndifferent sources. It is only guaranteed that the body of a\nresponse by any given endpoint adheres to one schema,\nindependently of which catalog was specified in the request.\n\nAzul provides the ability to download data and metadata via the\n[Manifests](#operations-tag-Manifests) endpoints. The\n`curl` format manifests can be used to\ndownload data files. Other formats provide various views of the\nmetadata. Manifests can be generated for a selection of files using\nfilters. These filters are interchangeable with the filters used by\nthe [Index](#operations-tag-Index) endpoints.\n\nAzul also provides a [summary](#operations-Index-get_index_summary)\nview of indexed data.\n\n## Data model\n\nAny index, when queried, returns a JSON array of hits. Each hit\nrepresents a metadata entity. Nested in each hit is a summary of the\nproperties of entities associated with the hit. An entity is\nassociated either by a direct edge in the original metadata graph,\nor indirectly as a series of edges. The nested properties are\ngrouped by the type of the associated entity. The properties of all\ndata files associated with a particular sample, for example, are\nlisted under `hits[*].files` in a `/index/samples` response. It is\nimportant to note that while each _hit_ represents a discrete\nentity, the properties nested within that hit are the result of an\naggregation over potentially many associated entities.\n\nTo illustrate this, consider a data file that is part of two\nprojects (a project is a group of related experiments, typically by\none laboratory, institution or consortium). Querying the `files`\nindex for this file yields a hit looking something like:\n\n```\n{\n \"projects\": [\n {\n \"projectTitle\": \"Project One\"\n \"laboratory\": ...,\n ...\n },\n {\n \"projectTitle\": \"Project Two\"\n \"laboratory\": ...,\n ...\n }\n ],\n \"files\": [\n {\n \"format\": \"pdf\",\n \"name\": \"Team description.pdf\",\n ...\n }\n ]\n}\n```\n\nThis example hit contains two kinds of nested entities (a hit in an\nactual Azul response will contain more): There are the two projects\nentities, and the file itself. These nested entities contain\nselected metadata properties extracted in a consistent way. This\nmakes filtering and sorting simple.\n\nAlso notice that there is only one file. When querying a particular\nindex, the corresponding entity will always be a singleton like\nthis.\n\n\n## Contact us\n\nFor technical support please file an issue at\n[GitHub](https://github.com/DataBiosphere/azul/issues) or email\n`[email protected]`. To report a security concern or misconduct please email\n`[email protected]`.\n"
77
},
88
"tags": [

src/azul/plugins/metadata/anvil/service/response.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,6 @@ def _pivotal_entity(self,
218218
inner_entity['azul_url'] = self._file_url(uuid=json_str(inner_entity['uuid']),
219219
version=json_str(inner_entity['version']),
220220
drs_uri=optional(json_str, inner_entity['drs_uri']))
221-
# FIXME: https://github.com/DataBiosphere/azul/issues/6549
222-
# Remove files.url
223-
inner_entity['url'] = inner_entity['azul_url']
224221
inner_entity.pop('uuid', None)
225222
inner_entity.pop('version', None)
226223
return inner_entity

src/azul/plugins/metadata/hca/service/response.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -418,9 +418,6 @@ def make_translated_file(self, file: JSON) -> JSON:
418418
version=json_str(file['version']),
419419
drs_uri=optional(json_str, file['drs_uri']))
420420
}
421-
# FIXME: https://github.com/DataBiosphere/azul/issues/6549
422-
# Remove files.url
423-
translated_file['url'] = translated_file['azul_url']
424421
return translated_file
425422

426423
def make_specimen(self, specimen) -> MutableJSON:

test/integration_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,7 @@ def _check_jsonl_manifest(self, _catalog: CatalogName, response: bytes):
11011101
def _test_repository_files(self, catalog: CatalogName):
11021102
with self.subTest('repository_files', catalog=catalog):
11031103
outer_file, inner_file = self._get_one_inner_file(catalog)
1104-
file_url = inner_file['url']
1104+
file_url = inner_file['azul_url']
11051105
if file_url:
11061106
file_url = furl(file_url)
11071107
# FIXME: Use _check_endpoint() instead
@@ -1198,7 +1198,7 @@ def _test_dos(self, catalog: CatalogName, file: JSON):
11981198
path=drs.dos_object_url_path(file_uuid),
11991199
args=dict(catalog=catalog))
12001200
json_data = json.loads(response)['data_object']
1201-
file_url = first(json_data['urls'])['url']
1201+
file_url = first(json_data['urls'])['azul_url']
12021202
while True:
12031203
with self._get_url(method=GET,
12041204
url=file_url,
@@ -1531,7 +1531,7 @@ def _test_managed_access_repository_files(self,
15311531
}
15321532
})
15331533
managed_access_file_urls = {
1534-
one(file['files'])['url']
1534+
one(file['files'])['azul_url']
15351535
for file in files
15361536
}
15371537
file_url = furl(self.random.choice(sorted(managed_access_file_urls)))

0 commit comments

Comments
 (0)