1- from pathlib import Path
1+ from pathlib import Path , PurePath
22from enum import Enum , auto
33from typing import Dict , Optional , Union , Tuple , NamedTuple
44from urllib .parse import urljoin
@@ -152,7 +152,7 @@ def LOCAL_PATH_FOR(source: Source, fmt: Format) -> str:
152152
153153
154154def GITHUB_IO_PATH_FOR (source : Source , fmt : Format , version = "latest" ) -> str :
155- path = '/' . join ([ version , 'linkml_model' , * _build_path (source , fmt )] )
155+ path = PurePath ( version , 'linkml_model' , * _build_path (source , fmt )). as_posix ( )
156156 return urljoin (GITHUB_IO_BASE , path )
157157
158158
@@ -178,7 +178,7 @@ def tag_to_commit(tag: str) -> str:
178178
179179 # Return the absolute latest entry for branch
180180 if release is ReleaseTag .LATEST or (release is ReleaseTag .CURRENT and branch != "main" ):
181- path = '/' . join ([ branch , 'linkml_model' , * _build_path (source , fmt )] )
181+ path = PurePath ( branch , 'linkml_model' , * _build_path (source , fmt )). as_posix ( )
182182 return urljoin (GITHUB_BASE , path )
183183
184184 # Return the latest published version
0 commit comments