Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions R/.Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
^renv$
^renv\.lock$
^LICENSE\.md$
^Dockerfile
4 changes: 2 additions & 2 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ dependencies = [
# docker
"docker",
]
version = "0.1.0"
version = "0.1.1"

[project.optional-dependencies]
dev = [
Expand Down Expand Up @@ -165,4 +165,4 @@ parallel = true
omit = ["tests/*"]

[tool.coverage.paths]
source = ["src"]
source = ["src"]
2 changes: 1 addition & 1 deletion python/src/remotebmi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
from remotebmi.client.client import RemoteBmiClient
from remotebmi.client.docker import BmiClientDocker

__all__ = ["RemoteBmiClient", "BmiClientApptainer", "BmiClientDocker"]
__all__ = ["BmiClientApptainer", "BmiClientDocker", "RemoteBmiClient"]
4 changes: 3 additions & 1 deletion python/src/remotebmi/client/apptainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__(
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion python/src/remotebmi/client/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion python/src/remotebmi/server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
5 changes: 3 additions & 2 deletions python/src/remotebmi/server/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down
Loading