ebi-ait / dcp-ingest-central

Central point of access for the Ingestion Service of the HCA DCP
Apache License 2.0
0 stars 0 forks source link

Test DUOS in ingest UI #999 #1016

Closed arschat closed 4 months ago

arschat commented 6 months ago

Description of the task:

List and test a number of different cases that we might encounter with the usage of Data use restriction & DUOS ID, in ingest UI described in #999. Feature is deployed in staging, where the test can be done.

First comment will include the list of cases, and in following comments a step by step reproduction of the case and test result should be included.

Acceptance criteria for the task:

arschat commented 6 months ago

List of available cases

arschat commented 6 months ago

Create

create an NRES project with no DOI & no accession

Test: Pass

create an GRU project with no DOI & no accession

Test: Pass

create an GRU-NCU project with no DOI & no accession

Test: Pass

create an NRES project from DOI

Test: Pass

create an GRU project from DOI

Test: Pass

create an GRU-NCU project from DOI

Test: Pass

arschat commented 5 months ago

create an NRES project from accession fails but that fails in prod as well. GEO to HCA script is known to have problems and needs to be updated so we can skip these tests.

arschat commented 5 months ago

Update

update project from NRES -> GRU in UI

Test: pass

update project from GRU-NCU -> NRES in UI

Test: pass

update project from GRU -> GRU-NCU

Test: Pass

update DUOS-ID same data_use_restriction

update DUOS-ID and GRU-NCU -> GRU

update project from NRES -> GRU through api

Query > { "content": { "describedBy": "https://schema.staging.data.humancellatlas.org/type/project/19.0.0/project", "schema_type": "project", "project_core": { "project_short_name": "TestNRES-api-updateGRU", "project_title": "Arsenios Test NRES update api GRU", "project_description": "Arsenios Test NRES update api GRU" }, "contributors": [ { "name": "Arsenios,,Chatzigeorgiou", "email": "arsenios@ebi.ac.uk", "institution": "Department of OMNI Bioinformatics, Genentech, South San Francisco, CA 94080, USA", "corresponding_contributor": true } ], "funders": [ { "grant_id": "unspecified", "organization": "NCI NIH HHS" } ], "data_use_restriction": "GRU", "duos_id": "DUOS-123456" } }

Test: pass

update project from GRU -> NRES through api

Query > { "content": { "describedBy": "https://schema.staging.data.humancellatlas.org/type/project/19.0.0/project", "schema_type": "project", "project_core": { "project_short_name": "TestNRES-api-updateGRU", "project_title": "Arsenios Test NRES update api GRU", "project_description": "Arsenios Test NRES update api GRU" }, "contributors": [ { "name": "Arsenios,,Chatzigeorgiou", "email": "arsenios@ebi.ac.uk", "institution": "Department of OMNI Bioinformatics, Genentech, South San Francisco, CA 94080, USA", "corresponding_contributor": true } ], "funders": [ { "grant_id": "unspecified", "organization": "NCI NIH HHS" } ], "data_use_restriction": "NRES", } }

Test: pass

update project to GRU without DUOS-ID through api

Test: Pass

arschat commented 5 months ago

Bump

update project to have 17.1.1 project_schema version

{ "content": { "describedBy": "https://schema.staging.data.humancellatlas.org/type/project/17.1.1/project", "schema_type": "project", "project_core": { "project_short_name": "TestDowngradeProjectVersion", "project_title": "test downgrade project schema to 17.1.1", "project_description": "test downgrade project schema to 17.1.1" }, "contributors": [ { "name": "Arsenios,,Chatzigeorgiou", "email": "arsenios@ebi.ac.uk", "institution": "EMBL-EBI", "corresponding_contributor": true } ], "funders": [ { "grant_id": "82030097", "organization": "NCI NIH HHS" } ] } } Test: Pass

update project to NRES from project schema version 17.1.1

{ "content": { "describedBy": "https://schema.staging.data.humancellatlas.org/type/project/19.0.0/project", "schema_type": "project", "project_core": { "project_short_name": "TestNRESfrom17-1-1", "project_title": "Arsenios Test DUOS Bump from 17.1.1 to NRES", "project_description": "Arsenios Test DUOS Bump from 17.1.1 to NRES" }, "contributors": [ { "name": "Arsenios,,Chatzigeorgiou", "email": "arsenios@ebi.ac.uk", "institution": "Department of OMNI Bioinformatics, Genentech, South San Francisco, CA 94080, USA", "corresponding_contributor": true } ], "funders": [ { "grant_id": "2019LJ002", "organization": "lefta" } ], "data_use_restriction": "NRES" } }

Test: Pass

update project to GRU from project schema version 18.0.0

query > { "content": { "describedBy": "https://schema.staging.data.humancellatlas.org/type/project/18.0.0/project", "schema_type": "project", "project_core": { "project_short_name": "TestGRUfrom18-0-0", "project_title": "Arsenios Test DUOS Bump from 18.0.0 to GRU", "project_description": "Arsenios Test DUOS Bump from 18.0.0 to GRU" }, "contributors": [ { "name": "Arsenios,,Chatzigeorgiou", "email": "arsenios@ebi.ac.uk", "institution": "EMBL-EBI", "corresponding_contributor": true } ], "funders": [ { "grant_id": "unspecified", "organization": "lefta" } ], "data_use_restriction": "GRU", "duos_id": "DUOS-123456" } }

Test: Pass

arschat commented 5 months ago

Two very minor bugs found:

arschat commented 5 months ago

In the interest of finding the different cases that we might come up in backfilling, I investigated the project_schema versions in ingest.

from hca_ingest.api.ingestapi import IngestApi from collections import Counter

api = IngestApi(url="https://api.ingest.archive.data.humancellatlas.org/") api.set_token(f"bearer {token}")

all_url = 'https://api.ingest.archive.data.humancellatlas.org/projects/' all_projects = api.get_all(all_url, 'projects')

versions = [] for project in all_projects: versions.append(projects['content']['describedBy'][47:53])

Counter(versions)

The output was:

'19.0.0': 13 '18.0.0': 10 '17.1.1': 205 '17.1.0': 5 '17.0.0': 888 '14.1.0': 1 'type/p': 1

Therefore, in case of bump version from 17 and above, we only need to change the schema version and add the data_use_restriction and duos-id if needed. In case of bump from version 14.1.0 we need to fill official_hca_publication field as well.