Skip to content

Commit c06f8ec

Browse files
authored
Merge pull request #209 from hubmapconsortium/test-release
v2.0.14 release
2 parents 1b41bb1 + 3df46c6 commit c06f8ec

22 files changed

+5102
-36
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,11 @@ src/VERSION
2828
#ignore eclipse files
2929
.project
3030
.pydevproject
31+
32+
#ignore PyCharm files
33+
.idea/
34+
../.idea/
35+
venv
36+
37+
#ignore test venv
38+
**/testenv/

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.13
1+
2.0.14

entity-api-spec.yaml

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
openapi: 3.0.0
22
info:
33
description: 'The HuBMAP Entity API is a standard RESTful web service with create, update and read operations for the standard HuBMAP provenance graph entities.<br><br>'
4-
version: 2.0.11
4+
version: 2.0.14
55
title: HuBMAP Entity API
66
contact:
77
name: HuBMAP Help Desk
@@ -43,7 +43,7 @@ components:
4343
description: "The name of the antibody."
4444
channel_id:
4545
type: string
46-
description: "The assay specific identifier for the channel corresponding to the antibody."
46+
description: "The assay specific identifier for the channel corresponding to the antibody."
4747
conjugated_cat_number:
4848
type: string
4949
description: "An antibody may be conjugated to a fluorescent tag or a metal tag for detection. Conjugated antibodies may be purchased from commercial providers. Blank if not applicable."
@@ -191,7 +191,7 @@ components:
191191
description: "The name of the file."
192192
description:
193193
type: string
194-
description: "A description of the file."
194+
description: "A description of the file. The Dataset.thumbnail_file does not have this file description."
195195
file_uuid:
196196
type: string
197197
description: "The HuBMAP unique identifier for the file."
@@ -238,7 +238,6 @@ components:
238238
type: string
239239
readOnly: true
240240
description: "The name of the person or process which authenticated when the object was last modified."
241-
###### All other shared properties ######
242241
entity_type:
243242
type: string
244243
readOnly: true
@@ -281,14 +280,14 @@ components:
281280
type: array
282281
items:
283282
type: string
284-
format: file_id
283+
format: temp_file_id
285284
description: 'List of temporary file ids with an optional description. Provide as a json array with an temp_file_id and description attribute for each element like {"files": [{"temp_file_id":"dzevgd6xjs4d5grmcp4n","description":"This is image file one"},{"temp_file_id":"yrahjadfhadf","description":"This is image file two"}]}'
286285
image_files_to_remove:
287286
writeOnly: true
288287
type: array
289288
items:
290289
type: string
291-
format: file_id
290+
format: file_uuid
292291
description: 'List of image files previously uploaded to delete. Provide as a json array of the file_uuids of the file like: ["232934234234234234234270c0ea6c51d604a850558ef2247d0b4", "230948203482234234234a57bfe9c056d08a0f8e6cd612baa3bfa"]'
293292
metadata:
294293
type: object
@@ -367,7 +366,6 @@ components:
367366
type: string
368367
readOnly: true
369368
description: "The name of the person or process which authenticated when the object was last modified."
370-
###### All other shared properties ######
371369
entity_type:
372370
type: string
373371
readOnly: true
@@ -447,7 +445,7 @@ components:
447445
- snatacseq
448446
- snrnaseq
449447
- tissue_lysate
450-
- wgs
448+
- wgs
451449
description: "A code representing the type of specimen. Must be one of the codes specified in: [tissue sample types](https://github.com/hubmapconsortium/search-api/blob/master/src/search-schema/data/definitions/enums/tissue_sample_types.yaml)"
452450
specimen_type_other:
453451
type: string
@@ -534,14 +532,14 @@ components:
534532
type: array
535533
items:
536534
type: string
537-
format: file_id
535+
format: temp_file_id
538536
description: 'List of temporary file ids with an optional description. Provide as a json array with an temp_file_id and description attribute for each element like {"files": [{"temp_file_id":"dzevgd6xjs4d5grmcp4n","description":"This is image file one"},{"temp_file_id":"yrahjadfhadf","description":"This is image file two"}]}'
539537
image_files_to_remove:
540538
writeOnly: true
541539
type: array
542540
items:
543541
type: string
544-
format: file_id
542+
format: file_uuid
545543
description: 'List of image files previously uploaded to delete. Provide as a json array of the file_uuids of the file like: ["232934234234234234234270c0ea6c51d604a850558ef2247d0b4", "230948203482234234234a57bfe9c056d08a0f8e6cd612baa3bfa"]'
546544
metadata_files:
547545
readOnly: true
@@ -553,13 +551,13 @@ components:
553551
type: array
554552
items:
555553
type: string
556-
format: file_id
554+
format: temp_file_id
557555
description: 'List of temporary file ids with an optional description. Provide as a json array with an temp_file_id and description attribute for each element like {"files": [{"temp_file_id":"dzevgd6xjs4d5grmcp4n","description":"This is image file one"},{"temp_file_id":"yrahjadfhadf","description":"This is image file two"}]}'
558556
metadata_files_to_remove:
559557
type: array
560558
items:
561559
type: string
562-
format: file_id
560+
format: file_uuid
563561
description: 'List of image files previously uploaded to delete. Provide as a json array of the file_uuids of the file like: ["232934234234234234234270c0ea6c51d604a850558ef2247d0b4", "230948203482234234234a57bfe9c056d08a0f8e6cd612baa3bfa"]'
564562
Dataset:
565563
type: object
@@ -604,7 +602,6 @@ components:
604602
type: string
605603
readOnly: true
606604
description: "The name of the person or process which authenticated when the object was last modified."
607-
###### All other shared properties ######
608605
entity_type:
609606
type: string
610607
readOnly: true
@@ -770,6 +767,19 @@ components:
770767
type: string
771768
readOnly: true
772769
description: "The uuid of next revision dataset"
770+
thumbnail_file:
771+
readOnly: true
772+
description: 'The dataset thumbnail file detail. Stored in db as a stringfied json, e.g., {"filename": "thumbnail.jpg", "file_uuid": "c35002f9c3d49f8b77e1e2cd4a01803d"}'
773+
thumbnail_file_to_add:
774+
writeOnly: true
775+
type: string
776+
format: temp_file_id
777+
description: 'Just a temporary file id. Provide as a json object with an temp_file_id like {"temp_file_id":"dzevgd6xjs4d5grmcp4n"}'
778+
thumbnail_file_to_remove:
779+
writeOnly: true
780+
type: string
781+
format: file_uuid
782+
description: 'The thumbnail image file previously uploaded to delete. Provide as a string of the file_uuid like: "c35002f9c3d49f8b77e1e2cd4a01803d"'
773783
Upload:
774784
type: object
775785
properties:
@@ -897,7 +907,6 @@ components:
897907
type: string
898908
readOnly: true
899909
description: "The name of the person or process which authenticated when the object was last modified."
900-
###### All other shared properties ######
901910
entity_type:
902911
type: string
903912
readOnly: true
@@ -934,7 +943,7 @@ security:
934943
paths:
935944
'/entities/{id}':
936945
get:
937-
summary: Retrieve a provenance entity by id. Entity types of Donor, Sample and Datasets.
946+
summary: Retrieve a provenance entity by id. Entity types of Donor, Sample and Datasets.
938947
security:
939948
- bearerAuth: []
940949
parameters:
@@ -1322,7 +1331,7 @@ paths:
13221331
description: Internal error
13231332
'/doi/redirect/{id}':
13241333
get:
1325-
summary: Redirect a request from a doi service
1334+
summary: Redirect a request from a doi service
13261335
parameters:
13271336
- name: id
13281337
in: path
@@ -1414,5 +1423,4 @@ paths:
14141423
'404':
14151424
description: The target dataset could not be found
14161425
'500':
1417-
description: Internal error
1418-
1426+
description: Internal error

src/requirements.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@ neo4j==4.2.1
44
prov==2.0.0
55
Werkzeug==1.0.1
66

7+
# For schema templating
8+
nested-lookup==0.2.22
9+
710
# The commons package requires requests>=2.22.0 and PyYAML>=5.3.1
811
requests==2.25.1
912
PyYAML==5.4.1
1013

1114
# The branch name of commons to be used during image build
1215
# Default is master branch specified in docker-compose.yml if not set
1316
git+git://github.com/hubmapconsortium/commons.git@${COMMONS_BRANCH}#egg=hubmap-commons
17+
18+
# For unit test
19+
nose2==0.10.0

src/schema/provenance_schema.yaml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,37 @@ ENTITIES:
342342
immutable: true
343343
description: "The uuid of next revision dataset"
344344
on_read_trigger: get_next_revision_uuid
345-
345+
# No like image and metadata files handling for Donor/Sample
346+
# Dataset has only one thumbnail file
347+
thumbnail_file:
348+
generated: true
349+
type: json_string
350+
description: "The dataset thumbnail file detail. Stored in db as a stringfied json, e.g., {'filename': 'thumbnail.jpg', 'file_uuid': 'dadasdasdadda'}"
351+
# The updated_peripherally tag is a temporary measure to correctly handle any attributes
352+
# which are potentially updated by multiple triggers
353+
updated_peripherally: true
354+
thumbnail_file_to_add:
355+
type: json_string
356+
transient: true
357+
exposed: false
358+
description: 'Just a temporary file id. Provide as a json object with an temp_file_id like {"temp_file_id":"dzevgd6xjs4d5grmcp4n"}'
359+
before_create_trigger: commit_thumbnail_file
360+
# This before_update_trigger with the same commit process can be used by ingest-api to update the dataset via PUT call
361+
before_update_trigger: commit_thumbnail_file
362+
# The updated_peripherally tag is a temporary measure to correctly handle any attributes
363+
# which are potentially updated by multiple triggers
364+
updated_peripherally: true
365+
thumbnail_file_to_remove:
366+
# This is only valid on update via a PUT request
367+
type: string
368+
transient: true
369+
exposed: false
370+
description: 'The thumbnail image file previously uploaded to delete. Provide as a string of the file_uuid like: "232934234234234234234270c0ea6c51d604a850558ef2247d0b4"'
371+
before_update_trigger: delete_thumbnail_file
372+
# The updated_peripherally tag is a temporary measure to correctly handle any attributes
373+
# which are potentially updated by multiple triggers
374+
updated_peripherally: true
375+
346376

347377
############################################# Donor #############################################
348378
Donor:

0 commit comments

Comments
 (0)