Skip to main content

BrainMaze: Brain Electrophysiology, Behavior and Dynamics Analysis Toolbox

Project description

BrainMaze: Brain Electrophysiology, Behavior and Dynamics Analysis Toolbox - Utils

This toolbox provides a generic tools for the BrainMaze package. This tool was separated from the BrainMaze toolbox to support a convenient and lightweight sharing of these tools across projects.

This project was originally developed as a part of the BEhavioral STate Analysis Toolbox (BEST) project. However, the development has transferred to the BrainMaze project.

Documentation

Documentation is available here.

Installation

pip install brainmaze-utils

How to contribute

The project has 2 main protected branches main that contains official software releases and dev that contains the latest feature implementations shared with developers. To implement a new feature a new branch should be created from the dev branch with name pattern of developer_identifier/feature_name.

After the feature is implemented, a pull request can be created to merge the feature branch into the dev branch with. Pull requests need to be reviewed by the code owners.

Releasing

Releases are automated and never bypass branch protection. To cut a release, a code owner runs the Prepare release GitHub Action (Actions tab, workflow_dispatch) and selects the bump (patch / minor / major). This opens a small Release vX.Y.Z pull request that bumps [project].version in pyproject.toml on a release/bump-* branch off main. Once a code owner approves and merges that pull request into main, the Release workflow tags the version, builds the distributions, publishes to PyPI, and drafts the GitHub release automatically. The build reads the version from pyproject.toml, which remains the single source of truth.

Promotion of features from dev to main is independent of releases and must not change [project].version – a Version guard CI check fails any pull request outside the release flow that edits it. The version line is owned solely by the release automation on main; this is what keeps dev -> main merges free of version conflicts under the squash-merge policy (a version edited on both branches would otherwise conflict every release cycle).

The Prepare release action requires the repository/organization setting Allow GitHub Actions to create and approve pull requests to be enabled, so it can open the bump pull request.

New functions need to be implemented with Sphinx compatible docstrings. The documentation is automatically generated from the docstrings using Sphinx.

Building Documentation

Documentation source is in docs_src/ and generated HTML output goes to docs/. The docs/ directory is excluded from version control (added to .gitignore) to keep the repository clean. To build documentation locally:

# Install documentation dependencies
pip install -r docs_src/requirements.txt

# Build documentation
sphinx-build -b html docs_src/source docs

# Or use the provided script
./make_docs.sh

The generated documentation can be hosted separately (e.g., GitHub Pages, ReadTheDocs) without committing build artifacts to the repository.

License

This software is licensed under BSD-3Clause license. For details see the LICENSE file in the root directory of this project.

Acknowledgment

This code was developed and originally published for the first time with by (Mivalt 2022, and Sladky 2022). We appreciate you citing these papers when utilizing this toolbox in further research work.

F. Mivalt et V. Kremen et al., “Electrical brain stimulation and continuous behavioral state tracking in ambulatory humans,” J. Neural Eng., vol. 19, no. 1, p. 016019, Feb. 2022, doi: 10.1088/1741-2552/ac4bfd.

V. Sladky et al., “Distributed brain co-processor for tracking spikes, seizures and behaviour during electrical brain stimulation,” Brain Commun., vol. 4, no. 3, May 2022, doi: 10.1093/braincomms/fcac115.

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

brainmaze_utils-2.0.0.tar.gz (33.9 kB view details)

Uploaded Source

Built Distribution

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

brainmaze_utils-2.0.0-py3-none-any.whl (35.1 kB view details)

Uploaded Python 3

File details

Details for the file brainmaze_utils-2.0.0.tar.gz.

File metadata

  • Download URL: brainmaze_utils-2.0.0.tar.gz
  • Upload date:
  • Size: 33.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for brainmaze_utils-2.0.0.tar.gz
Algorithm Hash digest
SHA256 a35611f9984b322ee7c912c1e904f8865fb213d26350caf818f6101d1a60fce0
MD5 78e1ad5dc41cb49f095de7871ef1fcd2
BLAKE2b-256 1d6d6ab826f56280e068749df1971579752b89a9296fd29bb15eadeb08a747e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for brainmaze_utils-2.0.0.tar.gz:

Publisher: release.yml on bnelair/brainmaze-utils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file brainmaze_utils-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: brainmaze_utils-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 35.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for brainmaze_utils-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 62e57af9a6e90bb7901346eafb44113f1c6b35aed88c5d9ea0f7cd17d67dbde7
MD5 bef4f02273ac0f8bfdcad7d74bf500ec
BLAKE2b-256 edb31e1d6ae3b37f9a3d81c00f7415098a4de30de2b33385ff8baf1673a665c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for brainmaze_utils-2.0.0-py3-none-any.whl:

Publisher: release.yml on bnelair/brainmaze-utils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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