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>)[source]¶
Bases:
objectInputs for several species with one writer and one specification.
- bundles: list[InputBundle]¶
- exception vibesketch.inputs.registry.UnknownReference(kind, identifier)[source]¶
Bases:
KeyErrorThe document has no job or species with that id.
- exception vibesketch.inputs.registry.UnknownWriter(name)[source]¶
Bases:
LookupErrorNo writer is registered under that name.
- Parameters:
name (str)
- Return type:
None
- vibesketch.inputs.registry.get_writer(name)[source]¶
The writer registered as
name; raisesUnknownWriter.- Parameters:
name (str)
- Return type:
- vibesketch.inputs.registry.register(writer, *, replace=False)[source]¶
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)[source]¶
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)[source]¶
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.