Skip to content

Commit

Permalink
Merge pull request #320 from sneakers-the-rat/fix-linkml-files-uris
Browse files Browse the repository at this point in the history
Correct `linkml_files.URL_FOR` - add URL resolutiontests
  • Loading branch information
cmungall authored Jun 14, 2024
2 parents 49aecb2 + df1a56e commit 34a30ee
Show file tree
Hide file tree
Showing 6 changed files with 157 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
#----------------------------------------------
- name: Generate coverage results
run: |
poetry run coverage run -m unittest discover
poetry run coverage run -m pytest
poetry run coverage xml
poetry run coverage report -m
Expand Down
3 changes: 2 additions & 1 deletion linkml_runtime/linkml_model/linkml_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ def _build_loc(base: str, source: Source, fmt: Format) -> str:

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


def LOCAL_PATH_FOR(source: Source, fmt: Format) -> str:
Expand Down
Loading

0 comments on commit 34a30ee

Please sign in to comment.