From 9ca322ff5f302998881f70557749d227f461e5aa Mon Sep 17 00:00:00 2001 From: David Lougheed Date: Thu, 8 Dec 2022 11:50:13 -0500 Subject: [PATCH 1/3] fix: service-info type (remove url field) and exports for types --- bento_lib/types.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bento_lib/types.py b/bento_lib/types.py index f0d4927..b0780e3 100644 --- a/bento_lib/types.py +++ b/bento_lib/types.py @@ -2,6 +2,8 @@ __all__ = [ "GA4GHServiceType", + "GA4GHServiceOrganization", + "GA4GHServiceInfo", ] @@ -24,5 +26,4 @@ class GA4GHServiceInfo(TypedDict): organization: GA4GHServiceOrganization contactUrl: str version: str - url: str environment: Union[Literal["dev"], Literal["prod"]] From 0ed5d5fe891b72c95f02e5b1363616837b39f674 Mon Sep 17 00:00:00 2001 From: David Lougheed Date: Thu, 8 Dec 2022 11:50:21 -0500 Subject: [PATCH 2/3] chore: bump version to 5.0.1 --- bento_lib/package.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bento_lib/package.cfg b/bento_lib/package.cfg index a6cce97..21340ae 100644 --- a/bento_lib/package.cfg +++ b/bento_lib/package.cfg @@ -1,5 +1,5 @@ [package] name = bento_lib -version = 5.0.0 +version = 5.0.1 authors = David Lougheed, Paul Pillot author_emails = david.lougheed@mail.mcgill.ca, paul.pillot@computationalgenomics.ca From 0a3e7170643ce1bf837ebae49229502c4f064502 Mon Sep 17 00:00:00 2001 From: David Lougheed Date: Thu, 8 Dec 2022 11:58:08 -0500 Subject: [PATCH 3/3] chore[types]: property separate required and optional service info props --- bento_lib/types.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/bento_lib/types.py b/bento_lib/types.py index b0780e3..48863aa 100644 --- a/bento_lib/types.py +++ b/bento_lib/types.py @@ -18,12 +18,20 @@ class GA4GHServiceOrganization(TypedDict): url: str -class GA4GHServiceInfo(TypedDict): +# TODO: py3.11: Required[] instead of base class + + +class _GA4GHServiceInfoBase(TypedDict): id: str name: str type: GA4GHServiceType - description: str organization: GA4GHServiceOrganization - contactUrl: str version: str + + +class GA4GHServiceInfo(_GA4GHServiceInfoBase, total=False): + description: str + contactUrl: str + documentationUrl: str + url: str # Technically not part of spec; comes from service-registry environment: Union[Literal["dev"], Literal["prod"]]