vibe-sketcherDocumentation

vibesketcher.server.porosity

REST routes for probe-defined porosity plans and the reference estimate (#206).

plan validates a plan and returns the planning record with its refusals; estimate runs the bounded reference geometric estimate; psd-csv, psd-figure and handoff write the source-linked CSV, the PSD figure and the Viewer handoff record. These read; none changes a document.

store runs the estimate and attaches it to its structure as one edit checked against the document revision; undo removes the last stored estimate while the structure is unchanged. stored/{structure} lists the stored estimates marked stale or current, and table/{structure} writes the publication table (CSV, SVG or TeX) of a current stored estimate. Refusals are 422 with errors and stable codes; a revision conflict or a stale estimate is 409, a structure without stored estimates 404.

Functions

router(store)

Classes

FigureRequest(*, plan[, options, format, dpi])

HandoffRequest(*, plan[, files])

PlanRequest(*, plan)

StoreRequest(*[, actor, client, estimate_id])

UndoRequest(*[, actor, client])

class vibesketcher.server.porosity.PlanRequest(*, plan)[source]

Bases: BaseModel

Parameters:

plan (dict[str, Any])

model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

plan: dict[str, Any]
class vibesketcher.server.porosity.FigureRequest(*, plan, options=<factory>, format='svg', dpi=300)[source]

Bases: BaseModel

Parameters:
model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

plan: dict[str, Any]
options: dict[str, Any]
format: Literal['svg', 'pdf', 'png']
dpi: int
class vibesketcher.server.porosity.HandoffRequest(*, plan, files=<factory>)[source]

Bases: BaseModel

Parameters:
model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

plan: dict[str, Any]
files: dict[str, str]

Written file names and their SHA-256, recorded in the handoff as given.

class vibesketcher.server.porosity.StoreRequest(*, actor='agent', client='rest', revision, plan, estimate_id=None)[source]

Bases: RevisionRequest

Parameters:
  • actor (Literal['human', 'agent', 'system'])

  • client (Annotated[str, _PydanticGeneralMetadata(pattern='^[a-z0-9][a-z0-9_.:+-]{0,63}$')])

  • revision (int)

  • plan (dict[str, Any])

  • estimate_id (Annotated[str | None, MaxLen(max_length=40)])

plan: dict[str, Any]
estimate_id: str | None

The stored estimate’s id; porosity-N when left out.

model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class vibesketcher.server.porosity.UndoRequest(*, actor='agent', client='rest', revision, structure)[source]

Bases: RevisionRequest

Parameters:
  • actor (Literal['human', 'agent', 'system'])

  • client (Annotated[str, _PydanticGeneralMetadata(pattern='^[a-z0-9][a-z0-9_.:+-]{0,63}$')])

  • revision (int)

  • structure (Annotated[str, MinLen(min_length=1), MaxLen(max_length=64)])

structure: str
model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

vibesketcher.server.porosity.router(store)[source]
Parameters:

store (Store)

Return type:

APIRouter