control_context
trestle.core.control_context
¤
Provide a context for control operations.
Attributes¤
Classes¤
ContextPurpose
¤
Bases: Enum
Specify the modality of the control markdown.
Source code in trestle/core/control_context.py
29 30 31 32 33 34 35 |
|
ControlContext
dataclass
¤
Class encapsulating control markdown usage.
Source code in trestle/core/control_context.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
|
Attributes¤
allowed_sections: Optional[List[str]] = None
class-attribute
instance-attribute
¤
cli_yaml_header: Optional[Dict[Any, Any]] = None
class-attribute
instance-attribute
¤
comp_def: Optional[comp.ComponentDefinition] = None
class-attribute
instance-attribute
¤
comp_def_name_list: Optional[List[str]] = None
class-attribute
instance-attribute
¤
comp_dict: Optional[CompDict] = None
class-attribute
instance-attribute
¤
comp_name: Optional[str] = None
class-attribute
instance-attribute
¤
component: Optional[comp.DefinedComponent] = None
class-attribute
instance-attribute
¤
control_implementation: Optional[comp.ControlImplementation] = None
class-attribute
instance-attribute
¤
include_all_parts: bool
instance-attribute
¤
inherited_props: Optional[Dict[str, Any]] = None
class-attribute
instance-attribute
¤
md_root: pathlib.Path
instance-attribute
¤
merged_header: Optional[Dict[str, Any]] = None
class-attribute
instance-attribute
¤
overwrite_header_values: bool
instance-attribute
¤
profile: Optional[prof.Profile] = None
class-attribute
instance-attribute
¤
prompt_responses: bool
instance-attribute
¤
purpose: ContextPurpose
instance-attribute
¤
required_sections: Optional[List[str]] = None
class-attribute
instance-attribute
¤
rules_dict: Optional[Dict[str, Dict[str, Any]]] = None
class-attribute
instance-attribute
¤
rules_params_dict: Optional[Dict[str, Dict[str, Any]]] = None
class-attribute
instance-attribute
¤
sections_dict: Optional[Dict[str, str]] = None
class-attribute
instance-attribute
¤
set_parameters_flag: bool
instance-attribute
¤
to_markdown: bool
instance-attribute
¤
trestle_root: pathlib.Path
instance-attribute
¤
uri_name_map: Optional[Dict[str, str]] = None
class-attribute
instance-attribute
¤
Functions¤
__init__(purpose, to_markdown, trestle_root, md_root, prompt_responses, include_all_parts, overwrite_header_values, set_parameters_flag, cli_yaml_header=None, sections_dict=None, profile=None, required_sections=None, allowed_sections=None, comp_def=None, comp_name=None, component=None, comp_def_name_list=None, inherited_props=None, rules_dict=None, rules_params_dict=None, control_implementation=None, uri_name_map=None, comp_dict=None, merged_header=None)
¤
clone(context)
classmethod
¤
Create a deep clone of the context without duplicating large objects.
Source code in trestle/core/control_context.py
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
|
generate(purpose, to_markdown, trestle_root, md_root, prompt_responses=False, include_all_parts=False, overwrite_header_values=False, set_parameters_flag=False, cli_yaml_header=None, sections_dict=None, profile=None, required_sections=None, allowed_sections=None, comp_def=None, comp_name=None, component=None, comp_def_name_list=None, inherited_props=None, rules_dict=None, rules_params_dict=None, control_implementation=None, uri_name_map=None, comp_dict=None, merged_header=None)
classmethod
¤
Generate control context of the needed type.
Source code in trestle/core/control_context.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|
Functions¤
handler: python