Factored Projects data structures and types.
FactorType
Annotation signature for factor data produced by project protocols.
FactorType = tuple[
tuple[FactorPath, Reference], # Project relative path and type.
tuple[
Set[Reference], # Requirements
Iterable[tuple[Reference, Path]], # Format References and Sources
],
]
Mapping
Iterable
Set
dataclass0
tools0
Segment0
Path0
ignored0
ignored = {
'__pycache__',
'__f-int__',
'.f-int',
'.git',
'.svn',
'.hg',
'.darcs',
'.pijul',
}
@tools.struct()
Variants0
Factor image variant specification. A triple of contrived identifiers that represent a classification.
VariantsProperties
Variantsform0str
form:(str) = 'executable'
Variants__repr__20%
__repr__(self)
Variants__str__10%
__str__(self)
Variantsget150%str
get(self, key)
Variantsreform0
reform(self, rform)
Reconstruct the instance with the given rform as the new form value.
Format0
Source format structure holding the language and dialect.
Formatdialect0str
dialect:(str) = None
@classmethod
Formatfrom_string0
from_string()
Split the format identifier by the first . in string. Creates an instance using the first field as the language and second as the dialect. If there is no . or the dialect is an empty string, the dialect will be None,
FactorPath0
A fault.route.types.Segment identifying a factor.
The path is always relative; usually relative to either a product or project. Identifiers in the path exclude any filename extensions.
FactorPath__str__0
__str__(self)
FactorPath__repr__0
__repr__(self)
FactorPath__matmul__0
__matmul__(self, fpath)
Relative and absolute constructor.
factor0
factor = FactorPath(None, ())
@dataclass
FactorContextPaths0
File System Information regarding the context of a Factor.
This data structure is used to hold the set of directories related to an Archived Factor.
FactorContextPathsProperties
FactorContextPathsroot0Path
root: (Path) = None
FactorContextPathscontext0FactorPath
context: (FactorPath) = None
FactorContextPathsproject0Path
project: (Path) = None
@property
FactorContextPathsenclosure233%bool
Whether the original subject was referring to an enclosure.
FactorContextPathsselect40%
select(self, factor)
FactorContextPathsfactor20%
factor(self)
Construct a project factor path.
Information0
Project information structure usually extracted from project.txt files.
InformationProperties
Informationidentifier0str
identifier: (str) = None
Informationname0str
name: (str) = None
Informationauthority0str
authority: (str) = None
Informationcontact0str
contact: (str) = None
@dataclass
Extensions0
Project information extensions.
ExtensionsProperties
Extensionsicon0str
icon: (str) = None
Extensionssynopsis0str
synopsis: (str) = None
@tools.struct()
Reference0
A position independent reference to a required factor and the interpretation parameters needed to properly form the relationship for integration.
project and factor are the only required fields.
ReferenceProperties
- factor
The project relative path to the required factor. If empty, the reference is identifying the entire project.
- method
The type of connection that is expected to be formed between the requirement and the target factor being integrated.
- isolation
The specifier of a format, variant, or factor type.
For
typemethods, this is usually a reference to a language identifier. Forcontrol, it can be the specification of a feature's variant.When referring to normal requirements, this is always the factor type that should be used when integration is performed.
Referencemethod0str
method: (str) = None
Referenceisolation0str
isolation: (str) = None
Referenceisolate0
isolate(self, isolation)
Reconstruct the reference replacing its isolation field the given isolation.
Reference__str__175%
__str__(self)
Referenceformat0
Construct the Format instance representing the isolation.
Format instances are cached and repeat reads across references with the same isolation should normally return the same object.
Referencefrom_ri0
from_ri(Class, method, ri)
Create a reference from a resource indicator. Splits on the fragment and the final path segment.
FactorIsolationProtocol0
A project factor protocol.
FactorIsolationProtocol__init__0
__init__(self, parameters)
FactorIsolationProtocolinformation150%Information
information(self, route)
FactorIsolationProtocoliterfactors150%Iterable[FactorType]
iterfactors(self, route)
Protocol0
Protocol = FactorIsolationProtocol
ProtocolViolation0
The route was identified as not conforming to the protocol.
fpc0FactorPath
fpc(context, factorpath, root)
FactorPath instance cache for relative and absolute paths constructed from strings.
When factorpath has leading periods, ., the number of periods will select the ancestor of context to start the resulting FactorPath from.
fpcParameters
contextFactorPath
The relative position factorpath is to be interpreted from when leading periods are present.
factorpathstr
The string that is being interpreted to become a FactorPath instance.
rootThe absolute position that factorpath will extend given that it is not relative.