Skip to main content

pmmanifest

Generate PlayMolecule v2 app manifests — standard JSON Schema (inputSchema) plus an RJSF uiSchema — directly from a typed Python function signature, and preview the resulting GUI locally. The successor to func2argparse's manifest-generation role (the argparse path is dropped; apps run via inputs.json).

Why

One typed signature is the single source of truth: it drives the manifest (what the GUI renders), runtime validation/coercion, and the Python API. Standard JSON Schema means an off-the-shelf renderer (RJSF) handles nested objects, arrays-of-objects, enums and oneOf — no bespoke widgets.

Authoring (signature-first)

Apps stay plain annotated functions — no BaseModel per function. Plain pathlib.Path is auto-substituted with the path-role type, so most apps need no rewrite. Presentation rides along in Annotated[T, UI(...)].

from pathlib import Path
from typing import Annotated, Literal
from pmmanifest import UI, func_to_manifest, build_app_manifest

def systembuilder(
    outdir: Path,
    structure: Annotated[Path | None, UI(widget="file")] = None,
    forcefield: Annotated[Literal["GAFF2", "openff-2.3.0"], UI(group="Force field")] = "GAFF2",
):
    """SystemBuilder builds systems for MD simulation."""

entry = func_to_manifest(systembuilder, function="myapp.app.systembuilder")
manifest = build_app_manifest("systembuilder", [entry])

Preview the GUI

pmmanifest serve  myapp.app:systembuilder      # live RJSF form at http://127.0.0.1:8000
pmmanifest emit   myapp.app:systembuilder      # print the v2 manifest JSON

Docstring fallback (existing functions work unchanged)

Annotations are optional. If a parameter has no Field(description=...) / UI(...), pmmanifest reads the function's numpydoc Parameters section (func2argparse style) for the description, choices= (→ enum/dropdown), and gui_options= (→ groups, labels, hidden, legacy columns). The annotation always wins when present. Labels follow the PlayMolecule rule: the description's first sentence if ≤4 words, else a prettified field name.

def systembuilder(outdir: Path, forcefield: str = "GAFF2"):
    """SystemBuilder builds systems for MD simulation.

    Parameters
    ----------
    outdir : Path
        Output directory to store results
    forcefield : str, choices=("GAFF2", "openff-2.3.0"), gui_options={"group": "Force field"}
        Force field. Used for non-canonical residue parameterization.
    """
    ...
# -> outdir labeled "Output directory" (+tooltip), forcefield a "Force field"-group dropdown.

Flexible path types

A path argument is always a string on the wire and may be a local path or a remote URI (slpm://, app://, bck://). PMPath is a permissive tagged string ({"type":"string","format":"path"}), never pathlib.Path (which would corrupt slpm://x to slpm:/x). File-staging keys off format:"path".

Shared dialect contract

detect_dialect, iter_path_values, set_in are the v1/v2 coexistence helpers intended for the execution backends to import (so the contract can't drift). detect_dialect works on a full envelope or a bare function dict (autodiscovers from keys: inputSchema ⇒ v2, params ⇒ v1).

Release files for acellera-pmmanifest 0.1.6

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

Source distribution (sdist)

Source distribution for acellera-pmmanifest 0.1.6
File Size Uploaded
acellera_pmmanifest-0.1.6.tar.gz 22.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for acellera-pmmanifest 0.1.6
File Interpreter ABI Platform
acellera_pmmanifest-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 46.0 kB

Release files / acellera_pmmanifest-0.1.6.tar.gz

Download URL acellera_pmmanifest-0.1.6.tar.gz
Size 22.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9733e6ba2ecdd6ad80d1ebee98d6b616d431e4d810ae6e5adfbafd0f9ae46b7a
BLAKE2b-256 checksum
How to use checksums
ab674cae373a1e701cd07b231f609ab7c45ab0b24534d846fe40c42255542fca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / acellera_pmmanifest-0.1.6-py3-none-any.whl

Download URL acellera_pmmanifest-0.1.6-py3-none-any.whl
Size 23.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
79f11971b9883c4311158d3e7f0e6ddef363657373abedce17cca090f516b9cd
BLAKE2b-256 checksum
How to use checksums
a330a5df744d446c2159969d39a2fc81044c00563f38965918b27a42b1a33d4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.15

1 release file

0.0.14

1 release file

0.0.13

1 release file

0.0.12

1 release file

0.0.11

1 release file

0.0.10

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

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