Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GHA: Run tests on windows-latest, macos-latest, ubuntu-latest #91

Merged
merged 26 commits into from
Nov 29, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
..
  • Loading branch information
dweindl committed Nov 29, 2021
commit 425f64163382d5a274deaab9445eeb5668e0aef4
10 changes: 4 additions & 6 deletions petab/problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ def from_yaml(yaml_config: Union[Dict, Path, str]) -> 'Problem':
print(path_url)
if not path_url.scheme or \
(path_url.scheme != 'file' and not path_url.netloc):
path_prefix = os.path.dirname(yaml_config)
get_path = lambda filename: \
f"{path_prefix}{os.sep}{filename}" # noqa: E731
else:
# extract parent path from URL
parent_path = str(PurePosixPath(
unquote(urlparse(yaml_config).path)).parent)
Expand All @@ -182,12 +186,6 @@ def from_yaml(yaml_config: Union[Dict, Path, str]) -> 'Problem':
# need "/" on windows, not "\"
get_path = lambda filename: \
f"{path_prefix}/{filename}" # noqa: E731

else:
path_prefix = os.path.dirname(yaml_config)
get_path = lambda filename: \
f"{path_prefix}{os.sep}{filename}" # noqa: E731

yaml_config = yaml.load_yaml(yaml_config)
else:
get_path = lambda filename: filename # noqa: E731
Expand Down