From e90acc8cb96f3b93d9bdd1aacaacdd4686cbdaf5 Mon Sep 17 00:00:00 2001 From: Xiao Gui Date: Wed, 28 Aug 2024 15:11:44 +0200 Subject: [PATCH] fix: update siibra-python req (map.find_volumes add: codemeta/service meta --- api/server/api.py | 37 +++++++++++++++++++++++-- codemeta.json | 57 ++++++++++++++++++++++++++++++++++++++ requirements/v4-siibra.txt | 2 +- 3 files changed, 93 insertions(+), 3 deletions(-) create mode 100644 codemeta.json diff --git a/api/server/api.py b/api/server/api.py index 875b4c9..d8c7763 100644 --- a/api/server/api.py +++ b/api/server/api.py @@ -68,6 +68,37 @@ def get_ready(): TODO: implement me""" return "ready" +@siibra_api.get("/servicemeta.json", include_in_schema=False) +def servicemeta(): + return { + "@context": "https://gitlab.ebrains.eu/lauramble/servicemeta/-/raw/main/data/contexts/servicemeta.jsonld", + "type": "WebApplication", + "alternateName": "siibra-api", + "author": [ + { + "type": "Person", + "schema:affiliation": { + "type": "Organization", + "name": "Forschungszentrum Juelich" + }, + "email": "xgui3783@gmail.com", + "familyName": "Gui", + "givenName": "Xiaoyun" + } + ], + "dateModified": "2024-08-28", + "documentation": "https://siibra-api.readthedocs.io/en/latest/", + "name": "siibra-api", + "version": "0.3.18", + "inputFormat": [ + "json" + ], + "outputFormat": [ + "nifti", + "json" + ] +} + @siibra_api.get("/", include_in_schema=False) def get_home(request: Request): """Return the template for the siibra landing page.""" @@ -94,17 +125,19 @@ async def read_bytes(generator) -> bytes: do_not_cache_list = [ "metrics", "openapi.json", - "atlas_download" + "atlas_download", + "servicemeta", ] do_no_cache_query_list = [ "bbox=", - "find=" + "find=", ] do_not_logs = ( "/ready", "/metrics", + "servicemeta" ) diff --git a/codemeta.json b/codemeta.json new file mode 100644 index 0000000..9d4c16f --- /dev/null +++ b/codemeta.json @@ -0,0 +1,57 @@ +{ + "@context": "https://doi.org/10.5063/schema/codemeta-2.0", + "type": "SoftwareSourceCode", + "author": [ + { + "id": "_:author_1", + "type": "Person", + "affiliation": { + "type": "Organization", + "name": "Forschungszentrum Juelich" + }, + "email": "xgui3783@gmail.com", + "familyName": "Gui", + "givenName": "Xiaoyun" + }, + { + "id": "_:author_2", + "type": "Person", + "familyName": "Marcenko", + "givenName": "Vadim" + }, + { + "id": "_:author_3", + "type": "Person", + "familyName": "Simsek", + "givenName": "Ahmet Nihat" + }, + { + "id": "https://orcid.org/0000-0002-9051-3701", + "type": "Person", + "affiliation": { + "type": "Organization", + "name": "Forschungszentrum Juelich" + }, + "email": "t.dickscheid@fz-juelich.de", + "familyName": "Dickscheid", + "givenName": "Timo" + } + ], + "codeRepository": "git+https://github.com/fzj-inm1-bda/siibra-api.git", + "dateCreated": "2024-08-28", + "dateModified": "2024-08-28", + "datePublished": "2021-07-18", + "description": "Siibra-API provides an easy REST access to the siibra-python features.\n\n The main goal is to abstract the python functionalities in a way that they can be used via HTTP and make it more independent and accessible.", + "license": "https://spdx.org/licenses/Apache-2.0", + "name": "siibra-api", + "programmingLanguage": [ + "python 3" + ], + "runtimePlatform": "docker", + "version": "0.3.18", + "contIntegration": "https://github.com/FZJ-INM1-BDA/siibra-api/actions", + "codemeta:continuousIntegration": { + "id": "https://github.com/FZJ-INM1-BDA/siibra-api/actions" + }, + "issueTracker": "https://github.com/fzj-inm1-bda/siibra-api/issues" +} diff --git a/requirements/v4-siibra.txt b/requirements/v4-siibra.txt index 7a573de..a16d4be 100644 --- a/requirements/v4-siibra.txt +++ b/requirements/v4-siibra.txt @@ -1,2 +1,2 @@ # refactor_attr is... borked since dataops are being introduced -git+https://github.com/FZJ-INM1-BDA/siibra-python.git@769ab07c05555b2c66261f9a38516e247e70318a +git+https://github.com/xgui3783/siibra-python.git@aeffb478a1c98f3bec276ab820f5e50355c598a4