Catalog PyPI
Back to packageRELEASE DETAILS

0.1.6

PyPI

acellera-pmmanifest

Generate PlayMolecule v2 app manifests (JSON Schema + uiSchema) from typed Python function signatures, with a live RJSF GUI preview.

Published20 Aug 2026
Direct dependencies1
Transitive dependenciesNot calculated

README

Version 0.1.6 documentation

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).

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 1

Native requirements
1 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
pydantic
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pydantic>=2.7runtime

Distribution files

2 collected
acellera_pmmanifest-0.1.6-py3-none-any.whl

bdist_wheel · 23.15 KB · Python py3

Source file
acellera_pmmanifest-0.1.6.tar.gz

sdist · 21.81 KB · Python source

Source file

Repository

PENDING
acellera/pmmanifest

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:08 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:7f650238bc3c5bf41804c4e44a0e90f70db5a75108a7b2a4af122ceb564a2f7f

Other collected versions

View all collected versions →