Metadata-Version: 2.4
Name: maybe-compute
Version: 0.1.0
Summary: to disk caching of compute
Author-email: Ian Hunt-Isaak <ianhuntisaak@gmail.com>
License: BSD-3-Clause
Project-URL: Homepage, https://github.com/ianhi/maybe-compute
Project-URL: Source Code, https://github.com/ianhi/maybe-compute
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: xarray
Provides-Extra: dev
Requires-Dist: black; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: ipython; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Provides-Extra: testing
Requires-Dist: pytest; extra == "testing"
Requires-Dist: pytest-cov; extra == "testing"
Requires-Dist: tox; extra == "testing"
Requires-Dist: tox-conda; extra == "testing"
Dynamic: license-file

# maybe-compute

[![License](https://img.shields.io/pypi/l/maybe-compute.svg?color=green)](https://github.com/ianhi/maybe-compute/raw/master/LICENSE)
[![PyPI](https://img.shields.io/pypi/v/maybe-compute.svg?color=green)](https://pypi.org/project/maybe-compute)
[![Python Version](https://img.shields.io/pypi/pyversions/maybe-compute.svg?color=green)](https://python.org)
[![CI](https://github.com/ianhi/maybe-compute/workflows/ci/badge.svg)](https://github.com/ianhi/maybe-compute/actions)
[![codecov](https://codecov.io/gh/ianhi/maybe-compute/branch/master/graph/badge.svg)](https://codecov.io/gh/ianhi/maybe-compute)

To disk caching of computationally intensive functions.

## Usage

```python
from maybe_compute import maybe_compute, set_maybe_compute_folder
import xarray as xr
import numpy as np

def dataset_maker(a, b):
    "this docstring shows thanks to functools.wraps!"
    return xr.Dataset({"images":xr.DataArray(np.random.randn(10,20)*a +b, dims=('a','b'))})

set_maybe_compute_folder('sign-flip-cartoon')
maybe_compute(dataset_maker,  'yikes.nc')(4,5)

```

## Install

I strongly recommend pinning to a known version as the API may change dramatically until version 1.0 is published.

```bash
pip install maybe-compute==0.1.0
```
