Project materialization tools for instantiating polynomial-1 organized factor sets.
functools
typing0
ModuleType0
dataclass0
Cell0
Segment0
Paragraph0
render0
files0
sequence_project_declaration0
types0
_ktprotocol0
_ktprotocol(iri)
_poly_factor_header0
_poly_factor_header = _ktprotocol("http://if.fault.io/project/factor")
_literal10%
_literal(text)
_ref40%
_ref(format_id, *text)
sequence_format_declarations0
sequence_format_declarations(formats)
factors/polynomial-1 .format serialization
Composition0
The core data for composing a factor.
CompositionProperties
- sources
A sequence of pairs defining the source name and the source content.
For polynomial-1, the source name is the extension that will be appended to factor path if sources is a fault.context.types.Cell instance.
Compositiontype0str
type: str = None
Compositionrequirements0[str]
requirements: [str] = ()
Compositionsources0typing.Sequence[typing.Tuple[str, typing.Union[str, bytes, files.Path, ModuleType]]]
sources: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes, files.Path, ModuleType]]] = ()
@classmethod
Compositionindirect0
indirect(Class, extension, source, type)
Define an indirectly typed factor's composition.
CompositionindirectParameters
typeAn optional factor type string. This is ignored by plan as this is composing an indirectly typed factor.
Compositionexplicit0
explicit(Class, type, requirements, sources)
Define an explicitly typed factor's composition.
Equivalent to the default constructor with the exception that requirements and sources are copied into a new list.
CompositionexplicitParameters
Parameters0
The necessary data for instantiating a project on the local system.
ParametersProperties
- information
The fault.project.types.Information instance defining the project's identity.
Parametersinformation0types.Information
information: (types.Information) = None
Parametersformats0object
formats: (object) = None
Parametersfactors0typing.Sequence[typing.Tuple[types.FactorPath, Composition]]
factors: (typing.Sequence[typing.Tuple[types.FactorPath, Composition]]) = ()
Parametersextensions0types.Extensions
extensions: (types.Extensions) = None
@classmethod
Parametersdefine285%
define(Class, information, formats, soles, sets, icon, synopsis)
Create a parameter set for project instantiation applying the proper types to factor entries, and translating factor types to file extensions for defining soles.
ParametersdefineParameters
plan389%
plan(info, formats, factors)
Generate the filesystem paths paired with the data that should be placed into that file relative to the project directory being materialized.
materialize0
materialize(route, plans)
Create a Project instance using the filesystem API's provided by route from the instructions produced by the given plans.
| WARNING | |
Plan entries referring to files will cause the file content to be loaded entirely into memory. Instantiating projects with large resources may require a side channel in order to achieve reasonable memory usage. |
materializeParameters
plansAn iterable of pairs where the first item is the segment, relative path, and the second is either the data to be stored or a fault.system.files.Path instance referring to the data to be stored.
instantiate0
instantiate(project, route, *dimensions)
Materialize the plan of the given project using the route as the root directory of the project.