(infile, relroot)
| 94 | |
| 95 | |
| 96 | def _iter_ignored(infile, relroot): |
| 97 | if relroot and relroot is not fsutil.USE_CWD: |
| 98 | relroot = os.path.abspath(relroot) |
| 99 | bogus = {_tables.EMPTY, _tables.UNKNOWN} |
| 100 | for row in _tables.read_table(infile, IGNORED_HEADER, sep='\t'): |
| 101 | *varidinfo, reason = row |
| 102 | if _tables.EMPTY in varidinfo or _tables.UNKNOWN in varidinfo: |
| 103 | varidinfo = tuple(None if v in bogus else v |
| 104 | for v in varidinfo) |
| 105 | if reason in bogus: |
| 106 | reason = None |
| 107 | try: |
| 108 | varid = _info.DeclID.from_row(varidinfo) |
| 109 | except BaseException as e: |
| 110 | e.add_note(f"Error occurred when processing row {varidinfo} in {infile}.") |
| 111 | e.add_note(f"Could it be that you added a row which is not tab-delimited?") |
| 112 | raise e |
| 113 | varid = varid.fix_filename(relroot, formatted=False, fixroot=False) |
| 114 | yield varid, reason |
| 115 | |
| 116 | |
| 117 | def write_ignored(variables, outfile, relroot=fsutil.USE_CWD): |
no test coverage detected
searching dependent graphs…