From a360d988343c290141c371991a98f6cd07be785a Mon Sep 17 00:00:00 2001 From: Wei Ouyang Date: Sat, 2 Mar 2024 18:20:55 +0100 Subject: [PATCH] Rename to bioimageio.engine --- .github/workflows/build.yml | 2 +- {bioengine => bioimageio/engine}/__init__.py | 2 +- {bioengine => bioimageio/engine}/__main__.py | 4 ++-- .../engine}/app_loader.py | 2 +- docs/README.md | 2 +- hypha-services-manifest.yaml | 21 ------------------- pyproject.toml | 6 +++--- 7 files changed, 9 insertions(+), 30 deletions(-) rename {bioengine => bioimageio/engine}/__init__.py (95%) rename {bioengine => bioimageio/engine}/__main__.py (93%) rename {bioengine => bioimageio/engine}/app_loader.py (94%) delete mode 100644 hypha-services-manifest.yaml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eacef0e..ab92337 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,4 +28,4 @@ jobs: python -m pip install --upgrade pip python -m pip install -r requirements.txt - name: Test server - run: python -m bioengine start-server --host=0.0.0.0 --port=9000 & wget http://127.0.0.1:9000/public/services/bioengine + run: python -m bioimageio.engine start-server --host=0.0.0.0 --port=9000 & wget http://127.0.0.1:9000/public/services/bioengine diff --git a/bioengine/__init__.py b/bioimageio/engine/__init__.py similarity index 95% rename from bioengine/__init__.py rename to bioimageio/engine/__init__.py index b478f79..4bb6e1c 100644 --- a/bioengine/__init__.py +++ b/bioimageio/engine/__init__.py @@ -1,5 +1,5 @@ import asyncio -from bioengine.app_loader import load_apps +from bioimageio.engine.app_loader import load_apps import logging logger = logging.getLogger(__name__) diff --git a/bioengine/__main__.py b/bioimageio/engine/__main__.py similarity index 93% rename from bioengine/__main__.py rename to bioimageio/engine/__main__.py index 6f51a0a..01fdf20 100644 --- a/bioengine/__main__.py +++ b/bioimageio/engine/__main__.py @@ -14,12 +14,12 @@ def start_server(args): f"--host={args.host}", f"--port={args.port}", f"--public-base-url={args.public_base_url}", - "--startup-functions=bioengine:register_bioengine_apps" + "--startup-functions=bioimageio.engine:register_bioengine_apps" ] subprocess.run(command) def connect_server(args): - from bioengine import connect_server + from engine import connect_server server_url = args.server_url loop = asyncio.get_event_loop() loop.create_task(connect_server(server_url)) diff --git a/bioengine/app_loader.py b/bioimageio/engine/app_loader.py similarity index 94% rename from bioengine/app_loader.py rename to bioimageio/engine/app_loader.py index 99e0965..f6375f5 100644 --- a/bioengine/app_loader.py +++ b/bioimageio/engine/app_loader.py @@ -26,7 +26,7 @@ async def run(self, server): assert self.entrypoint file_path = Path(__file__).parent.parent / "apps" / self.id / self.entrypoint - module_name = 'bioengine.apps.' + self.id.replace('-', '_') + module_name = 'bioimageio.engine.apps.' + self.id.replace('-', '_') spec = importlib.util.spec_from_file_location(module_name, file_path) module = importlib.util.module_from_spec(spec) spec.loader.exec_module(module) diff --git a/docs/README.md b/docs/README.md index b6b7ec7..731d2ab 100644 --- a/docs/README.md +++ b/docs/README.md @@ -13,7 +13,7 @@ BioEngine stands as a beacon for developers and researchers alike, providing an ## Installation ```bash -pip install bioengine +pip install bioimageio.engine ``` ## Using the BioEngine diff --git a/hypha-services-manifest.yaml b/hypha-services-manifest.yaml deleted file mode 100644 index 70ac84a..0000000 --- a/hypha-services-manifest.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: BioEngine Services -type: collection -description: A collection of BioEngine services -tags: [] -version: 0.2.2 -authors: - - name: BioImgae.IO Team -documentation: README.md -git_repo: https://github.com/bioimage-io/bioengine -icon: https://raw.githubusercontent.com/bioimage-io/bioimage.io/main/public/static/icons/android-chrome-384x384.png -cite: - - text: todo cite BioImageIO - url: https://bioimage.io -format_version: 0.2.1 -collection: - - name: Cellpose - id: cellpose - description: Cellpose is a generalist algorithm for cell and nucleus segmentation - - name: http-file-server - id: http-file-server - description: A simple http file server \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index dfc52a2..2c3635f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,10 +2,10 @@ requires = ["setuptools", "wheel"] [project] -name = "bioengine" +name = "bioimageio.engine" version = "0.1.0" readme = "README.md" -description = "Hypha Services for the BioEngine" +description = "BioEngine: Your AI Engine for Advanced BioImage Analysis in Containers" dependencies = [ "imjoy-rpc", "PyYAML", @@ -17,5 +17,5 @@ dependencies = [ include-package-data = true [tool.setuptools.packages.find] -include = ["bioengine*"] +include = ["bioimageio*"] exclude = ["tests*", "scripts*"]