Reads the crosswalk of one of the mappings, checks its integrity, and returns its list of terms, in the same order as the ones in properties_description.csv.
(prop_desc, filename)
| 34 | return list(zip(*cols)) |
| 35 | |
| 36 | def read_terms(prop_desc, filename): |
| 37 | """Reads the crosswalk of one of the mappings, checks its integrity, |
| 38 | and returns its list of terms, in the same order as the ones |
| 39 | in properties_description.csv.""" |
| 40 | |
| 41 | # Read rows from a translation table in crosswalks. |
| 42 | with open(os.path.join(SOURCE_DIR, filename)) as fd: |
| 43 | rows = list(csv.reader(fd)) |
| 44 | |
| 45 | # Split the two rows of the translation table. |
| 46 | (codemeta_names, crosswalk_names) = columns_from_rows(rows) |
| 47 | |
| 48 | # Check the names match, in order to avoid messing the aggregate |
| 49 | # table if there was a mistake in this table. |
| 50 | check_property_names_match(filename, prop_desc[1], codemeta_names) |
| 51 | |
| 52 | return crosswalk_names |
| 53 | |
| 54 | def list_crosswalks(): |
| 55 | """Returns the list of crosswalk files by auto-discovering them from the |
no test coverage detected