Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #8

Merged
merged 9 commits into from
Feb 19, 2025
82 changes: 41 additions & 41 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
name: Publish to PyPI

on:
push:
branches:
- main
tags:
- "v*"

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build twine

- name: Compile C++ code
run: |
cd vbi/models/cpp/_src
make

- name: Build package
run: python -m build

- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags/v')
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*
# name: Publish to PyPI

# on:
# push:
# branches:
# - develop
# tags:
# - "v*"

# jobs:
# deploy:
# runs-on: ubuntu-latest

# steps:
# - name: Checkout repository
# uses: actions/checkout@v4

# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# python-version: "3.10"

# - name: Install build dependencies
# run: |
# python -m pip install --upgrade pip
# pip install build twine

# - name: Compile C++ code
# run: |
# cd vbi/models/cpp/_src
# make

# - name: Build package
# run: python -m build

# - name: Publish to PyPI
# if: startsWith(github.ref, 'refs/tags/v')
# env:
# TWINE_USERNAME: __token__
# TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
# run: twine upload dist/*
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include LICENSE
graft docs
graft docs
graft vbi/models/cpp/_src
71 changes: 71 additions & 0 deletions docs/API.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
.. raw:: html

<link rel="stylesheet" type="text/css" href="_static/custom.css">


API and documentation
=====================


C++ models
-------------------------


vbi.models.cpp.jansen_rit
~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: vbi.models.cpp.jansen_rit
:members:
:undoc-members:

vbi.models.cpp.km
~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: vbi.models.cpp.km
:members:
:undoc-members:

vbi.models.cpp.mpr
~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: vbi.models.cpp.mpr
:members:
:undoc-members:

vbi.models.cpp.vep
~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: vbi.models.cpp.vep
:members:
:undoc-members:


vbi.models.cpp.wc
~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: vbi.models.cpp.wc
:members:
:undoc-members:


Cupy models
-------------------------

vbi.models.cupy.mpr
~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: vbi.models.cupy.mpr
:members:
:undoc-members:

vbi.models.cupy.ghb
~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: vbi.models.cupy.ghb
:members:
:undoc-members:

vbi.models.cupy.jansen_rit
~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: vbi.models.cupy.jansen_rit
:members:
:undoc-members:

vbi.models.cupy.utils
~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: vbi.models.cupy.utils
:members:
:undoc-members:
32 changes: 32 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.color-title th {
color: rgb(131, 94, 179);
}

.color-caption caption {
color: rgb(139, 68, 206);
}


/* Change the color of module headers */
.py.mod > .descclassname, .py.mod > .descname {
color: #FF5733; /* Orange */
}

/* Change the color of function signatures */
.sig.sig-object.py {
color: #327219; /* Green */
}

/* Change the background color of code blocks */
.highlight {
background-color: #F0F8FF; /* Light blue */
}

.section {
background-color: #f0f8ff; /* Light blue background for sections */
}

.descclassname, .descname {
color: #327219; /* Green color for class and function names */
}

1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
html_theme = 'nature'
pygments_style = "colorful"
add_function_parentheses = True
html_static_path = ['_static']

# html_theme = "bootstrap"
# html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
Expand Down
431 changes: 431 additions & 0 deletions docs/examples/jansen_rit_sde_cupy.ipynb

Large diffs are not rendered by default.

101 changes: 33 additions & 68 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
.. raw:: html

<link rel="stylesheet" type="text/css" href="_static/custom.css">


Virtual Brain Inference (VBI)
##############################


.. image:: _static/vbi_log.png
:alt: VBI Logo
:width: 200px
:align: center

Workflow
========

.. image:: _static/Fig1.png
:alt: VBI Logo
:width: 800px

Installation
============

Expand All @@ -17,6 +34,13 @@ Installation
# pip install -e .[all,dev,docs]


.. toctree::
:maxdepth: 2
:caption: Contents:

models


Examples
=========

Expand All @@ -32,10 +56,19 @@ Examples
examples/mpr_sde_cupy
examples/mpr_sde_numba
examples/jansen_rit_sde_cpp
examples/jansen_rit_sde_cupy
examples/ww_sde_torch_kong
examples/ghb_sde_cupy



.. toctree::
:maxdepth: 2
:caption: API Reference

API


Indices and tables
==================

Expand All @@ -45,71 +78,3 @@ Indices and tables



API and documentation
=====================

C++ models
-------------------------

.. automodule:: vbi
:members:
:undoc-members:

vbi.models.cpp.jansen_rit
-------------------------
.. automodule:: vbi.models.cpp.jansen_rit
:members:
:undoc-members:

vbi.models.cpp.km
-------------------------
.. automodule:: vbi.models.cpp.km
:members:
:undoc-members:

vbi.models.cpp.mpr
-------------------------
.. automodule:: vbi.models.cpp.mpr
:members:
:undoc-members:

vbi.models.cpp.vep
-------------------------
.. automodule:: vbi.models.cpp.vep
:members:
:undoc-members:


vbi.models.cpp.wc
-------------------------
.. automodule:: vbi.models.cpp.wc
:members:
:undoc-members:


Cupy models
-------------------------

vbi.models.cupy.mpr
-------------------------
.. automodule:: vbi.models.cupy.mpr
:members:
:undoc-members:

vbi.models.cupy.ghb
-------------------------
.. automodule:: vbi.models.cupy.ghb
:members:
:undoc-members:

vbi.models.cupy.jansen_rit
----------------------------
.. automodule:: vbi.models.cupy.jansen_rit
:members:
:undoc-members:

vbi.models.cupy.utils
-------------------------
.. automodule:: vbi.models.cupy.utils
:members:
:undoc-members:
Loading