yaml_tools.oscal module
The main init, run, and self-test functions for oscal extract.
- yaml_tools.oscal.csv_append_id_data(in_ids: List, prog_opts: Dict, uargs: Munch) None [source]
Append/update column data using ID sets and write a new csv file using the given filename with
.modified
appended to the filename stem.
- yaml_tools.oscal.csv_row_match(in_ids: List, ctl: List) List [source]
Extracted ctl munging from
csv_append_id_data
loop for testing.- Param:
ctl
- Return ctl:
munged ctl
- yaml_tools.oscal.id_set_match(in_ids: List, id_q: Deque, uargs: Munch) Tuple[List, List] [source]
Quick set match analysis of ID sets.
- yaml_tools.oscal.load_input_data(filepath: Path, prog_opts: Dict, use_ssg: bool = False, debug: bool = False) Tuple[List, Deque, Deque] [source]
Find and gather the inputs, ie, content file(s) and user control IDs, into a tuple of lists (id_list, file_tuple_list). Load up the queues and return a tuple of both queues and the list of normalized user IDs from
filepath
.
- yaml_tools.oscal.main(argv=None)[source]
Collect and process command options/arguments and then process data.
- yaml_tools.oscal.munge_file(filepath: Path, prog_opts: Dict, uargs: Munch)[source]
Munge a CSV file by appending columns.