diff --git a/nwb_linkml/src/nwb_linkml/providers/__init__.py b/nwb_linkml/src/nwb_linkml/providers/__init__.py index 700db3a..c1ca6d5 100644 --- a/nwb_linkml/src/nwb_linkml/providers/__init__.py +++ b/nwb_linkml/src/nwb_linkml/providers/__init__.py @@ -18,6 +18,7 @@ for its domain. - so **providers** are the things that manage the multistage build process given some cache of the stages so that you can go like "gimme model i want my model" and you will probably get it. """ + # ruff: noqa: I001 - import order necessary to avoid circular imports :) from nwb_linkml.providers.provider import Provider from nwb_linkml.providers.linkml import LinkMLProvider diff --git a/nwb_linkml/src/nwb_linkml/providers/linkml.py b/nwb_linkml/src/nwb_linkml/providers/linkml.py index 2c5db58..831bd2c 100644 --- a/nwb_linkml/src/nwb_linkml/providers/linkml.py +++ b/nwb_linkml/src/nwb_linkml/providers/linkml.py @@ -1,3 +1,7 @@ +""" +Provider for LinkML schema built from NWB schema +""" + import shutil from pathlib import Path from typing import Dict, Optional, TypedDict diff --git a/nwb_linkml/src/nwb_linkml/providers/provider.py b/nwb_linkml/src/nwb_linkml/providers/provider.py index 6d01c3c..06a6e40 100644 --- a/nwb_linkml/src/nwb_linkml/providers/provider.py +++ b/nwb_linkml/src/nwb_linkml/providers/provider.py @@ -1,3 +1,7 @@ +""" +Base provider class +""" + import importlib import os from abc import ABC, abstractmethod @@ -116,6 +120,7 @@ class Provider(ABC): Dictionary mapping a namespace to a list of built versions """ from nwb_linkml.providers import LinkMLProvider + versions = {} # type: Dict[str, List[Path]] # first get any builtins provided by the package itself @@ -159,5 +164,3 @@ class Provider(ABC): for k, v_paths in versions.items() } return res - - diff --git a/nwb_linkml/src/nwb_linkml/providers/pydantic.py b/nwb_linkml/src/nwb_linkml/providers/pydantic.py index c6a2130..ae76f2b 100644 --- a/nwb_linkml/src/nwb_linkml/providers/pydantic.py +++ b/nwb_linkml/src/nwb_linkml/providers/pydantic.py @@ -1,6 +1,7 @@ """ Provider for pydantic models. """ + import importlib import sys from importlib.abc import MetaPathFinder @@ -100,8 +101,8 @@ class PydanticProvider(Provider): # we're given a name of a namespace to build name = namespace path = ( - LinkMLProvider(path=self.config.cache_dir).namespace_path(namespace, version) - / "namespace.yaml" + LinkMLProvider(path=self.config.cache_dir).namespace_path(namespace, version) + / "namespace.yaml" ) if version is None: # Get the most recently built version @@ -201,7 +202,7 @@ class PydanticProvider(Provider): return serialized - def _make_inits(self, out_file: Path): + def _make_inits(self, out_file: Path) -> None: """ Make __init__.py files for the directory a model is output to and its immediate parent. (ig this could be generalized in depth but lets not go nuts in here with the nesting)