Returns dataset metadata loaded from files in pkg.
(pkg_path: epath.Path)
| 84 | |
| 85 | @functools.lru_cache(maxsize=256) |
| 86 | def load(pkg_path: epath.Path) -> DatasetMetadata: |
| 87 | """Returns dataset metadata loaded from files in pkg.""" |
| 88 | raw_metadata = _read_files(pkg_path) |
| 89 | tags = _get_tags(raw_metadata.get(TAGS_FILENAME, "")) |
| 90 | return DatasetMetadata( |
| 91 | description=raw_metadata.get(DESCRIPTIONS_FILENAME, None), |
| 92 | citation=raw_metadata.get(CITATIONS_FILENAME, None), |
| 93 | tags=tags, |
| 94 | ) |
| 95 | |
| 96 | |
| 97 | def _read_files(path: epath.Path) -> dict[str, str]: |
nothing calls this directly
no test coverage detected