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/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"] 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 %} 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 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"