diff --git a/R/.Rbuildignore b/R/.Rbuildignore index 295f897..2c1c468 100644 --- a/R/.Rbuildignore +++ b/R/.Rbuildignore @@ -1,2 +1,4 @@ +^renv$ +^renv\.lock$ ^LICENSE\.md$ ^Dockerfile diff --git a/python/pyproject.toml b/python/pyproject.toml index b4c4680..2c02c77 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -37,7 +37,7 @@ dependencies = [ # docker "docker", ] -version = "0.1.0" +version = "0.1.1" [project.optional-dependencies] dev = [ @@ -165,4 +165,4 @@ parallel = true omit = ["tests/*"] [tool.coverage.paths] -source = ["src"] \ No newline at end of file +source = ["src"] diff --git a/python/src/remotebmi/__init__.py b/python/src/remotebmi/__init__.py index 25c1140..06e468d 100644 --- a/python/src/remotebmi/__init__.py +++ b/python/src/remotebmi/__init__.py @@ -2,4 +2,4 @@ from remotebmi.client.client import RemoteBmiClient from remotebmi.client.docker import BmiClientDocker -__all__ = ["RemoteBmiClient", "BmiClientApptainer", "BmiClientDocker"] +__all__ = ["BmiClientApptainer", "BmiClientDocker", "RemoteBmiClient"] diff --git a/python/src/remotebmi/client/apptainer.py b/python/src/remotebmi/client/apptainer.py index 28d01d3..cc774cf 100644 --- a/python/src/remotebmi/client/apptainer.py +++ b/python/src/remotebmi/client/apptainer.py @@ -9,6 +9,8 @@ from remotebmi.client.client import RemoteBmiClient from remotebmi.client.utils import DeadContainerError, get_unique_port +logger = logging.getLogger(__name__) + class BmiClientApptainer(RemoteBmiClient): def __init__( @@ -44,7 +46,7 @@ def __init__( # Change into working directory args += ["--pwd", self.work_dir] args.append(image) - logging.info(f"Running {image} apptainer container on port {port}") + logger.info(f"Running {image} apptainer container on port {port}") if capture_logs: self.logfile = SpooledTemporaryFile( # noqa: SIM115 - file is closed in __del__ max_size=2**16, # keep until 65Kb in memory if bigger write to disk diff --git a/python/src/remotebmi/client/docker.py b/python/src/remotebmi/client/docker.py index 362cc9a..f799952 100644 --- a/python/src/remotebmi/client/docker.py +++ b/python/src/remotebmi/client/docker.py @@ -4,7 +4,7 @@ from posixpath import abspath import docker -from docker.models.containers import Container # noqa: TCH002 +from docker.models.containers import Container # noqa: TC002 from remotebmi.client.client import RemoteBmiClient from remotebmi.client.utils import DeadContainerError, get_unique_port, getuser diff --git a/python/src/remotebmi/server/__init__.py b/python/src/remotebmi/server/__init__.py index 472b8cf..43bb836 100644 --- a/python/src/remotebmi/server/__init__.py +++ b/python/src/remotebmi/server/__init__.py @@ -47,7 +47,7 @@ async def lifespan_handler(app: ConnexionMiddleware) -> AsyncIterator: # noqa: def main(**kwargs): # type: ignore[no-untyped-def] model = from_env() app = make_app(model) - port = int(environ.get("BMI_PORT", 50051)) + port = int(environ.get("BMI_PORT", "50051")) uvicorn.run(app, port=port, **kwargs) diff --git a/python/src/remotebmi/server/api.py b/python/src/remotebmi/server/api.py index fb6a42f..66b1778 100644 --- a/python/src/remotebmi/server/api.py +++ b/python/src/remotebmi/server/api.py @@ -41,8 +41,9 @@ def get_component_name() -> dict[str, str]: return {"name": model().get_component_name()} -def get_input_var_names() -> tuple[str, ...]: - return model().get_input_var_names() +def get_input_var_names() -> list[str]: + n = model().get_input_var_names() + return list(n) def get_output_var_names() -> list[str]: