Skip to main content

Bibat: Batteries-Included Bayesian Analysis Template

Documentation Status Tox Test end-to-end Project Status: Active – The project has reached a stable, usable state and is being actively developed. Supported Python versions: 3.11 and newer pyOpenSci

Bibat is a Python package providing a flexible interactive template for Bayesian statistical analysis projects.

It aims to make it easier to create software projects that implement a Bayesian workflow that scales to arbitrarily many inter-related statistical models, data transformations, inferences and computations. Bibat also aims to promote software quality by providing a modular, automated and reproducible project that takes advantage of and integrates together the most up to date statistical software.

Bibat comes with "batteries included" in the sense that it creates a working example project, which the user can adapt so that it implements their desired analysis. We believe this style of template makes for better usability and easier testing of Bayesian workflow projects compared with the alternative approach of providing an incomplete skeleton project.

Documentation

Check out bibat's documentation at https://bibat.readthedocs.io.

In particular, you may find it useful to have a look at [this vignette](https:// bibat.readthedocs.io/en/latest/_static/report.html) that demonstrates, step by step, how to use bibat to implement a complex statistical analysis.

How to use bibat

To start a Bayesian statistical analysis project using bibat, first install copier, for example like this:

$ pipx install copier

Now choose a directory name for your analysis, for example my_cool_project, and copy bibat's example project there:

$ copier copy gh:teddygroves/bibat my_cool_project

This will trigger an interactive questionnaire and then create a brand new, custom, batteries-included, Bayesian analysis project in the directory my_cool_project. See bibat's documentation for what to do next.

If you want to use bibat's Python code separately from the template, you can install it to your python environment as follows:

$ pip install bibat

To install bibat with development dependencies:

$ pip install bibat'[development]'

Dependencies

Bibat requires Python version 3.11 or greater.

Bibat's Python dependencies can be found in its pyproject.toml file.

Bibat's Python dependencies:

  • arviz
  • cmdstanpy
  • copier
  • numpy
  • pandas
  • pandera
  • pydantic
  • scikit-learn
  • stanio
  • toml
  • xarray
  • zarr

Bibat's development dependencies (install these by running pip install bibat'[development]'):

  • black
  • pre-commit
  • codecov
  • mkdocs
  • mkdocs-material
  • mkdocstrings
  • mkdocstrings-python
  • pymdown-extensions
  • pytest
  • pytest-cov
  • tox
  • ruff

Projects created by bibat have Python dependencies listed in their pyproject.toml file. The additional ones are as follows:

  • bibat
  • jupyter

In addition, the following Python packages may be installed, depending on how the user answers bibat's questionnaire:

  • sphinx

Bibat projects also depend on cmdstan, the command line interface to Stan. Bibat projects include code that installs cmdstan when you run the command make analysis from the root of the target project. To only install dependencies, you can also run the command make env.

If bibat fails to install cmdstan, please raise an issue! The relevant parts of the cmdstan and cmdstanpy documentation might also be useful.

Target project dependencies: Quarto

Bibat supports automatic generation of documentation using either Sphinx or Quarto. Whereas bibat will install Sphinx automatically, Quarto must be installed manually: see the quarto documentation for instructions.

Citation information

If you would like to cite bibat using bibtex please use the following format:

  @software{bibat,
    doi = {10.5281/zenodo.7775328},
    url = {https://github.com/teddygroves/bibat},
    year = {2023},
    author = {Teddy Groves},
    title = {Bibat: batteries-included Bayesian analysis template},
  }

Metadata

Release files for bibat 0.3.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bibat 0.3.4
File Size Uploaded
bibat-0.3.4.tar.gz 12.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bibat 0.3.4
File Interpreter ABI Platform
bibat-0.3.4-py3-none-any.whl Python 3 none any Details

Total release size: 23.1 kB

Release files / bibat-0.3.4.tar.gz

Download URL bibat-0.3.4.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9e406d200093aff6dc88d202d7c9dcdd99c30ef2ef10bf0426b410d579cab5d5
BLAKE2b-256 checksum
How to use checksums
dfbfbd01f76ef80f536247d3d675ff9bdc8dc6aa9f51bfb410566a53f16a35f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Release files / bibat-0.3.4-py3-none-any.whl

Download URL bibat-0.3.4-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b263c4b5112f5b1f4749c65309ccd24d493d789de29ab2d151ac20d63f60765
BLAKE2b-256 checksum
How to use checksums
b5744cba55f1d835bd7ec22ff87cc8d4619d5e19ae957072a4ff22141a7b34c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

0.3.4 This release

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page