Skip to content

Commit 34a30ee

Browse files
authored
Merge pull request linkml#320 from sneakers-the-rat/fix-linkml-files-uris
Correct `linkml_files.URL_FOR` - add URL resolutiontests
2 parents 49aecb2 + df1a56e commit 34a30ee

File tree

6 files changed

+157
-53
lines changed

6 files changed

+157
-53
lines changed

.github/workflows/main.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
#----------------------------------------------
5151
- name: Generate coverage results
5252
run: |
53-
poetry run coverage run -m unittest discover
53+
poetry run coverage run -m pytest
5454
poetry run coverage xml
5555
poetry run coverage report -m
5656

linkml_runtime/linkml_model/linkml_files.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ def _build_loc(base: str, source: Source, fmt: Format) -> str:
143143

144144
def URL_FOR(source: Source, fmt: Format) -> str:
145145
""" Return the URL to retrieve source in format """
146-
return f"{LINKML_URL_BASE}{source.value}.{fmt.value}"
146+
fmt_path: FormatPath = _Path.get(fmt.name)
147+
return f"{LINKML_URL_BASE}{source.value}.{fmt_path.extension}"
147148

148149

149150
def LOCAL_PATH_FOR(source: Source, fmt: Format) -> str:

0 commit comments

Comments
 (0)