trying to debug on CI by abusing warnings lol

This commit is contained in:
sneakers-the-rat 2023-10-11 21:38:29 -07:00
parent 3a426454c6
commit 282acc063e
2 changed files with 6 additions and 1 deletions

View file

@ -50,7 +50,7 @@ class Config(BaseSettings):
return v return v
@model_validator(mode='after') @model_validator(mode='after')
def folder_exists(self) -> 'Config': def folders_exist(self) -> 'Config':
for field, path in self.model_dump().items(): for field, path in self.model_dump().items():
if isinstance(path, Path): if isinstance(path, Path):
path.mkdir(exist_ok=True, parents=True) path.mkdir(exist_ok=True, parents=True)

View file

@ -16,6 +16,7 @@ from nwb_linkml.providers.schema import LinkMLProvider, PydanticProvider
import nwb_linkml import nwb_linkml
from nwb_linkml.maps.naming import version_module_case from nwb_linkml.maps.naming import version_module_case
from nwb_linkml.providers.git import DEFAULT_REPOS from nwb_linkml.providers.git import DEFAULT_REPOS
from nwb_linkml.adapters import NamespacesAdapter
CORE_MODULES = ( CORE_MODULES = (
@ -71,6 +72,10 @@ def test_linkml_build_from_yaml(tmp_output_dir):
files = [str(f) for f in list(ns_file.parent.glob('*.yaml'))] files = [str(f) for f in list(ns_file.parent.glob('*.yaml'))]
warnings.warn('\n'.join(files)) warnings.warn('\n'.join(files))
ns_adapter = NamespacesAdapter.from_yaml(ns_file)
warnings.warn(pformat(ns_adapter))
provider = LinkMLProvider(path=tmp_output_dir, allow_repo=False) provider = LinkMLProvider(path=tmp_output_dir, allow_repo=False)
res = provider.build_from_yaml(ns_file) res = provider.build_from_yaml(ns_file)