Roll your own typed wrapper
Project description
dough
Roll your own typed wrapper.
[!WARNING]
doughis still pre-1.0. The API is still evolving and can break in minor releases.
dough is a small framework for building typed Python wrappers around the output files of simulation codes.
It ships the generic machinery — file parsers, declarative output mappings, optional library converters — and stays out of the way of the code-specific details.
Code-specific wrappers live in their own packages (see Packages built on dough below).
🌯 The current layers
- Parsers — turn one output file into a plain dict. One parser per file format; stateless, with a single
parse(content)method. - Output mappings — frozen dataclasses whose fields are
Annotated[T, Spec(...)]. Each field declares the output's name, type, unit (in its docstring), and how to extract it from the parsed dicts via aglomSpec. One source of truth per quantity. - Converters — optional adapters that turn base Python outputs into
ase,pymatgen, oraiida-coreobjects. Heavy third-party imports stay lazy so wrapper packages don't pay for them at import time.
See the outputs design page for the full picture.
🧪 Testing
dough.testing ships shared pytest fixtures (json_serializer, robust_data_regression_check) used by downstream wrapper packages for regression tests.
It's an opt-in plugin — activate it in your top-level conftest.py with pytest_plugins = ["dough.testing.plugin"].
See the testing design page.
📦 Packages built on dough
| Package | Code | Status |
|---|---|---|
qe-tools |
Quantum ESPRESSO | alpha — pw.x, dos.x outputs |
strudel |
VASP | alpha — basic outputs + magnetization |
📚 Docs
Full documentation at mbercx.github.io/dough.
🤝 Contributing
It's still early days, and too soon to accept external contributions. Feedback is most welcome though, feel free to open issue!
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dough-0.4.0.tar.gz.
File metadata
- Download URL: dough-0.4.0.tar.gz
- Upload date:
- Size: 36.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
960e3b72113950b43750a7bb76f80e363f8e5ef2dc1ba957494e1fd8f38725c8
|
|
| MD5 |
6eebffb8dcb8edd7bd846f5780c6623f
|
|
| BLAKE2b-256 |
6a4665374ac5767a889aa6a0b63eb4834d4b14e59d495835c65edd6a79950de5
|
Provenance
The following attestation bundles were made for dough-0.4.0.tar.gz:
Publisher:
cd.yaml on mbercx/dough
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dough-0.4.0.tar.gz -
Subject digest:
960e3b72113950b43750a7bb76f80e363f8e5ef2dc1ba957494e1fd8f38725c8 - Sigstore transparency entry: 1393450763
- Sigstore integration time:
-
Permalink:
mbercx/dough@3f349611b1ad9a1436c0fa934cab5185d8ae24e5 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/mbercx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yaml@3f349611b1ad9a1436c0fa934cab5185d8ae24e5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file dough-0.4.0-py3-none-any.whl.
File metadata
- Download URL: dough-0.4.0-py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5eb83783ea3662c6bfcb10a68a0ff7b5aeb4bb8fa4d99a4d96378a4d371587f8
|
|
| MD5 |
d407ec39ce41a44100c6b3b54758207f
|
|
| BLAKE2b-256 |
2127a862daedb2877ee777b03ad3c7db1d05c91c36b7d893402564c4250792f7
|
Provenance
The following attestation bundles were made for dough-0.4.0-py3-none-any.whl:
Publisher:
cd.yaml on mbercx/dough
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dough-0.4.0-py3-none-any.whl -
Subject digest:
5eb83783ea3662c6bfcb10a68a0ff7b5aeb4bb8fa4d99a4d96378a4d371587f8 - Sigstore transparency entry: 1393450770
- Sigstore integration time:
-
Permalink:
mbercx/dough@3f349611b1ad9a1436c0fa934cab5185d8ae24e5 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/mbercx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yaml@3f349611b1ad9a1436c0fa934cab5185d8ae24e5 -
Trigger Event:
push
-
Statement type: