vibesketch.inputs.registry¶
The registry of input writers, and the one call that runs them.
Functions
|
The writer registered as |
|
Make |
|
Write the input for one job of |
|
The inputs for |
|
Every registered writer, by name. |
Classes
|
Inputs for several species with one writer and one specification. |
Exceptions
|
The document has no job or species with that id. |
|
No writer is registered under that name. |
- class vibesketch.inputs.registry.Batch(bundles=<factory>, refused=<factory>)¶
Bases:
objectInputs for several species with one writer and one specification.
- bundles: list[InputBundle]¶
- exception vibesketch.inputs.registry.UnknownReference(kind, identifier)¶
Bases:
KeyErrorThe document has no job or species with that id.
- exception vibesketch.inputs.registry.UnknownWriter(name)¶
Bases:
LookupErrorNo writer is registered under that name.
- Parameters:
name (str)
- Return type:
None
- vibesketch.inputs.registry.get_writer(name)¶
The writer registered as
name; raisesUnknownWriter.- Parameters:
name (str)
- Return type:
- vibesketch.inputs.registry.register(writer, *, replace=False)¶
Make
writeravailable underwriter.name.- Parameters:
writer (InputWriter)
replace (bool)
- Return type:
None
- vibesketch.inputs.registry.write_input(document, *, job=None, species=None, program=None, spec=None)¶
Write the input for one job of
document.Name a job by its id, or give a species id and a program (with an optional specification; the default is the geometry only). Raises
WriterRefusalwhen the writer cannot express the request,UnknownWriterfor an unknown program, andUnknownReferencefor an id the document does not have.
- vibesketch.inputs.registry.write_inputs(document, *, program, spec, species=None)¶
The inputs for
species(default: every species) with one writer.A species the writer refuses is listed in
Batch.refusedwith the reasons, and the others are still written; a proton in a mechanism should not stop the rest of it. RaisesUnknownWriterfor an unknown program andUnknownReferencefor an unknown species id.
- vibesketch.inputs.registry.writers()¶
Every registered writer, by name.
- Return type: