ts_ids_core.mapping_table.locate module¶
- class Pattern(name: str, regex: str)[source]¶
Bases:
objectDataclass to store a pattern’s name and regex
- get_field_paths(schema: dict, path: str = '') List[str][source]¶
Function for Depth First traversal of the dereferenced IDS dictionary
- get_header_line_index(markdown_lines: List[str], section_heading: str) int[source]¶
Find the index of a table header line in a list of lines
- Arguments:
markdown_lines – List of lines to look in heading – The heading of the section containing the table
- get_line_index_with_pattern(pattern: Pattern, lines: List[str]) int[source]¶
Find a line matching a pattern in a list of lines
- Arguments:
pattern – Pattern instance lines – List of lines to look in
- Raises:
MissingLineError: could not find a line which matches the pattern