Skip to main content

py_grama

DOI PyPI version Documentation Status Python package test codecov CodeFactor

Implementation of a grammar of model analysis (grama). See the documentation for more info.

Overview

Grama is a grammar of model analysis---a Python package that supports building and analyzing models with quantified uncertainties. This language is heavily inspired by the Tidyverse. Grama provides convenient syntax for building a model (with functions and distributions), generating data, and visualizing results. The purpose of this language is to support scientists and engineers learning to handle uncertainty, and to improve documentation + reproducibility of results.

Uncertainty Quantification (UQ) is the science of analyzing uncertainty in scientific problems and using those results to inform decisions. UQ has important applications to building safety-critical engineering systems, and to making high-consequence choices based on scientific models. However, UQ is generally not taught at the undergraduate level: Many engineers leave their undergraduate training with a purely deterministic view of their discipline, which can lead to probabilistic design errors that negatively impact safety. To that end, Grama is designed to facilitate rapid model analysis, communication of results, and the teaching of concepts, all with quantified uncertainties. Intended users of Grama are scientists and engineers at the undergraduate level and upward, seeking to analyze computationally-lightweight models.

Installation

Quick install:

$ pip install py-grama

For a manual install clone this repo, change directories and run the following to install dependencies. (Note: I recommend Anaconda as a Python distribution; it takes care of most of the dependencies.)

$ git clone git@github.com:zdelrosario/py_grama.git
$ cd py_grama/
$ pip install -r requirements.txt
$ pip install .

Run the following to check your install:

$ python
> import grama

Quick Tour

py_grama has tools for both building and analyzing models. For a quick look at functionality, see the following notebooks:

Tutorials

The tutorials page has educational materials for learning to work with py_grama.

Support and Contributing

If you are seeking support or want to contribute, please see Contributing.

Cite As

If you find Grama useful in your work, we'd appreciate that you cite it as:

del Rosario, Z., (2020). Grama: A Grammar of Model Analysis. Journal of Open Source Software, 5(51), 2462, https://doi.org/10.21105/joss.02462

Bibtex code:

@article{del Rosario2020,
  doi = {10.21105/joss.02462},
  url = {https://doi.org/10.21105/joss.02462},
  year = {2020},
  publisher = {The Open Journal},
  volume = {5},
  number = {51},
  pages = {2462},
  author = {Zachary del Rosario},
  title = {Grama: A Grammar of Model Analysis},
  journal = {Journal of Open Source Software}
}

Metadata

Release files for py-grama 0.3.8

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

Source distribution (sdist)

Source distribution for py-grama 0.3.8
File Size Uploaded Provenance
py_grama-0.3.8.tar.gz 777.3 kB Without provenance Details

Release files / py_grama-0.3.8.tar.gz

Download URL py_grama-0.3.8.tar.gz
Size 777.3 kB
Tags Source
SHA-256 checksum
How to use checksums
11ea585c56bf4676cd4fb91ac3fdd7fde345ab4fceffbb626d030e04db1a8450
BLAKE2b-256 checksum
How to use checksums
12ef18ec6507fc1e9431ab21678f842773d61e084b45f6d7ec915ef4eea9c75b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.21

Security for py-grama 0.3.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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