Metadata-Version: 2.4
Name: recipe-utils
Version: 0.1.0
Summary: Utilities for preparing recipe and nuclear-data workflows
Author: AMPX team
License-Expression: BSD-3-Clause
Project-URL: Repository, https://code-int.ornl.gov/scale/data/recipe-utils
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.0
Dynamic: license-file

# recipe-utils

Small, dependency-light Python utilities for recipe and nuclear-data
workflows: file preparation, archive downloads and extraction, checksum
verification, text updates, Java discovery, and bounded command execution.

## Install

```bash
python -m pip install recipe-utils
```

The package supports Python 3.9+ and depends on `requests`.

## Usage

```python
from recipe_utils import makedirs, md5sum, run_parallel_2

makedirs("work/")
run_parallel_2(["echo first", "echo second"], max_parallel=2)
print(md5sum("path/to/file"))
```

The public helpers include:

- `makedirs` and `cleandirs` for workflow directories
- `download_file`, `md5sum`, `extract_tar`, and `curl_endf_lib` for data files
- `swap_strings`, `swap_all_str`, `remove_line`, and `apply_patch` for text
- `get_jdkhome` for Java discovery
- `run_parallel`, `run_concurrent`, and `run_parallel_2` for shell commands

Only pass trusted command strings to the process helpers: they execute through
the shell. Use trusted archives and validate checksums before consuming
downloaded data.

## Build and publish

Build artifacts locally with:

```bash
python -m pip install --upgrade build
python -m build
```

This creates a wheel and source distribution in `dist/`. Upload them using a
configured PyPI account and token, for example with `twine`:

```bash
python -m pip install --upgrade twine
python -m twine upload dist/*
```

Increase the version in `pyproject.toml` for each release. The repository does
not yet include an automated test suite or CI configuration.

## License

BSD 3-Clause. See [LICENSE](./LICENSE).
