From b038cd4c014c8279bdcc2e16dd26e990f0bdc542 Mon Sep 17 00:00:00 2001 From: adrianciu Date: Wed, 13 Nov 2024 20:26:36 +0200 Subject: [PATCH] TVB-3109 created pyproject.toml for tvb-library, tvb-framework, tvb-storage and tvb-contrib --- tvb_contrib/pyproject.toml | 3 ++ tvb_contrib/setup_old.py | 51 ---------------------- tvb_framework/pyproject.toml | 3 ++ tvb_framework/setup_old.py | 82 ------------------------------------ tvb_library/pyproject.toml | 3 ++ tvb_library/setup_old.py | 73 -------------------------------- tvb_storage/pyproject.toml | 3 ++ tvb_storage/setup_old.py | 65 ---------------------------- 8 files changed, 12 insertions(+), 271 deletions(-) delete mode 100644 tvb_contrib/setup_old.py delete mode 100644 tvb_framework/setup_old.py delete mode 100644 tvb_library/setup_old.py delete mode 100644 tvb_storage/setup_old.py diff --git a/tvb_contrib/pyproject.toml b/tvb_contrib/pyproject.toml index 6e72a41fa..2fd2ecd7c 100644 --- a/tvb_contrib/pyproject.toml +++ b/tvb_contrib/pyproject.toml @@ -70,3 +70,6 @@ path = "tvb/__init__.py" include = [ "/tvb", ] + +[tool.hatch.build.targets.wheel] +packages = ["tvb"] diff --git a/tvb_contrib/setup_old.py b/tvb_contrib/setup_old.py deleted file mode 100644 index 4f364f974..000000000 --- a/tvb_contrib/setup_old.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_framework/pyproject.toml b/tvb_framework/pyproject.toml index 0722bc2c9..0b4205dba 100644 --- a/tvb_framework/pyproject.toml +++ b/tvb_framework/pyproject.toml @@ -132,3 +132,6 @@ path = "tvb/__init__.py" include = [ "/tvb", ] + +[tool.hatch.build.targets.wheel] +packages = ["tvb"] diff --git a/tvb_framework/setup_old.py b/tvb_framework/setup_old.py deleted file mode 100644 index f6b51e0c0..000000000 --- a/tvb_framework/setup_old.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_library/pyproject.toml b/tvb_library/pyproject.toml index 31cc85f2b..67ef89721 100644 --- a/tvb_library/pyproject.toml +++ b/tvb_library/pyproject.toml @@ -104,3 +104,6 @@ path = "tvb/__init__.py" include = [ "/tvb", ] + +[tool.hatch.build.targets.wheel] +packages = ["tvb"] diff --git a/tvb_library/setup_old.py b/tvb_library/setup_old.py deleted file mode 100644 index dda7312d9..000000000 --- a/tvb_library/setup_old.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_storage/pyproject.toml b/tvb_storage/pyproject.toml index 834cb9426..f653c87b8 100644 --- a/tvb_storage/pyproject.toml +++ b/tvb_storage/pyproject.toml @@ -80,3 +80,6 @@ path = "tvb/__init__.py" include = [ "/tvb", ] + +[tool.hatch.build.targets.wheel] +packages = ["tvb"] diff --git a/tvb_storage/setup_old.py b/tvb_storage/setup_old.py deleted file mode 100644 index 675979234..000000000 --- a/tvb_storage/setup_old.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)