From 1b7706f3fff01f2fa1f6136eb19b16331fc07a81 Mon Sep 17 00:00:00 2001 From: Conventional Changelog Action Date: Thu, 19 Oct 2023 08:10:57 +0000 Subject: [PATCH 1/4] chore(release): v2.0.3 [skip ci] --- CHANGELOG.md | 18 +++++++++--------- pyproject.toml | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 22aa10a..504b0a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## [2.0.3](https://github.com/InTaVia/InTaVia-Backend/compare/v2.0.2...v2.0.3) (2023-10-19) + + +### Bug Fixes + +* fixes an error due to missing prefixes ([9776346](https://github.com/InTaVia/InTaVia-Backend/commit/9776346f4d83cebff825652ca785573ef4cfef06)) + + + ## [2.0.2](https://github.com/InTaVia/InTaVia-Backend/compare/v2.0.1...v2.0.2) (2023-08-31) @@ -49,12 +58,3 @@ -## [0.5.2](https://github.com/InTaVia/InTaVia-Backend/compare/v0.5.1...v0.5.2) (2023-08-21) - - -### Bug Fixes - -* fixes an issue with the pagination ([5b06d2f](https://github.com/InTaVia/InTaVia-Backend/commit/5b06d2f571185842b70d003ec4b9b07e6ddc52a3)), closes [#185](https://github.com/InTaVia/InTaVia-Backend/issues/185) - - - diff --git a/pyproject.toml b/pyproject.toml index 3abe615..3726f2a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ profile = "black" [tool.poetry] name = "intavia-backend" -version = "2.0.2" +version = "2.0.3" description = "" authors = [ "Matthias Schlögl " ] license = "MIT" From 0f226a5bc605054729532a3ca2cd02c850438f1b Mon Sep 17 00:00:00 2001 From: Jouni Tuominen Date: Thu, 19 Oct 2023 11:44:31 +0200 Subject: [PATCH 2/4] add biography texts for BNet person entities to biography retrieve endpoint --- .../sparql/bulk_retrieve_biographies_v2_1.sparql | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/intavia_backend/sparql/bulk_retrieve_biographies_v2_1.sparql b/intavia_backend/sparql/bulk_retrieve_biographies_v2_1.sparql index 4052841..b3baf8d 100644 --- a/intavia_backend/sparql/bulk_retrieve_biographies_v2_1.sparql +++ b/intavia_backend/sparql/bulk_retrieve_biographies_v2_1.sparql @@ -1,11 +1,16 @@ PREFIX idmcore: +PREFIX bgn: -SELECT ?bioText ?bioAbstract ?bioID +SELECT ?bioText ?bioAbstract ?biotext ?bioID {% include 'add_datasets_v2_1.sparql' %} WHERE { VALUES ?bioID { {% for id in ids %}<{{id}}> {% endfor %} } - ?bioID idmcore:full_bio_link ?bioText . - OPTIONAL {?bioID idmcore:short_bio_link ?bioAbstract .} + { ?bioID idmcore:full_bio_link ?bioText . + OPTIONAL {?bioID idmcore:short_bio_link ?bioAbstract .} } + UNION + { ?bioID bgn:hasBioParts ?bioparts . + ?bioparts bgn:text ?biotext . + FILTER NOT EXISTS { ?bioparts bgn:hasFigure ?fig . } } } \ No newline at end of file From 3fff3f3ad21f39fbdbd36e16fc0af17092e783dd Mon Sep 17 00:00:00 2001 From: Jouni Tuominen Date: Thu, 19 Oct 2023 13:29:37 +0300 Subject: [PATCH 3/4] add id enrichment named graphs (persons, groups, places) to FROM --- intavia_backend/sparql/add_datasets_v2_1.sparql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/intavia_backend/sparql/add_datasets_v2_1.sparql b/intavia_backend/sparql/add_datasets_v2_1.sparql index 086d569..50d1b72 100644 --- a/intavia_backend/sparql/add_datasets_v2_1.sparql +++ b/intavia_backend/sparql/add_datasets_v2_1.sparql @@ -4,6 +4,9 @@ FROM FROM FROM FROM +FROM +FROM +FROM {% for dataset in datasets %} FROM <{{dataset.value}}> -{% endfor %} \ No newline at end of file +{% endfor %} From 593b91dd4dac5d057d18128acbd8f55418185a6a Mon Sep 17 00:00:00 2001 From: Jouni Tuominen Date: Fri, 20 Oct 2023 09:39:35 +0200 Subject: [PATCH 4/4] fix for getting biography abstract in case of multiple biographies requested --- intavia_backend/main_v2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intavia_backend/main_v2.py b/intavia_backend/main_v2.py index 74ec08c..472705e 100644 --- a/intavia_backend/main_v2.py +++ b/intavia_backend/main_v2.py @@ -271,7 +271,7 @@ async def bulk_retrieve_biography_objects( r_fin["text"] = r1.json()["text"] elif "biotext" in r: r_fin["text"] = r["biotext"] - if "bioAbstract" in res[0]: + if "bioAbstract" in r: r2 = requests.get(r["bioAbstract"]) if r2.status_code == 200: r_fin["abstract"] = r2.json()["text"]