Skip to main content

Roll your own typed wrapper

Project description

Templated from python-copier

dough

Roll your own typed wrapper.

[!WARNING] dough is 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 a glom Spec. One source of truth per quantity.
  • Converters — optional adapters that turn base Python outputs into ase, pymatgen, or aiida-core objects. 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

dough-0.4.0.tar.gz (36.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dough-0.4.0-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

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

Hashes for dough-0.4.0.tar.gz
Algorithm Hash digest
SHA256 960e3b72113950b43750a7bb76f80e363f8e5ef2dc1ba957494e1fd8f38725c8
MD5 6eebffb8dcb8edd7bd846f5780c6623f
BLAKE2b-256 6a4665374ac5767a889aa6a0b63eb4834d4b14e59d495835c65edd6a79950de5

See more details on using hashes here.

Provenance

The following attestation bundles were made for dough-0.4.0.tar.gz:

Publisher: cd.yaml on mbercx/dough

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for dough-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5eb83783ea3662c6bfcb10a68a0ff7b5aeb4bb8fa4d99a4d96378a4d371587f8
MD5 d407ec39ce41a44100c6b3b54758207f
BLAKE2b-256 2127a862daedb2877ee777b03ad3c7db1d05c91c36b7d893402564c4250792f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for dough-0.4.0-py3-none-any.whl:

Publisher: cd.yaml on mbercx/dough

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page