Get case path from name
(
subdir_name: str, name: str, data: bool = True, suffix: str = PYTHON_SUFFIX
)
| 154 | |
| 155 | |
| 156 | def get_case_path( |
| 157 | subdir_name: str, name: str, data: bool = True, suffix: str = PYTHON_SUFFIX |
| 158 | ) -> Path: |
| 159 | """Get case path from name""" |
| 160 | case_path = get_base_dir(data) / subdir_name / name |
| 161 | if not name.endswith(ALLOWED_SUFFIXES): |
| 162 | case_path = case_path.with_suffix(suffix) |
| 163 | assert case_path.is_file(), f"{case_path} is not a file." |
| 164 | return case_path |
| 165 | |
| 166 | |
| 167 | def read_data(subdir_name: str, name: str, data: bool = True) -> Tuple[str, str]: |