Skip to content

Commit

Permalink
windoze support - hopefully
Browse files Browse the repository at this point in the history
  • Loading branch information
sierra-moxon committed Dec 2, 2023
1 parent 287e798 commit 0579243
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/check-dependencies.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# Built from:
# https://docs.github.com/en/actions/guides/building-and-testing-python
# https://github.com/actions/setup-python/

name: Build and test linkml-runtime
name: Build and test linkml-runtime package dependencies

on: [pull_request]

Expand Down Expand Up @@ -50,10 +46,17 @@ jobs:

# this step we remove and rebuild the poetry.lock file to ensure that the tests that follow can be run
# with the latest dependencies
- name: Install dependencies
run: |
rm -rf poetry.lock
poetry install

#----------------------------------------------
# Remove and Rebuild the poetry.lock File
#----------------------------------------------
- name: Remove poetry.lock (Unix)
if: runner.os != 'Windows'
run: rm -rf poetry.lock

- name: Remove poetry.lock (Windows)
if: runner.os == 'Windows'
run: Remove-Item poetry.lock -Force

- name: Run tests
run: poetry run python -m unittest discover
3 changes: 2 additions & 1 deletion linkml_runtime/loaders/yaml_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from linkml_runtime.utils.yamlutils import YAMLRoot, DupCheckYamlLoader
from pydantic import BaseModel


class YAMLLoader(Loader):
"""
A Loader that is capable of instantiating LinkML data objects from a YAML file
Expand All @@ -34,7 +35,7 @@ def load_as_dict(self,

def load_any(self,
source: Union[str, dict, TextIO],
target_class: Union[Type[YAMLRoot],Type[BaseModel]],
target_class: Union[Type[YAMLRoot], Type[BaseModel]],
*, base_dir: Optional[str] = None,
metadata: Optional[FileInfo] = None, **_) -> Union[YAMLRoot, List[YAMLRoot]]:
data_as_dict = self.load_as_dict(source, base_dir=base_dir, metadata=metadata)
Expand Down

0 comments on commit 0579243

Please sign in to comment.