From 8af0714192302a4fe87fc5acf8580ca57f1c43f7 Mon Sep 17 00:00:00 2001 From: adrianciu Date: Wed, 13 Nov 2024 19:01:29 +0200 Subject: [PATCH] TVB-3109 created pyproject.toml for tvb packages --- tvb_build/setup.py | 40 ----- tvb_contrib/pyproject.toml | 75 ++++++++++ tvb_contrib/setup.py | 51 ------- tvb_deprecated/README.rst | 129 ++++++++++++++++ tvb_deprecated/setup.py | 59 -------- tvb_framework/pyproject_bids_monitor.toml | 88 +++++++++++ tvb_framework/pyproject_rest_client.toml | 106 ++++++++++++++ tvb_framework/setup.py | 82 ----------- tvb_framework/setup_bids_monitor.py | 70 --------- tvb_framework/setup_rest_client.py | 71 --------- tvb_framework/tmp/pyproject.toml | 138 ++++++++++++++++++ tvb_library/pyproject.toml | 109 ++++++++++++++ tvb_library/setup.py | 73 --------- .../setup.py => tvb_storage/pyproject.toml | 72 +++++++-- tvb_storage/setup.py | 65 --------- 15 files changed, 705 insertions(+), 523 deletions(-) delete mode 100644 tvb_build/setup.py create mode 100644 tvb_contrib/pyproject.toml delete mode 100644 tvb_contrib/setup.py create mode 100644 tvb_deprecated/README.rst delete mode 100644 tvb_deprecated/setup.py create mode 100644 tvb_framework/pyproject_bids_monitor.toml create mode 100644 tvb_framework/pyproject_rest_client.toml delete mode 100644 tvb_framework/setup.py delete mode 100644 tvb_framework/setup_bids_monitor.py delete mode 100644 tvb_framework/setup_rest_client.py create mode 100644 tvb_framework/tmp/pyproject.toml create mode 100644 tvb_library/pyproject.toml delete mode 100644 tvb_library/setup.py rename tvb_bin/setup.py => tvb_storage/pyproject.toml (54%) delete mode 100644 tvb_storage/setup.py diff --git a/tvb_build/setup.py b/tvb_build/setup.py deleted file mode 100644 index 864c07a644..0000000000 --- a/tvb_build/setup.py +++ /dev/null @@ -1,40 +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-2024, 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 -# -# - -import shutil -from setuptools import setup, find_packages - - -setup( - name='tvb_build', - packages=find_packages(), - version="2.0", - license="GPL-3.0-or-later", - author="TVB Team", - install_requires=['tvb-library', 'tvb-framework', 'tvb-data'] -) - -shutil.rmtree('tvb_build.egg-info', True) \ No newline at end of file diff --git a/tvb_contrib/pyproject.toml b/tvb_contrib/pyproject.toml new file mode 100644 index 0000000000..2fd2ecd7ca --- /dev/null +++ b/tvb_contrib/pyproject.toml @@ -0,0 +1,75 @@ +# -*- coding: utf-8 -*- +# +# +# TheVirtualBrain-Contributors Package. This package holds simulator extensions. +# See also http://www.thevirtualbrain.org +# +# (c) 2012-2024, 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 +# +# + + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "tvb-contrib" +version = "2.9.2" +description = "A package with TVB contributed additions to the simulator, useful for scripting." +readme = "README.rst" +license = { file = "LICENSE" } +authors = [ + { name = "Stuart Knock" }, + { name = "Dionysios Perdikis" }, + { name = "Paula Sanz Leon" }, + { name = "Bogdan Valean" }, + { name = "Marmaduke Woodman" }, + { name = "Michiel van der Vlag" }, +] +maintainers = [ + { name = "Codemart", email = "tvb.admin@thevirtualbrain.org" } +] +keywords = [ + "brain", + "contrib", + "neuroscience", + "simulator", + "tvb", +] +dependencies = [ + "lxml", + "pylems", + "scikit-learn", + "tvb-library", + "xarray", +] + +[project.urls] +Download = "https://github.com/the-virtual-brain/tvb-root" +Homepage = "https://www.thevirtualbrain.org" + +[tool.hatch.version] +path = "tvb/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/tvb", +] + +[tool.hatch.build.targets.wheel] +packages = ["tvb"] diff --git a/tvb_contrib/setup.py b/tvb_contrib/setup.py deleted file mode 100644 index 4f364f974e..0000000000 --- a/tvb_contrib/setup.py +++ /dev/null @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- -# -# -# TheVirtualBrain-Contributors Package. This package holds simulator extensions. -# See also http://www.thevirtualbrain.org -# -# (c) 2012-2024, 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 -# -# - -import os -import shutil -import setuptools - -CONTRIB_VERSION = "2.9.2" -CONTRIB_DEPENDENCIES = ["tvb-library", "xarray", "scikit-learn", "lxml", "pylems"] -TEAM = "Stuart Knock, Dionysios Perdikis, Paula Sanz Leon, Bogdan Valean, Marmaduke Woodman, Michiel van der Vlag" - -with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as fd: - DESCRIPTION = fd.read() - -setuptools.setup(name='tvb-contrib', - version=CONTRIB_VERSION, - packages=setuptools.find_packages(), - include_package_data=True, - install_requires=CONTRIB_DEPENDENCIES, - description='A package with TVB contributed additions to the simulator, useful for scripting.', - long_description=DESCRIPTION, - long_description_content_type="text/x-rst", - license="GPL-3.0-or-later", - author=TEAM, - author_email='tvb.admin@thevirtualbrain.org', - url='https://www.thevirtualbrain.org', - download_url='https://github.com/the-virtual-brain/tvb-root', - keywords='tvb brain simulator neuroscience contrib') - -shutil.rmtree('tvb_contrib.egg-info', True) diff --git a/tvb_deprecated/README.rst b/tvb_deprecated/README.rst new file mode 100644 index 0000000000..197bd5d616 --- /dev/null +++ b/tvb_deprecated/README.rst @@ -0,0 +1,129 @@ +THE VIRTUAL BRAIN SCIENTIFIC LIBRARY +==================================== + +The Virtual Brain Project (TVB Project) has the purpose of offering some +modern tools to the Neurosciences community, for computing, simulating +and analyzing functional and structural data of human brains. + +"TVB Scientific Library" is the most important scientific contribution +of TVB Project, but only a part of our code. In order to use this TVB +Python Library (modify/run/test), you are advised to follow the steps +described here: +http://docs.thevirtualbrain.com/manuals/ContributorsManual/ContributorsManual.html#contributors-manual + +The interaction with TVB source code is recommended for advanced users +only, for which the concepts proposed by TVB are known and understood, +and which also have some programming knowledge. + +"TVB Scientific Library" comes in two major forms for code-contributors: +as a light-weight Python library, or plugged into TVB framework +(including Web interface and Persistence of data layers). Depending on +your needs and resources, you could use any of the two available options +for contributing and testing new code. + +"TVB Scientific Library" is a light-weight, stand-alone Python library +that contains all the needed packages in order to run simulations and +analysis on data without the need for the entire TVB Framework. This +implies that no storage will be provided so data from each session will +be lost on close. You need to either persist it yourself in some manner +or use the full TVBFramework where HDF5 / database storage is provided +as default. + +For more details, check: http://www.thevirtualbrain.org/ + +"TVB Scientific Library" contains the following packages: basic, +datatypes, simulator and analyzers. The dependencies between these +packages can be seen in tvb-package-diagram.jpg . Following is a short +description of each of these packages: + +- tvb.basic + +This package is the base of TVB and holds sub-packages that are used by +most of the other packages like logging, global settings and the TVB +traits package. You should rarely (if at all) need to change code in +this package, and should know exactly what you are doing before +attempting to change anything from here. + +- tvb.datatypes + +The simulator and analyzers packages (as well as uploaders and +visualizers in TVB Framework) will need to have a common "language" in +order to work with the same data. In TVB architecture, that "common +language" is represented by Data Types. TVB Data Types declarations are +located in this package. + +- tvb.simulator + +The Simulation Component is the most important component in The Virtual +Brain solution, as it is the component responsible for all the +scientific computation related to brain models and data. + +You can find various demos of using the simulator here: +http://docs.thevirtualbrain.org/demos/Demos.html . + +- tvb.analyzers + +Holds modules that can run various analysis of data resulted from the +simulator. TVB is not strong in +doing data analysis, we barely have a minimum set of analyzers for +immediate needs. + +NOTE: + +To contribute to this repo, you are advised to first fork it under +GitHub (through the web ui), and next clone that fork on your machine, +and use it as you use any other git repository. + +Testing +======= + +For testing the package, the `Pytest `_ +framework is used. Pytest can be installed using pip. + +Pytest will run all files in the current directory and its subdirectories +of the form test_*.py or \*_test.py. +More generally, it follows `standard test discovery rules +`_ + +The command for running our tests has two forms. +Recommendation when working with a git clone of tvb-library:: + + cd [folder_where_tvb_library_is] + pytest tvb/test [--junitxml=path] + +The second alternative form of running TVB tests, when installing TVB from Pypi, is:: + + pip install -U tvb-library + pytest --pyargs tvb.tests.library + + +Coverage +-------- + +A coverage report can be generated with:: + + pip install pytest-cov + cd [folder_where_tvb_library_is] + py.test --cov-config .coveragerc --cov=tvb tvb/tests/ --cov-branch --cov-report xml:[file_where_xml_will_be_generated] + + +Further Resources +================= + +- For issue tracking we are using Jira: http://req.thevirtualbrain.org +- For API documentation and live demos, have a look here: + http://docs.thevirtualbrain.org +- A public mailing list for users of The Virtual Brain can be joined + and followed using: tvb-users@googlegroups.com +- Raw demo IPython Notebooks can be found under: + https://github.com/the-virtual-brain/tvb-root/tree/master/tvb_documentation/demos + + +Acknowledgments +=============== +This project has received funding from the European Union’s Horizon 2020 Framework Programme for Research and +Innovation under the Specific Grant Agreement Nos. 785907 (Human Brain Project SGA2), 945539 (Human Brain Project SGA3) +and VirtualBrainCloud 826421. + +This project has received funding from the European Union’s Horizon Europe Programme under the Specific Grant +Agreement No. 101147319 (EBRAINS 2.0 Project). \ No newline at end of file diff --git a/tvb_deprecated/setup.py b/tvb_deprecated/setup.py deleted file mode 100644 index 4263b1bb19..0000000000 --- a/tvb_deprecated/setup.py +++ /dev/null @@ -1,59 +0,0 @@ -# -*- coding: utf-8 -*- -# -# -# TheVirtualBrain-Scientific Package. This package holds all simulators, and -# analysers necessary to run brain-simulations. You can use it stand alone or -# in conjunction with TheVirtualBrain-Framework Package. See content of the -# documentation-folder for more details. See also http://www.thevirtualbrain.org -# -# (c) 2012-2024, 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 -# -# - -import os -import shutil -from setuptools import setup - -TVB_TEAM = "Marmaduke Woodman, Jan Fousek, Stuart Knock, Paula Sanz Leon, Viktor Jirsa" - -# Package README from under tvb_library -with open(os.path.join(os.path.dirname(os.path.dirname(__file__)), "tvb_library", 'README.rst')) as fd: - DESCRIPTION = fd.read() - -# This namespace is only redirecting to tvb-library -setup(name="tvb", - version="2.0.0", - install_requires=["tvb-library"], - description='This namespace is only redirecting to tvb-library', - long_description=DESCRIPTION, - long_description_content_type="text/x-rst", - license="GPL-3.0-or-later", - author=TVB_TEAM, - author_email='tvb.admin@thevirtualbrain.org', - url='https://www.thevirtualbrain.org', - download_url='https://github.com/the-virtual-brain/tvb-root', - keywords='tvb brain simulator neuroscience human animal neuronal dynamics models delay', - classifiers=["Development Status :: 6 - Mature", - "Intended Audience :: Science/Research", - "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", - "Programming Language :: Python :: 3" - ] - ) - -# Cleanup -shutil.rmtree('tvb.egg-info', True) -shutil.rmtree('build', True) diff --git a/tvb_framework/pyproject_bids_monitor.toml b/tvb_framework/pyproject_bids_monitor.toml new file mode 100644 index 0000000000..d4ebaffa0c --- /dev/null +++ b/tvb_framework/pyproject_bids_monitor.toml @@ -0,0 +1,88 @@ +# -*- 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-2024, 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 +# +# + + + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "tvb-bids-monitor" +version = "2.9.2" +description = "A helper package containing BIDS directory monitor module" +readme = "README.rst" +license = { file = "LICENSE" } +authors = [ + { name = "Akash Upadhyay" }, + { name = "Paula Prodan" }, +] +maintainers = [ + { name = "Codemart", email = "tvb.admin@thevirtualbrain.org" } +] +keywords = [ + "animal", + "brain", + "client", + "delay", + "dynamics", + "human", + "models", + "neuronal", + "neuroscience", + "rest", + "simulator", + "tvb", +] +dependencies = [ + "tvb-rest-client", + "watchdog", +] + +[project.optional-dependencies] +test = [ + "pytest", + "pytest-benchmark", +] + +[project.urls] +Download = "https://github.com/the-virtual-brain/tvb-root" +Homepage = "https://www.thevirtualbrain.org" + +[tool.hatch.version] +path = "tvb/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/tvb", +] +exclude = ['tvb.interfaces.web', 'tvb.interfaces.web.*', 'tvb.interfaces.command', + 'tvb.interfaces.command.*', 'tvb.tests', 'tvb.tests.*', 'tvb.interfaces.rest', + 'tvb.interfaces.rest.*', 'tvb.adapters', 'tvb.adapters.*', 'tvb.core', + 'tvb.core.*'] + +[tool.hatch.build.targets.wheel] +packages = ["tvb"] \ No newline at end of file diff --git a/tvb_framework/pyproject_rest_client.toml b/tvb_framework/pyproject_rest_client.toml new file mode 100644 index 0000000000..88b5b3c69d --- /dev/null +++ b/tvb_framework/pyproject_rest_client.toml @@ -0,0 +1,106 @@ +# -*- 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-2024, 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 +# +# + + + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "tvb-rest-client" +version = "2.9.2" +description = "A helper package for preparing and sending requests towards the TVB REST API" +readme = "README.rst" +license = { file = "LICENSE" } +authors = [ + { name = "Lia Domide"}, + { name = "Paula Prodan" }, + { name = "Bogdan Valean" }, + { name = "Robert Vincze" }, +] +maintainers = [ + { name = "Codemart", email = "tvb.admin@thevirtualbrain.org" } +] +keywords = [ + "animal", + "brain", + "client", + "delay", + "dynamics", + "human", + "models", + "neuronal", + "neuroscience", + "rest", + "simulator", + "tvb", +] +dependencies = [ + "alembic", + "h5py", + "nibabel", + "numpy", + "Pillow", + "psutil", + "pyAesCrypt", + "requests", + "scipy", + "simplejson", + "sqlalchemy", + "tvb-data", + "tvb-gdist", + "tvb-library", + "tvb-storage", + "werkzeug", +] + +[project.optional-dependencies] +postgres = [ + "psycopg2", +] +test = [ + "pytest", + "pytest-benchmark", +] + +[project.urls] +Download = "https://github.com/the-virtual-brain/tvb-root" +Homepage = "https://www.thevirtualbrain.org" + +[tool.hatch.version] +path = "tvb/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/tvb", +] +exclude = ['tvb.interfaces.web', 'tvb.interfaces.web.*', 'tvb.interfaces.command', + 'tvb.interfaces.command.*', 'tvb.tests', 'tvb.tests.*'] + +[tool.hatch.build.targets.wheel] +packages = ["tvb"] + diff --git a/tvb_framework/setup.py b/tvb_framework/setup.py deleted file mode 100644 index f6b51e0c05..0000000000 --- a/tvb_framework/setup.py +++ /dev/null @@ -1,82 +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-2024, 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 -# -# - -""" -Install TVB Framework package for developers. - -Execute: - python setup.py install/develop - -""" - -import os -import shutil -import setuptools - -VERSION = "2.9.2" - -TVB_TEAM = "Mihai Andrei, Lia Domide, Stuart Knock, Bogdan Neacsa, Paula Prodan, Paula Sansz Leon, Marmaduke Woodman" - -TVB_INSTALL_REQUIREMENTS = ["alembic", "bctpy", "cherrypy", "docutils", "flask", "flask-restx", - "formencode", "gevent", "h5py", "Jinja2", "matplotlib", "nibabel", "numpy<2.0", "pandas", - "Pillow", "psutil", "python-keycloak", "requests", "requests-toolbelt>=0.10", - "scikit-learn", "scipy", "siibra", "simplejson", "six", "sqlalchemy", - "tvb-data", "tvb-gdist", "tvb-library", "tvb-storage", "werkzeug"] - -# Packaging tvb-framework with REST server inside -with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as fd: - DESCRIPTION = fd.read() - -setuptools.setup(name="tvb-framework", - version=VERSION, - packages=setuptools.find_packages( - exclude=[ - 'tvb.interfaces.rest.bids_monitor', 'tvb.interfaces.rest.bids_monitor.*', - 'tvb.interfaces.rest.client', 'tvb.interfaces.rest.client.*']), - include_package_data=True, - install_requires=TVB_INSTALL_REQUIREMENTS, - extras_require={'postgres': ["psycopg2"], - 'hpc': ["pyunicore", "elasticsearch"], - 'extra': ["allensdk"], - 'test': ["pytest", "pytest-benchmark", "pytest-mock", "BeautifulSoup4"]}, - description='A package for performing whole brain simulations', - long_description=DESCRIPTION, - long_description_content_type="text/x-rst", - license="GPL-3.0-or-later", - author=TVB_TEAM, - author_email='tvb.admin@thevirtualbrain.org', - url='https://www.thevirtualbrain.org', - download_url='https://github.com/the-virtual-brain/tvb-root', - keywords='tvb brain simulator neuroscience human animal neuronal dynamics models delay', - classifiers=["Development Status :: 6 - Mature", - "Intended Audience :: Science/Research", - "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", - "Programming Language :: Python :: 3" - ] - ) - -# Clean after install -shutil.rmtree('tvb_framework.egg-info', True) diff --git a/tvb_framework/setup_bids_monitor.py b/tvb_framework/setup_bids_monitor.py deleted file mode 100644 index 38760c67d3..0000000000 --- a/tvb_framework/setup_bids_monitor.py +++ /dev/null @@ -1,70 +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-2024, 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 -# -# - -""" -This is used to package the BIDS directory monitor separately. -""" - -import os -import shutil - -import setuptools -from setuptools.command.egg_info import manifest_maker - -manifest_maker.template = 'MANIFEST_bids_monitor.in' - -VERSION = "2.9.2" - -TVB_TEAM = "Akash Upadhyay, Paula Prodan" - -TVB_INSTALL_REQUIREMENTS = ["tvb-rest-client", "watchdog"] - -# Packaging bids-monitor -with open(os.path.join(os.path.dirname(__file__), 'README_bids_monitor.rst')) as fd: - DESCRIPTION = fd.read() - -setuptools.setup(name="tvb-bids-monitor", - version=VERSION, - packages=setuptools.find_packages( - exclude=['tvb.interfaces.web', 'tvb.interfaces.web.*', 'tvb.interfaces.command', - 'tvb.interfaces.command.*', 'tvb.tests', 'tvb.tests.*', 'tvb.interfaces.rest', - 'tvb.interfaces.rest.*', 'tvb.adapters', 'tvb.adapters.*', 'tvb.core', - 'tvb.core.*']), - include_package_data=True, - install_requires=TVB_INSTALL_REQUIREMENTS, - extras_require={'test': ["pytest", "pytest-benchmark"]}, - description='A helper package containing BIDS directory monitor module', - long_description=DESCRIPTION, - long_description_content_type="text/x-rst", - license="GPL-3.0-or-later", - author=TVB_TEAM, - author_email='tvb.admin@thevirtualbrain.org', - url='https://www.thevirtualbrain.org', - download_url='https://github.com/the-virtual-brain/tvb-root', - keywords='tvb rest client brain simulator neuroscience human animal neuronal dynamics models delay') - -# Clean after install -shutil.rmtree('tvb_bids_monitor.egg-info', True) diff --git a/tvb_framework/setup_rest_client.py b/tvb_framework/setup_rest_client.py deleted file mode 100644 index 9439f80e5f..0000000000 --- a/tvb_framework/setup_rest_client.py +++ /dev/null @@ -1,71 +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-2024, 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 -# -# - -""" -This is used to package the tvb-rest-client separately. -""" - -import os -import shutil - -import setuptools -from setuptools.command.egg_info import manifest_maker - -manifest_maker.template = 'MANIFEST_rest_client.in' - -VERSION = "2.9.2" - -TVB_TEAM = "Lia Domide, Paula Prodan, Bogdan Valean, Robert Vincze" - -TVB_INSTALL_REQUIREMENTS = ["alembic", "h5py", "nibabel", "numpy", "Pillow", "psutil", - "pyAesCrypt", "requests", "scipy", "simplejson", "sqlalchemy", - "tvb-data", "tvb-gdist", "tvb-library", "tvb-storage", "werkzeug"] - -# Packaging tvb-rest-client -with open(os.path.join(os.path.dirname(__file__), 'README_rest_client.rst')) as fd: - DESCRIPTION = fd.read() - -setuptools.setup(name="tvb-rest-client", - version=VERSION, - packages=setuptools.find_packages( - exclude=['tvb.interfaces.web', 'tvb.interfaces.web.*', 'tvb.interfaces.command', - 'tvb.interfaces.command.*', 'tvb.tests', 'tvb.tests.*']), - include_package_data=True, - install_requires=TVB_INSTALL_REQUIREMENTS, - extras_require={'postgres': ["psycopg2"], - 'test': ["pytest", "pytest-benchmark"]}, - description='A helper package for preparing and sending requests towards the TVB REST API', - long_description=DESCRIPTION, - long_description_content_type="text/x-rst", - license="GPL-3.0-or-later", - author=TVB_TEAM, - author_email='tvb.admin@thevirtualbrain.org', - url='https://www.thevirtualbrain.org', - download_url='https://github.com/the-virtual-brain/tvb-root', - keywords='tvb rest client brain simulator neuroscience human animal neuronal dynamics models delay') - -# Clean after install -shutil.rmtree('tvb_rest_client.egg-info', True) diff --git a/tvb_framework/tmp/pyproject.toml b/tvb_framework/tmp/pyproject.toml new file mode 100644 index 0000000000..46149fcc1f --- /dev/null +++ b/tvb_framework/tmp/pyproject.toml @@ -0,0 +1,138 @@ +# -*- 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-2024, 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 +# +# + + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "tvb-framework" +version = "2.9.2" +description = "A package for performing whole brain simulations" +readme = "README.rst" +license = { file = "LICENSE" } +requires-python = ">=3.8" +authors = [ + { name = "Mihai Andrei" }, + { name = "Lia Domide" }, + { name = "Stuart Knock" }, + { name = "Bogdan Neacsa" }, + { name = "Paula Prodan" }, + { name = "Paula Sansz Leon" }, + { name = "Marmaduke Woodman" }, +] +maintainers = [ + { name = "Codemart", email = "tvb.admin@thevirtualbrain.org" } +] +keywords = [ + "animal", + "brain", + "delay", + "dynamics", + "human", + "models", + "neuronal", + "neuroscience", + "simulator", + "tvb", +] +classifiers = [ + "Development Status :: 6 - Mature", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", +] +dependencies = [ + "alembic", + "bctpy", + "cherrypy", + "docutils", + "flask", + "flask-restx", + "formencode", + "gevent", + "h5py", + "Jinja2", + "matplotlib", + "nibabel", + "numpy<2.0", + "pandas", + "Pillow", + "psutil", + "python-keycloak", + "requests", + "requests-toolbelt>=0.10", + "scikit-learn", + "scipy", + "siibra", + "simplejson", + "six", + "sqlalchemy", + "tvb-data", + "tvb-gdist", + "tvb-library", + "tvb-storage", + "werkzeug", +] + +[project.optional-dependencies] +extra = [ + "allensdk", +] +hpc = [ + "elasticsearch", + "pyunicore", +] +postgres = [ + "psycopg2", +] +test = [ + "BeautifulSoup4", + "pytest", + "pytest-benchmark", + "pytest-mock", +] + +[project.urls] +Download = "https://github.com/the-virtual-brain/tvb-root" +Homepage = "https://www.thevirtualbrain.org" + +[tool.hatch.build.targets.sdist] +include = [ + "/tvb", +] +exclude = [ + 'tvb.interfaces.rest.bids_monitor', 'tvb.interfaces.rest.bids_monitor.*', + 'tvb.interfaces.rest.client', 'tvb.interfaces.rest.client.*'] + + +[tool.hatch.build.targets.wheel] +packages = ["tvb"] diff --git a/tvb_library/pyproject.toml b/tvb_library/pyproject.toml new file mode 100644 index 0000000000..67ef897212 --- /dev/null +++ b/tvb_library/pyproject.toml @@ -0,0 +1,109 @@ +# -*- coding: utf-8 -*- +# +# +# TheVirtualBrain-Scientific Package. This package holds all simulators, and +# analysers necessary to run brain-simulations. You can use it stand alone or +# in conjunction with TheVirtualBrain-Framework Package. See content of the +# documentation-folder for more details. See also http://www.thevirtualbrain.org +# +# (c) 2012-2024, 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 +# +# + + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "tvb-library" +version = "2.9.2" +description = "A package for performing whole brain simulations" +readme = "README.rst" +license = { file = "LICENSE" } +requires-python = ">=3.8" +authors = [ + { name = "Marmaduke Woodman" }, + { name = "Jan Fousek" }, + { name = "Stuart Knock" }, + { name = "Paula Sanz Leon" }, + { name = "Viktor Jirsa" }, +] +maintainers = [ + { name = "Codemart", email = "tvb.admin@thevirtualbrain.org" } +] +keywords = [ + "animal", + "brain", + "delay", + "dynamics", + "human", + "models", + "neuronal", + "neuroscience", + "simulator", + "tvb", +] +classifiers = [ + "Development Status :: 6 - Mature", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", +] +dependencies = [ + "autopep8", + "Deprecated", + "docutils", + "ipywidgets", + "mako>=1.1.4", + "matplotlib", + "networkx", + "numba", + "numexpr", + "numpy<2.0", + "scipy", + "six", +] + +[project.optional-dependencies] +test = [ + "h5py", + "pytest", + "pytest-benchmark", + "pytest-xdist", + "tvb-data", + "tvb-gdist", +] + +[project.urls] +Download = "https://github.com/the-virtual-brain/tvb-root" +Homepage = "https://www.thevirtualbrain.org" + +[tool.hatch.version] +path = "tvb/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/tvb", +] + +[tool.hatch.build.targets.wheel] +packages = ["tvb"] diff --git a/tvb_library/setup.py b/tvb_library/setup.py deleted file mode 100644 index dda7312d93..0000000000 --- a/tvb_library/setup.py +++ /dev/null @@ -1,73 +0,0 @@ -# -*- coding: utf-8 -*- -# -# -# TheVirtualBrain-Scientific Package. This package holds all simulators, and -# analysers necessary to run brain-simulations. You can use it stand alone or -# in conjunction with TheVirtualBrain-Framework Package. See content of the -# documentation-folder for more details. See also http://www.thevirtualbrain.org -# -# (c) 2012-2024, 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 -# -# - -""" -Install TVB Library package for developers. - -Execute: - python setup.py install/develop -""" - -import os -import shutil -import setuptools - -LIBRARY_VERSION = "2.9.2" - -LIBRARY_TEAM = "Marmaduke Woodman, Jan Fousek, Stuart Knock, Paula Sanz Leon, Viktor Jirsa" - -LIBRARY_REQUIRED_PACKAGES = ["autopep8", "Deprecated", "docutils", "ipywidgets", "mako>=1.1.4", "matplotlib", - "networkx", "numba", "numexpr", "numpy<2.0", "scipy", "six"] - -LIBRARY_REQUIRED_EXTRA = ["h5py", "pytest", "pytest-benchmark", "pytest-xdist", "tvb-gdist", "tvb-data"] - -with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as fd: - DESCRIPTION = fd.read() - -setuptools.setup(name='tvb-library', - version=LIBRARY_VERSION, - packages=setuptools.find_packages(), - include_package_data=True, - install_requires=LIBRARY_REQUIRED_PACKAGES, - extras_require={"test": LIBRARY_REQUIRED_EXTRA}, - description='A package for performing whole brain simulations', - long_description=DESCRIPTION, - long_description_content_type="text/x-rst", - license="GPL-3.0-or-later", - author=LIBRARY_TEAM, - author_email='tvb.admin@thevirtualbrain.org', - url='https://www.thevirtualbrain.org', - download_url='https://github.com/the-virtual-brain/tvb-root', - keywords='tvb brain simulator neuroscience human animal neuronal dynamics models delay', - classifiers=["Development Status :: 6 - Mature", - "Intended Audience :: Science/Research", - "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", - "Programming Language :: Python :: 3" - ] - ) - -# Cleanup after EGG install. These are created by running setup.py in the source tree -shutil.rmtree('tvb_library.egg-info', True) diff --git a/tvb_bin/setup.py b/tvb_storage/pyproject.toml similarity index 54% rename from tvb_bin/setup.py rename to tvb_storage/pyproject.toml index bdb3d1c5f7..f653c87b8f 100644 --- a/tvb_bin/setup.py +++ b/tvb_storage/pyproject.toml @@ -23,15 +23,63 @@ # https://www.thevirtualbrain.org/tvb/zwei/neuroscience-publications # # -import shutil -from setuptools import setup, find_packages - -setup( - name='tvb_bin', - packages=find_packages(), - version="2.0", - license="GPL-3.0-or-later", - author="TVB Team" -) - -shutil.rmtree('tvb_bin.egg-info', True) \ No newline at end of file + + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "tvb-storage" +version = "2.9.2" +description = "A package which handles the storage of TVB data" +readme = "README.rst" +license = "GPL-3.0-or-later" +authors = [ + { name = "Lia Domide" }, + { name = "Paula Prodan" }, + { name = "Bogdan Valean" }, + { name = "Robert Vincze" }, +] +maintainers = [ + { name = "Codemart", email = "tvb.admin@thevirtualbrain.org" } +] +keywords = [ + "brain", + "h5", + "storage", + "tvb", +] +dependencies = [ + "cryptography", + "h5py", + "kubernetes", + "numpy", + "pyAesCrypt", + "requests", + "tvb-library", +] + +[project.optional-dependencies] +encrypt = [ + "syncrypto", +] +test = [ + "decorator", + "pytest", +] + +[project.urls] +Download = "https://github.com/the-virtual-brain/tvb-root" +Homepage = "https://www.thevirtualbrain.org" + +[tool.hatch.version] +path = "tvb/__init__.py" + +[tool.hatch.build.targets.sdist] +include = [ + "/tvb", +] + +[tool.hatch.build.targets.wheel] +packages = ["tvb"] diff --git a/tvb_storage/setup.py b/tvb_storage/setup.py deleted file mode 100644 index 6759792348..0000000000 --- a/tvb_storage/setup.py +++ /dev/null @@ -1,65 +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-2024, 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 -# -# - -""" -Install TVB Storage package for developers. -Execute: - python setup.py install/develop -""" - -import os -import shutil -import setuptools - -STORAGE_VERSION = "2.9.2" - -STORAGE_TEAM = "Lia Domide, Paula Prodan, Bogdan Valean, Robert Vincze" - -STORAGE_REQUIRED_PACKAGES = ["cryptography", "h5py", "kubernetes", "numpy", "pyAesCrypt", "requests", 'tvb-library'] - -with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as fd: - DESCRIPTION = fd.read() - -setuptools.setup(name='tvb-storage', - version=STORAGE_VERSION, - packages=setuptools.find_packages(), - include_package_data=True, - install_requires=STORAGE_REQUIRED_PACKAGES, - extras_require={ - 'test': ["pytest", "decorator"], - 'encrypt': ["syncrypto"]}, - description='A package which handles the storage of TVB data', - long_description=DESCRIPTION, - long_description_content_type="text/x-rst", - license="GPL-3.0-or-later", - author=STORAGE_TEAM, - author_email='tvb.admin@thevirtualbrain.org', - url='https://www.thevirtualbrain.org', - download_url='https://github.com/the-virtual-brain/tvb-root', - keywords='tvb brain storage h5') - -# Cleanup after EGG install. These are created by running setup.py in the source tree -shutil.rmtree('tvb_storage.egg-info', True)