From 5f2ba9988c5eb430ddc9e8f020e40c8c274c5643 Mon Sep 17 00:00:00 2001 From: AdrianValentinCiu Date: Tue, 9 Apr 2024 13:25:13 +0300 Subject: [PATCH 1/3] EBR-30: Created endpoint (GET) /about for codemeta.json Added codemeta.json --- codemeta.json | 83 +++++++++++++++++++ .../tvb/interfaces/web/codemeta.json | 83 +++++++++++++++++++ .../web/controllers/about_controller.py | 47 +++++++++++ tvb_framework/tvb/interfaces/web/run.py | 2 + 4 files changed, 215 insertions(+) create mode 100644 codemeta.json create mode 100644 tvb_framework/tvb/interfaces/web/codemeta.json create mode 100644 tvb_framework/tvb/interfaces/web/controllers/about_controller.py diff --git a/codemeta.json b/codemeta.json new file mode 100644 index 0000000000..7bb89018b4 --- /dev/null +++ b/codemeta.json @@ -0,0 +1,83 @@ +{ + "@context": "https://doi.org/10.5063/schema/codemeta-2.0", + "type": "SoftwareSourceCode", + "applicationCategory": "application", + "author": [ + { + "id": "https://search.kg.ebrains.eu/instances/7dcbd8d3-2b6d-4f32-9e1e-dd83887324c4", + "type": "Person", + "affiliation": { + "type": "Organization", + "name": "Codemart" + }, + "familyName": "Domide", + "givenName": "Lia" + }, + { + "id": "https://search.kg.ebrains.eu/instances/08380973-2dc1-4326-b752-a10d9239a0b1", + "type": "Person", + "affiliation": { + "type": "Organization", + "name": "Codemart" + }, + "familyName": "Mersmann", + "givenName": "Jochen" + }, + { + "id": "https://search.kg.ebrains.eu/instances/d09a1422-429c-4853-b1a4-a511ae199dec", + "type": "Person", + "affiliation": { + "type": "Organization", + "name": "SFU" + }, + "familyName": "McIntosh", + "givenName": "Randy" + }, + { + "id": "https://search.kg.ebrains.eu/instances/045f846f-f010-4db8-97b9-b95b20970bf2", + "type": "Person", + "affiliation": { + "type": "Organization", + "name": "INS" + }, + "familyName": "Jirsa", + "givenName": "Viktor" + }, + { + "id": "https://search.kg.ebrains.eu/instances/2da0094e-5ff2-4539-ac62-801204bfcdfa", + "type": "Person", + "affiliation": { + "type": "Organization", + "name": "Charite" + }, + "familyName": "Ritter", + "givenName": "Petra" + } + ], + "codeRepository": "https://github.com/the-virtual-brain/tvb-root/", + "dateModified": "2023-09-19", + "datePublished": "2012-10-13", + "description": "Access the TVB GUI from the Internet and simulate brain network models on HCP. TheVirtualBrain is a framework for the simulation of the dynamics of large-scale brain networks with biologically realistic connectivity. TheVirtualBrain uses tractographic data (DTI/DSI) to generate connectivity matrices and build cortical and subcortical brain networks. The connectivity matrix defines the connection strengths and time delays via signal transmission between all network nodes. Various neural mass models are available in the repertoire of TheVirtualBrain and define the dynamics of a network node. Together, the neural mass models at the network nodes and the connectivity matrix define the Virtual Brain. TheVirtualBrain simulates and generates the time courses of various forms of neural activity including Local Field Potentials (LFP) and firing rate, as well as brain imaging data such as EEG, MEG and BOLD activations as observed in fMRI.\n\nTheVirtualBrain is foremost a scientific simulation platform and provides all means necessary to generate, manipulate and visualize connectivity and network dynamics. In addition, TheVirtualBrain comprises a set of classical time series analysis tools, structural and functional connectivity analysis tools, as well as parameter exploration facilities.\n\nAn overview over TVB-on-EBRAINS services is provided in the preprint https://arxiv.org/abs/2102.05888\n\nVersion specification\nhttps://github.com/the-virtual-brain/tvb-root/blob/master/tvbdocumentation/RELEASENOTES", + "downloadUrl": "https://github.com/the-virtual-brain/tvb-root/", + "funder": { + "type": "Organization", + "name": "EU" + }, + "keywords": [ + "virtual", + "brain" + ], + "license": "https://spdx.org/licenses/GPL-3.0+", + "name": "The Virtual Brain Web-App", + "operatingSystem": [ + "Windows", + "MacOS", + "Linux" + ], + "programmingLanguage": "Python", + "version": "2.8.2", + "contIntegration": "https://github.com/the-virtual-brain/tvb-root/", + "developmentStatus": "active", + "funding": "785907 (Human Brain Project SGA2), 945539 (Human Brain Project SGA3) and VirtualBrainCloud 826421", + "referencePublication": "https://arxiv.org/abs/2102.05888" +} \ No newline at end of file diff --git a/tvb_framework/tvb/interfaces/web/codemeta.json b/tvb_framework/tvb/interfaces/web/codemeta.json new file mode 100644 index 0000000000..7bb89018b4 --- /dev/null +++ b/tvb_framework/tvb/interfaces/web/codemeta.json @@ -0,0 +1,83 @@ +{ + "@context": "https://doi.org/10.5063/schema/codemeta-2.0", + "type": "SoftwareSourceCode", + "applicationCategory": "application", + "author": [ + { + "id": "https://search.kg.ebrains.eu/instances/7dcbd8d3-2b6d-4f32-9e1e-dd83887324c4", + "type": "Person", + "affiliation": { + "type": "Organization", + "name": "Codemart" + }, + "familyName": "Domide", + "givenName": "Lia" + }, + { + "id": "https://search.kg.ebrains.eu/instances/08380973-2dc1-4326-b752-a10d9239a0b1", + "type": "Person", + "affiliation": { + "type": "Organization", + "name": "Codemart" + }, + "familyName": "Mersmann", + "givenName": "Jochen" + }, + { + "id": "https://search.kg.ebrains.eu/instances/d09a1422-429c-4853-b1a4-a511ae199dec", + "type": "Person", + "affiliation": { + "type": "Organization", + "name": "SFU" + }, + "familyName": "McIntosh", + "givenName": "Randy" + }, + { + "id": "https://search.kg.ebrains.eu/instances/045f846f-f010-4db8-97b9-b95b20970bf2", + "type": "Person", + "affiliation": { + "type": "Organization", + "name": "INS" + }, + "familyName": "Jirsa", + "givenName": "Viktor" + }, + { + "id": "https://search.kg.ebrains.eu/instances/2da0094e-5ff2-4539-ac62-801204bfcdfa", + "type": "Person", + "affiliation": { + "type": "Organization", + "name": "Charite" + }, + "familyName": "Ritter", + "givenName": "Petra" + } + ], + "codeRepository": "https://github.com/the-virtual-brain/tvb-root/", + "dateModified": "2023-09-19", + "datePublished": "2012-10-13", + "description": "Access the TVB GUI from the Internet and simulate brain network models on HCP. TheVirtualBrain is a framework for the simulation of the dynamics of large-scale brain networks with biologically realistic connectivity. TheVirtualBrain uses tractographic data (DTI/DSI) to generate connectivity matrices and build cortical and subcortical brain networks. The connectivity matrix defines the connection strengths and time delays via signal transmission between all network nodes. Various neural mass models are available in the repertoire of TheVirtualBrain and define the dynamics of a network node. Together, the neural mass models at the network nodes and the connectivity matrix define the Virtual Brain. TheVirtualBrain simulates and generates the time courses of various forms of neural activity including Local Field Potentials (LFP) and firing rate, as well as brain imaging data such as EEG, MEG and BOLD activations as observed in fMRI.\n\nTheVirtualBrain is foremost a scientific simulation platform and provides all means necessary to generate, manipulate and visualize connectivity and network dynamics. In addition, TheVirtualBrain comprises a set of classical time series analysis tools, structural and functional connectivity analysis tools, as well as parameter exploration facilities.\n\nAn overview over TVB-on-EBRAINS services is provided in the preprint https://arxiv.org/abs/2102.05888\n\nVersion specification\nhttps://github.com/the-virtual-brain/tvb-root/blob/master/tvbdocumentation/RELEASENOTES", + "downloadUrl": "https://github.com/the-virtual-brain/tvb-root/", + "funder": { + "type": "Organization", + "name": "EU" + }, + "keywords": [ + "virtual", + "brain" + ], + "license": "https://spdx.org/licenses/GPL-3.0+", + "name": "The Virtual Brain Web-App", + "operatingSystem": [ + "Windows", + "MacOS", + "Linux" + ], + "programmingLanguage": "Python", + "version": "2.8.2", + "contIntegration": "https://github.com/the-virtual-brain/tvb-root/", + "developmentStatus": "active", + "funding": "785907 (Human Brain Project SGA2), 945539 (Human Brain Project SGA3) and VirtualBrainCloud 826421", + "referencePublication": "https://arxiv.org/abs/2102.05888" +} \ No newline at end of file diff --git a/tvb_framework/tvb/interfaces/web/controllers/about_controller.py b/tvb_framework/tvb/interfaces/web/controllers/about_controller.py new file mode 100644 index 0000000000..ddbe46c427 --- /dev/null +++ b/tvb_framework/tvb/interfaces/web/controllers/about_controller.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +# +# +# TheVirtualBrain-Framework Package. This package holds all Data Management, and +# Web-UI helpful to run brain-simulations. To use it, you also need to download +# TheVirtualBrain-Scientific Package (for simulators). See content of the +# documentation-folder for more details. See also http://www.thevirtualbrain.org +# +# (c) 2012-2023, Baycrest Centre for Geriatric Care ("Baycrest") and others +# +# This program is free software: you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software Foundation, +# either version 3 of the License, or (at your option) any later version. +# This program is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. See the GNU General Public License for more details. +# You should have received a copy of the GNU General Public License along with this +# program. If not, see . +# +# +# CITATION: +# When using The Virtual Brain for scientific publications, please cite it as explained here: +# https://www.thevirtualbrain.org/tvb/zwei/neuroscience-publications +# +# + +""" +.. moduleauthor:: Adrian Ciu +""" + +import cherrypy +import json +from tvb.interfaces.web.controllers.base_controller import BaseController +import os + + +class AboutController(BaseController): + # def __init__(self): + # super().__init__() + # # For testing. The symlink will be done in the docker file + # os.symlink('../../../../../codemeta.json', '../codemeta.json') + + @cherrypy.expose + def about(self): + with open('./codemeta.json', 'r') as f: + data = json.load(f) + return json.dumps(data) diff --git a/tvb_framework/tvb/interfaces/web/run.py b/tvb_framework/tvb/interfaces/web/run.py index 5f34eae18d..56f5e74f5d 100644 --- a/tvb_framework/tvb/interfaces/web/run.py +++ b/tvb_framework/tvb/interfaces/web/run.py @@ -31,6 +31,7 @@ """ import time +from tvb.interfaces.web.controllers.about_controller import AboutController STARTUP_TIC = time.time() @@ -162,6 +163,7 @@ def init_cherrypy(arguments=None): cherrypy.tree.mount(TransferVectorController(), TransferVectorController.build_path("/burst/transfer/"), config=CONFIGUER) cherrypy.tree.mount(HPCController(), BaseController.build_path("/hpc/"), config=CONFIGUER) cherrypy.tree.mount(KubeController(), BaseController.build_path("/kube/"), config=CONFIGUER) + cherrypy.tree.mount(AboutController(), BaseController.build_path("/"), config=CONFIGUER) cherrypy.config.update(CONFIGUER) From 82d044bbad87737378a2d5155ce14cbba7ba4b88 Mon Sep 17 00:00:00 2001 From: liadomide Date: Tue, 18 Jun 2024 22:39:34 +0300 Subject: [PATCH 2/3] EBR-30 Update JSON files as advised by the KB team. Review --- codemeta.json | 63 +++++++++--------- .../web/controllers/about/__init__.py | 0 .../{ => about}/about_controller.py | 11 ++-- .../about/servicemeta.json} | 65 ++++++++++--------- tvb_framework/tvb/interfaces/web/run.py | 3 +- 5 files changed, 74 insertions(+), 68 deletions(-) create mode 100644 tvb_framework/tvb/interfaces/web/controllers/about/__init__.py rename tvb_framework/tvb/interfaces/web/controllers/{ => about}/about_controller.py (86%) rename tvb_framework/tvb/interfaces/web/{codemeta.json => controllers/about/servicemeta.json} (83%) diff --git a/codemeta.json b/codemeta.json index 7bb89018b4..81e831ce34 100644 --- a/codemeta.json +++ b/codemeta.json @@ -1,7 +1,38 @@ { - "@context": "https://doi.org/10.5063/schema/codemeta-2.0", + "@context": "https://gitlab.ebrains.eu/lauramble/servicemeta/-/raw/main/data/contexts/servicemeta.jsonld", "type": "SoftwareSourceCode", - "applicationCategory": "application", + "name": "The Virtual Brain Web-App", + "license": "https://spdx.org/licenses/GPL-3.0+", + "codeRepository": "https://github.com/the-virtual-brain/tvb-root/", + "documentation": "https://docs.thevirtualbrain.org/", + "downloadUrl": "https://www.thevirtualbrain.org/tvb/zwei/brainsimulator-software", + "url": "https://tvb.apps.ebrains.eu/", + "referencePublication": "https://arxiv.org/abs/2102.05888", + "datePublished": "2012-10-13", + "dateModified": "2024-04-17", + "version": "2.9", + "releaseNotes": "https://github.com/the-virtual-brain/tvb-root/releases/tag/2.9.0", + "description": "Access the TVB GUI from the Internet and simulate brain network models on HCP. TheVirtualBrain is a framework for the simulation of the dynamics of large-scale brain networks with biologically realistic connectivity. TheVirtualBrain uses tractographic data (DTI/DSI) to generate connectivity matrices and build cortical and subcortical brain networks. The connectivity matrix defines the connection strengths and time delays via signal transmission between all network nodes. Various neural mass models are available in the repertoire of TheVirtualBrain and define the dynamics of a network node. Together, the neural mass models at the network nodes and the connectivity matrix define the Virtual Brain. TheVirtualBrain simulates and generates the time courses of various forms of neural activity including Local Field Potentials (LFP) and firing rate, as well as brain imaging data such as EEG, MEG and BOLD activations as observed in fMRI.\n\nTheVirtualBrain is foremost a scientific simulation platform and provides all means necessary to generate, manipulate and visualize connectivity and network dynamics. In addition, TheVirtualBrain comprises a set of classical time series analysis tools, structural and functional connectivity analysis tools, as well as parameter exploration facilities.\n\nAn overview over TVB-on-EBRAINS services is provided in the preprint https://arxiv.org/abs/2102.05888\n\nVersion specification\nhttps://github.com/the-virtual-brain/tvb-root/blob/master/tvbdocumentation/RELEASENOTES", + "funding": "785907 (Human Brain Project SGA2), 945539 (Human Brain Project SGA3), 826421 (VirtualBrainCloud) and 101147319 (EBRAINS 2.0 Project)", + "funder": { + "type": "Organization", + "name": "EU" + }, + "keywords": [ + "virtual", + "brain", + "tvb", + "whole-brain", + "simulation", + "modelling" + ], + "operatingSystem": [ + "Windows", + "MacOS", + "Linux" + ], + "programmingLanguage": "Python", + "developmentStatus": "active", "author": [ { "id": "https://search.kg.ebrains.eu/instances/7dcbd8d3-2b6d-4f32-9e1e-dd83887324c4", @@ -53,31 +84,5 @@ "familyName": "Ritter", "givenName": "Petra" } - ], - "codeRepository": "https://github.com/the-virtual-brain/tvb-root/", - "dateModified": "2023-09-19", - "datePublished": "2012-10-13", - "description": "Access the TVB GUI from the Internet and simulate brain network models on HCP. TheVirtualBrain is a framework for the simulation of the dynamics of large-scale brain networks with biologically realistic connectivity. TheVirtualBrain uses tractographic data (DTI/DSI) to generate connectivity matrices and build cortical and subcortical brain networks. The connectivity matrix defines the connection strengths and time delays via signal transmission between all network nodes. Various neural mass models are available in the repertoire of TheVirtualBrain and define the dynamics of a network node. Together, the neural mass models at the network nodes and the connectivity matrix define the Virtual Brain. TheVirtualBrain simulates and generates the time courses of various forms of neural activity including Local Field Potentials (LFP) and firing rate, as well as brain imaging data such as EEG, MEG and BOLD activations as observed in fMRI.\n\nTheVirtualBrain is foremost a scientific simulation platform and provides all means necessary to generate, manipulate and visualize connectivity and network dynamics. In addition, TheVirtualBrain comprises a set of classical time series analysis tools, structural and functional connectivity analysis tools, as well as parameter exploration facilities.\n\nAn overview over TVB-on-EBRAINS services is provided in the preprint https://arxiv.org/abs/2102.05888\n\nVersion specification\nhttps://github.com/the-virtual-brain/tvb-root/blob/master/tvbdocumentation/RELEASENOTES", - "downloadUrl": "https://github.com/the-virtual-brain/tvb-root/", - "funder": { - "type": "Organization", - "name": "EU" - }, - "keywords": [ - "virtual", - "brain" - ], - "license": "https://spdx.org/licenses/GPL-3.0+", - "name": "The Virtual Brain Web-App", - "operatingSystem": [ - "Windows", - "MacOS", - "Linux" - ], - "programmingLanguage": "Python", - "version": "2.8.2", - "contIntegration": "https://github.com/the-virtual-brain/tvb-root/", - "developmentStatus": "active", - "funding": "785907 (Human Brain Project SGA2), 945539 (Human Brain Project SGA3) and VirtualBrainCloud 826421", - "referencePublication": "https://arxiv.org/abs/2102.05888" + ] } \ No newline at end of file diff --git a/tvb_framework/tvb/interfaces/web/controllers/about/__init__.py b/tvb_framework/tvb/interfaces/web/controllers/about/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tvb_framework/tvb/interfaces/web/controllers/about_controller.py b/tvb_framework/tvb/interfaces/web/controllers/about/about_controller.py similarity index 86% rename from tvb_framework/tvb/interfaces/web/controllers/about_controller.py rename to tvb_framework/tvb/interfaces/web/controllers/about/about_controller.py index ddbe46c427..1745df7485 100644 --- a/tvb_framework/tvb/interfaces/web/controllers/about_controller.py +++ b/tvb_framework/tvb/interfaces/web/controllers/about/about_controller.py @@ -28,20 +28,17 @@ .. moduleauthor:: Adrian Ciu """ -import cherrypy +import os import json +import cherrypy from tvb.interfaces.web.controllers.base_controller import BaseController -import os class AboutController(BaseController): - # def __init__(self): - # super().__init__() - # # For testing. The symlink will be done in the docker file - # os.symlink('../../../../../codemeta.json', '../codemeta.json') + SERVICE_META_FILE = os.path.join(os.path.dirname(__file__), 'servicemeta.json') @cherrypy.expose def about(self): - with open('./codemeta.json', 'r') as f: + with open(self.SERVICE_META_FILE, 'r') as f: data = json.load(f) return json.dumps(data) diff --git a/tvb_framework/tvb/interfaces/web/codemeta.json b/tvb_framework/tvb/interfaces/web/controllers/about/servicemeta.json similarity index 83% rename from tvb_framework/tvb/interfaces/web/codemeta.json rename to tvb_framework/tvb/interfaces/web/controllers/about/servicemeta.json index 7bb89018b4..c9b7f0e793 100644 --- a/tvb_framework/tvb/interfaces/web/codemeta.json +++ b/tvb_framework/tvb/interfaces/web/controllers/about/servicemeta.json @@ -1,7 +1,38 @@ { - "@context": "https://doi.org/10.5063/schema/codemeta-2.0", - "type": "SoftwareSourceCode", - "applicationCategory": "application", + "@context": "https://gitlab.ebrains.eu/lauramble/servicemeta/-/raw/main/data/contexts/servicemeta.jsonld", + "type": "WebApplication", + "name": "The Virtual Brain Web-App", + "license": "https://spdx.org/licenses/GPL-3.0+", + "codeRepository": "https://github.com/the-virtual-brain/tvb-root/", + "documentation": "https://docs.thevirtualbrain.org/", + "downloadUrl": "https://www.thevirtualbrain.org/tvb/zwei/brainsimulator-software", + "url": "https://tvb.apps.ebrains.eu/", + "referencePublication": "https://arxiv.org/abs/2102.05888", + "datePublished": "2012-10-13", + "dateModified": "2024-04-17", + "version": "2.9", + "releaseNotes": "https://github.com/the-virtual-brain/tvb-root/releases/tag/2.9.0", + "description": "Access the TVB GUI from the Internet and simulate brain network models on HCP. TheVirtualBrain is a framework for the simulation of the dynamics of large-scale brain networks with biologically realistic connectivity. TheVirtualBrain uses tractographic data (DTI/DSI) to generate connectivity matrices and build cortical and subcortical brain networks. The connectivity matrix defines the connection strengths and time delays via signal transmission between all network nodes. Various neural mass models are available in the repertoire of TheVirtualBrain and define the dynamics of a network node. Together, the neural mass models at the network nodes and the connectivity matrix define the Virtual Brain. TheVirtualBrain simulates and generates the time courses of various forms of neural activity including Local Field Potentials (LFP) and firing rate, as well as brain imaging data such as EEG, MEG and BOLD activations as observed in fMRI.\n\nTheVirtualBrain is foremost a scientific simulation platform and provides all means necessary to generate, manipulate and visualize connectivity and network dynamics. In addition, TheVirtualBrain comprises a set of classical time series analysis tools, structural and functional connectivity analysis tools, as well as parameter exploration facilities.\n\nAn overview over TVB-on-EBRAINS services is provided in the preprint https://arxiv.org/abs/2102.05888\n\nVersion specification\nhttps://github.com/the-virtual-brain/tvb-root/blob/master/tvbdocumentation/RELEASENOTES", + "funding": "785907 (Human Brain Project SGA2), 945539 (Human Brain Project SGA3), 826421 (VirtualBrainCloud) and 101147319 (EBRAINS 2.0 Project)", + "funder": { + "type": "Organization", + "name": "EU" + }, + "keywords": [ + "virtual", + "brain", + "tvb", + "whole-brain", + "simulation", + "modelling" + ], + "operatingSystem": [ + "Windows", + "MacOS", + "Linux" + ], + "programmingLanguage": "Python", + "developmentStatus": "active", "author": [ { "id": "https://search.kg.ebrains.eu/instances/7dcbd8d3-2b6d-4f32-9e1e-dd83887324c4", @@ -53,31 +84,5 @@ "familyName": "Ritter", "givenName": "Petra" } - ], - "codeRepository": "https://github.com/the-virtual-brain/tvb-root/", - "dateModified": "2023-09-19", - "datePublished": "2012-10-13", - "description": "Access the TVB GUI from the Internet and simulate brain network models on HCP. TheVirtualBrain is a framework for the simulation of the dynamics of large-scale brain networks with biologically realistic connectivity. TheVirtualBrain uses tractographic data (DTI/DSI) to generate connectivity matrices and build cortical and subcortical brain networks. The connectivity matrix defines the connection strengths and time delays via signal transmission between all network nodes. Various neural mass models are available in the repertoire of TheVirtualBrain and define the dynamics of a network node. Together, the neural mass models at the network nodes and the connectivity matrix define the Virtual Brain. TheVirtualBrain simulates and generates the time courses of various forms of neural activity including Local Field Potentials (LFP) and firing rate, as well as brain imaging data such as EEG, MEG and BOLD activations as observed in fMRI.\n\nTheVirtualBrain is foremost a scientific simulation platform and provides all means necessary to generate, manipulate and visualize connectivity and network dynamics. In addition, TheVirtualBrain comprises a set of classical time series analysis tools, structural and functional connectivity analysis tools, as well as parameter exploration facilities.\n\nAn overview over TVB-on-EBRAINS services is provided in the preprint https://arxiv.org/abs/2102.05888\n\nVersion specification\nhttps://github.com/the-virtual-brain/tvb-root/blob/master/tvbdocumentation/RELEASENOTES", - "downloadUrl": "https://github.com/the-virtual-brain/tvb-root/", - "funder": { - "type": "Organization", - "name": "EU" - }, - "keywords": [ - "virtual", - "brain" - ], - "license": "https://spdx.org/licenses/GPL-3.0+", - "name": "The Virtual Brain Web-App", - "operatingSystem": [ - "Windows", - "MacOS", - "Linux" - ], - "programmingLanguage": "Python", - "version": "2.8.2", - "contIntegration": "https://github.com/the-virtual-brain/tvb-root/", - "developmentStatus": "active", - "funding": "785907 (Human Brain Project SGA2), 945539 (Human Brain Project SGA3) and VirtualBrainCloud 826421", - "referencePublication": "https://arxiv.org/abs/2102.05888" + ] } \ No newline at end of file diff --git a/tvb_framework/tvb/interfaces/web/run.py b/tvb_framework/tvb/interfaces/web/run.py index 56f5e74f5d..87ef07f562 100644 --- a/tvb_framework/tvb/interfaces/web/run.py +++ b/tvb_framework/tvb/interfaces/web/run.py @@ -31,8 +31,6 @@ """ import time -from tvb.interfaces.web.controllers.about_controller import AboutController - STARTUP_TIC = time.time() import os @@ -50,6 +48,7 @@ from tvb.core.services.exceptions import InvalidSettingsException from tvb.core.services.hpc_operation_service import HPCOperationService from tvb.core.services.backend_clients.standalone_client import StandAloneClient +from tvb.interfaces.web.controllers.about.about_controller import AboutController from tvb.interfaces.web.controllers.base_controller import BaseController from tvb.interfaces.web.controllers.burst.dynamic_model_controller import DynamicModelController from tvb.interfaces.web.controllers.burst.exploration_controller import ParameterExplorationController From 0356455e4a61e99b38dba083479f7203ec83f5a3 Mon Sep 17 00:00:00 2001 From: liadomide Date: Tue, 18 Jun 2024 22:53:33 +0300 Subject: [PATCH 3/3] EBR-30 Move the about under the landing page --- .../web/controllers/about/__init__.py | 0 .../web/controllers/about/about_controller.py | 44 ------------------- tvb_framework/tvb/interfaces/web/run.py | 3 +- .../tvb/interfaces/web/run_landing_page.py | 8 ++++ .../{controllers/about => }/servicemeta.json | 0 5 files changed, 9 insertions(+), 46 deletions(-) delete mode 100644 tvb_framework/tvb/interfaces/web/controllers/about/__init__.py delete mode 100644 tvb_framework/tvb/interfaces/web/controllers/about/about_controller.py rename tvb_framework/tvb/interfaces/web/{controllers/about => }/servicemeta.json (100%) diff --git a/tvb_framework/tvb/interfaces/web/controllers/about/__init__.py b/tvb_framework/tvb/interfaces/web/controllers/about/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tvb_framework/tvb/interfaces/web/controllers/about/about_controller.py b/tvb_framework/tvb/interfaces/web/controllers/about/about_controller.py deleted file mode 100644 index 1745df7485..0000000000 --- a/tvb_framework/tvb/interfaces/web/controllers/about/about_controller.py +++ /dev/null @@ -1,44 +0,0 @@ -# -*- coding: utf-8 -*- -# -# -# TheVirtualBrain-Framework Package. This package holds all Data Management, and -# Web-UI helpful to run brain-simulations. To use it, you also need to download -# TheVirtualBrain-Scientific Package (for simulators). See content of the -# documentation-folder for more details. See also http://www.thevirtualbrain.org -# -# (c) 2012-2023, Baycrest Centre for Geriatric Care ("Baycrest") and others -# -# This program is free software: you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software Foundation, -# either version 3 of the License, or (at your option) any later version. -# This program is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License for more details. -# You should have received a copy of the GNU General Public License along with this -# program. If not, see . -# -# -# CITATION: -# When using The Virtual Brain for scientific publications, please cite it as explained here: -# https://www.thevirtualbrain.org/tvb/zwei/neuroscience-publications -# -# - -""" -.. moduleauthor:: Adrian Ciu -""" - -import os -import json -import cherrypy -from tvb.interfaces.web.controllers.base_controller import BaseController - - -class AboutController(BaseController): - SERVICE_META_FILE = os.path.join(os.path.dirname(__file__), 'servicemeta.json') - - @cherrypy.expose - def about(self): - with open(self.SERVICE_META_FILE, 'r') as f: - data = json.load(f) - return json.dumps(data) diff --git a/tvb_framework/tvb/interfaces/web/run.py b/tvb_framework/tvb/interfaces/web/run.py index 87ef07f562..5f34eae18d 100644 --- a/tvb_framework/tvb/interfaces/web/run.py +++ b/tvb_framework/tvb/interfaces/web/run.py @@ -31,6 +31,7 @@ """ import time + STARTUP_TIC = time.time() import os @@ -48,7 +49,6 @@ from tvb.core.services.exceptions import InvalidSettingsException from tvb.core.services.hpc_operation_service import HPCOperationService from tvb.core.services.backend_clients.standalone_client import StandAloneClient -from tvb.interfaces.web.controllers.about.about_controller import AboutController from tvb.interfaces.web.controllers.base_controller import BaseController from tvb.interfaces.web.controllers.burst.dynamic_model_controller import DynamicModelController from tvb.interfaces.web.controllers.burst.exploration_controller import ParameterExplorationController @@ -162,7 +162,6 @@ def init_cherrypy(arguments=None): cherrypy.tree.mount(TransferVectorController(), TransferVectorController.build_path("/burst/transfer/"), config=CONFIGUER) cherrypy.tree.mount(HPCController(), BaseController.build_path("/hpc/"), config=CONFIGUER) cherrypy.tree.mount(KubeController(), BaseController.build_path("/kube/"), config=CONFIGUER) - cherrypy.tree.mount(AboutController(), BaseController.build_path("/"), config=CONFIGUER) cherrypy.config.update(CONFIGUER) diff --git a/tvb_framework/tvb/interfaces/web/run_landing_page.py b/tvb_framework/tvb/interfaces/web/run_landing_page.py index edde92f486..65cb2ccd8e 100644 --- a/tvb_framework/tvb/interfaces/web/run_landing_page.py +++ b/tvb_framework/tvb/interfaces/web/run_landing_page.py @@ -32,6 +32,7 @@ """ import os +import json from flask import Flask, render_template from gevent.pywsgi import WSGIServer from tvb.basic.logger.builder import get_logger @@ -91,6 +92,13 @@ def parse_config_file(file_name=os.path.expanduser("~/.tvb.landing.page.configur def index(): return render_template('landing.html', apps=REDIRECT_OPTIONS) +@app.route('/about') +def about(): + SERVICE_META_FILE = os.path.join(os.path.dirname(__file__), 'servicemeta.json') + with open(SERVICE_META_FILE, 'r') as f: + data = json.load(f) + return json.dumps(data) + if __name__ == '__main__': REDIRECT_OPTIONS = parse_config_file() diff --git a/tvb_framework/tvb/interfaces/web/controllers/about/servicemeta.json b/tvb_framework/tvb/interfaces/web/servicemeta.json similarity index 100% rename from tvb_framework/tvb/interfaces/web/controllers/about/servicemeta.json rename to tvb_framework/tvb/interfaces/web/servicemeta.json