Skip to main content

A package for performing whole brain simulations

Project description

TVB FRAMEWORK

The Virtual Brain framework is a complete framework including:

  • a plugable workflow manager;

  • a data persistence layer (with a relational DB and File Storage);

  • an HTML5 based user interface;

  • visualizers for neuro-science related entities.

The easiest way to make use of this code, is to obtain a Distribution of TVB with Python and all the necessary packages linked, and then clone this repo nearby. More details in our documentation.

Alternatively, if you plan to develop long term with TVB, extensively modify code, add new dependencies, or you simply prefer to use your own Python installation, you may want to read this: here.

If you don’t require the framework features listed above, the simulator and associated scientific modules can be used independently; please see the tvb-library folder.

Framework structure

tvb-gdist
    |
    |
tvb-library     tvb-data
      \          /
        \       /
        tvb.config
            |
            |
        tvb.core
            |
            |
        tvb.adapters
            |
            |
        tvb.config.init
            |
            |
        tvb.interfaces

tvb-data should be installed from Zenodo: https://zenodo.org/record/10128131. After download, unzip and execute python setup.py develop in the correct env.

Usage

To use TVB code, clone from GitHub (https://github.com/the-virtual-brain/tvb-root), or get from Pypi:

pip install tvb-framework
python -m tvb.interfaces.web.run WEB_PROFILE tvb.config

Your port 8080 should be free, as a CherryPy service will try to run there. Your default browser should automatically open http://localhost:8080/ which is the way to interact with TVB Web Interface.

Testing

For testing the package, the Pytest framework is used. Pytest can be installed using pip.

In addition to tvb-framework needed just for launching the web, tests require few extra dependencies just for test (e.g. pytest-benchmark), which need to be installed manually. The entire list of these dependencies for testing is found in tvb_framework/setup.py under extras_require.

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-framework:

cd [folder_where_tvb_framework_is]
pytest tvb/test/framework [--profile=TEST_POSTGRES_PROFILE] [--junitxml=path]
# default profile value is TEST_SQLITE_PROFILE

The second alternative form of running TVB tests, when installing TVB from Pypi, is:

pip install -U tvb-framework
pytest --pyargs tvb.tests.framework

Coverage

A coverage report can be generated with:

pip install pytest-cov
cd [folder_where_tvb_framework_is]
py.test --cov=tvb tvb/tests/ --cov-branch --cov-report xml:[file_where_xml_will_be_generated]

Further Resources

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tvb-framework-2.9.tar.gz (10.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tvb_framework-2.9-py3-none-any.whl (11.3 MB view details)

Uploaded Python 3

File details

Details for the file tvb-framework-2.9.tar.gz.

File metadata

  • Download URL: tvb-framework-2.9.tar.gz
  • Upload date:
  • Size: 10.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.19

File hashes

Hashes for tvb-framework-2.9.tar.gz
Algorithm Hash digest
SHA256 44f102bcfd63a09c9c2af662a004415f2fc64847c0376218011b27fd2bb03848
MD5 063c8c285af53eb945a6cc3b9b9ed39a
BLAKE2b-256 59e39c1d6b7792d416a5e96ddb81e954aebba184d925ba511e580c8452242153

See more details on using hashes here.

File details

Details for the file tvb_framework-2.9-py3-none-any.whl.

File metadata

  • Download URL: tvb_framework-2.9-py3-none-any.whl
  • Upload date:
  • Size: 11.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.19

File hashes

Hashes for tvb_framework-2.9-py3-none-any.whl
Algorithm Hash digest
SHA256 410e1e350b59b7d95283812c064c7b5f822e9f295c08d911ace241c610cebbc3
MD5 606c34f984ee2c42cdc4a2fa0a1d5625
BLAKE2b-256 62821c9bf21cbe93f4dad4b0a7c76e009e5b355ca634392f4bcf8f323b7f260d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page