Extensible project protocol for filesystem directories.
typing
collections0
itertools0
functools0
Cell0
Segment
Selector0
files0
types0
default_image_segment0
default_image_segment = [['system', 'architecture'], []]
unknown_factor_type0
unknown_factor_type = types.Reference(
'http://if.fault.io/factors', types.factor@'meta.unknown',
'type', None
)
image_factor_type0
image_factor_type = types.Reference(
'http://if.fault.io/factors', types.factor@'meta.image',
'type', None
)
references_factor_type0
references_factor_type = types.Reference(
'http://if.fault.io/factors', types.factor@'meta.references',
'type', None
)
system_factor_type0
system_factor_type = types.Reference(
'http://if.fault.io/factors', types.factor@'system.references',
'type', None
)
load_formats0
load_formats(file)
factor_images30%
factor_images(project, factor)
Retrieve the set of images produced by the factor contained by project. A segment path is used to identify the factor in order to emphasize that a direct file path should not be used.
compose_image_path180%
compose_image_path(groups, default, variants, name, suffix)
Create a variant path (list of strings) according to the given groups and variants.
structure_factor_declaration0
structure_factor_declaration(text)
Split a .factor file into a type and symbol set pair.
parse_image_descriptor_1516%typing.Iterator[typing.Sequence[str]]
parse_image_descriptor_1(string)
Given the data from a fields.txt file located inside a factor image set directory, return an iterator producing sequences that detail the groupings used to designate the location of a variant.
Normally unused as the default groupings are encouraged.
parse_image_descriptor_1Parameters
stringstr
The text format is newline separated records consisting of whitespace separated fields. Each line containing fields designates a directory level that will contain the variants expressed on subsequent lines. The final record designating the variants used to specify the image file, often this should be "name".
No escaping mechanism is provided as the fields are required to be identifiers.
V10
polynomial-1 protocol implementation.
V1identifier0
identifier = 'polynomial-1'
V1FactorDeclarationSignal0
FactorDeclarationSignal = Segment.from_sequence(['.factor'])
V1FormatsProjectPath0
FormatsProjectPath = Segment.from_sequence(['.project', 'polynomial-1'])
V1configure0
configure(self, route)
Inherit information and configuration from a context project.
V1image450%Selector
image(self, route, variants, fp)
Retrieve the location of the factor's image for the given variants.
V1isource0
isource(self, route)
Determine if the route is a possible source file for a factor.
V1source_format_resolution0
source_format_resolution(self)
Construct a resolution (type) cache for the source extension map.
V1type_requirement_resolution50%
type_requirement_resolution()
Construct a resolution (type requirement) cache for the type requirements.
V1indirect_factor_records0
indirect_factor_records(self, typcache, paths)
Given an iterable of paths identifying Indirectly Typed Factors, resolve their type reference, factor type, and symbols using the given typcache.
V1collect_explicit_sources0
collect_explicit_sources(self, typcache, route)
Collect source files paired with their type reference for an Explicitly Typed Factor record.
V1iterfactors197%typing.Iterable[types.FactorType]
iterfactors(self, refer, route, rpath)
Query the project route for factor specifications contained within rpath.