From 7861def5419a47afe069dfeb79607830d90acf38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mose=20M=C3=BCller?= Date: Wed, 2 Aug 2023 12:06:22 +0200 Subject: [PATCH] renaming pyDataInterface -> pyDataService --- frontend/package-lock.json | 4 ++-- frontend/package.json | 4 ++-- frontend/public/index.html | 4 ++-- pyproject.toml | 6 +++--- src/pyDataInterface/frontend/index.html | 1 - src/{pyDataInterface => pyDataService}/__init__.py | 0 src/{pyDataInterface => pyDataService}/client.py | 0 .../components/__init__.py | 0 .../components/number_slider.py | 0 src/{pyDataInterface => pyDataService}/config.py | 0 .../data_service/__init__.py | 0 .../data_service/abstract_service_classes.py | 2 +- .../data_service/callback_manager.py | 2 +- .../data_service/data_service.py | 4 ++-- .../data_service/data_service_list.py | 2 +- .../data_service/task_manager.py | 2 +- .../frontend/asset-manifest.json | 0 src/pyDataService/frontend/index.html | 1 + .../frontend/manifest.json | 0 src/{pyDataInterface => pyDataService}/frontend/robots.txt | 0 .../frontend/static/css/main.4da62354.css | 0 .../frontend/static/css/main.4da62354.css.map | 0 .../frontend/static/js/main.188dd6ca.js | 0 .../frontend/static/js/main.188dd6ca.js.LICENSE.txt | 0 .../frontend/static/js/main.188dd6ca.js.map | 0 src/{pyDataInterface => pyDataService}/server/__init__.py | 0 src/{pyDataInterface => pyDataService}/server/server.py | 6 +++--- src/{pyDataInterface => pyDataService}/server/web_server.py | 6 +++--- src/{pyDataInterface => pyDataService}/utils/__init__.py | 0 src/{pyDataInterface => pyDataService}/utils/helpers.py | 0 src/{pyDataInterface => pyDataService}/utils/warnings.py | 0 src/{pyDataInterface => pyDataService}/version.py | 0 tests/__init__.py | 4 ++-- tests/test_DataServiceList.py | 2 +- tests/test_DataService_attribute_callbacks.py | 2 +- tests/test_properties.py | 2 +- tests/test_warnings.py | 2 +- 37 files changed, 28 insertions(+), 28 deletions(-) delete mode 100644 src/pyDataInterface/frontend/index.html rename src/{pyDataInterface => pyDataService}/__init__.py (100%) rename src/{pyDataInterface => pyDataService}/client.py (100%) rename src/{pyDataInterface => pyDataService}/components/__init__.py (100%) rename src/{pyDataInterface => pyDataService}/components/number_slider.py (100%) rename src/{pyDataInterface => pyDataService}/config.py (100%) rename src/{pyDataInterface => pyDataService}/data_service/__init__.py (100%) rename src/{pyDataInterface => pyDataService}/data_service/abstract_service_classes.py (97%) rename src/{pyDataInterface => pyDataService}/data_service/callback_manager.py (99%) rename src/{pyDataInterface => pyDataService}/data_service/data_service.py (99%) rename src/{pyDataInterface => pyDataService}/data_service/data_service_list.py (98%) rename src/{pyDataInterface => pyDataService}/data_service/task_manager.py (99%) rename src/{pyDataInterface => pyDataService}/frontend/asset-manifest.json (100%) create mode 100644 src/pyDataService/frontend/index.html rename src/{pyDataInterface => pyDataService}/frontend/manifest.json (100%) rename src/{pyDataInterface => pyDataService}/frontend/robots.txt (100%) rename src/{pyDataInterface => pyDataService}/frontend/static/css/main.4da62354.css (100%) rename src/{pyDataInterface => pyDataService}/frontend/static/css/main.4da62354.css.map (100%) rename src/{pyDataInterface => pyDataService}/frontend/static/js/main.188dd6ca.js (100%) rename src/{pyDataInterface => pyDataService}/frontend/static/js/main.188dd6ca.js.LICENSE.txt (100%) rename src/{pyDataInterface => pyDataService}/frontend/static/js/main.188dd6ca.js.map (100%) rename src/{pyDataInterface => pyDataService}/server/__init__.py (100%) rename src/{pyDataInterface => pyDataService}/server/server.py (98%) rename src/{pyDataInterface => pyDataService}/server/web_server.py (96%) rename src/{pyDataInterface => pyDataService}/utils/__init__.py (100%) rename src/{pyDataInterface => pyDataService}/utils/helpers.py (100%) rename src/{pyDataInterface => pyDataService}/utils/warnings.py (100%) rename src/{pyDataInterface => pyDataService}/version.py (100%) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 16646dd..ead0db1 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,11 +1,11 @@ { - "name": "pydatainterface", + "name": "pyDataService", "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "pydatainterface", + "name": "pyDataService", "version": "0.1.0", "dependencies": { "@emotion/react": "^11.11.1", diff --git a/frontend/package.json b/frontend/package.json index 122ad24..3440877 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,5 +1,5 @@ { - "name": "pydatainterface", + "name": "pydataservice", "version": "0.1.0", "private": true, "dependencies": { @@ -20,7 +20,7 @@ }, "scripts": { "start": "NODE_ENV=development react-scripts start", - "build": "BUILD_PATH='../src/pyDataInterface/frontend' react-scripts build", + "build": "BUILD_PATH='../src/pyDataService/frontend' react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, diff --git a/frontend/public/index.html b/frontend/public/index.html index 7ed5ee9..ccd33b2 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -7,7 +7,7 @@ - pyDataInterface App + pyDataService App diff --git a/pyproject.toml b/pyproject.toml index 06a1eba..36f055d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,10 @@ [tool.poetry] -name = "pyDataInterface" +name = "pyDataService" version = "0.1.0" description = "" authors = ["Mose Mueller "] readme = "README.md" -packages = [{ include = "pyDataInterface", from = "src" }] +packages = [{ include = "pyDataService", from = "src" }] [tool.poetry.dependencies] @@ -39,7 +39,7 @@ requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" [tool.pyright] -include = ["src/pyDataInterface", "tests"] +include = ["src/pyDataService", "tests"] exclude = ["**/node_modules", "**/__pycache__", "docs", "frontend"] venvPath = "." venv = ".venv" diff --git a/src/pyDataInterface/frontend/index.html b/src/pyDataInterface/frontend/index.html deleted file mode 100644 index e3e4d63..0000000 --- a/src/pyDataInterface/frontend/index.html +++ /dev/null @@ -1 +0,0 @@ -pyDataInterface App
\ No newline at end of file diff --git a/src/pyDataInterface/__init__.py b/src/pyDataService/__init__.py similarity index 100% rename from src/pyDataInterface/__init__.py rename to src/pyDataService/__init__.py diff --git a/src/pyDataInterface/client.py b/src/pyDataService/client.py similarity index 100% rename from src/pyDataInterface/client.py rename to src/pyDataService/client.py diff --git a/src/pyDataInterface/components/__init__.py b/src/pyDataService/components/__init__.py similarity index 100% rename from src/pyDataInterface/components/__init__.py rename to src/pyDataService/components/__init__.py diff --git a/src/pyDataInterface/components/number_slider.py b/src/pyDataService/components/number_slider.py similarity index 100% rename from src/pyDataInterface/components/number_slider.py rename to src/pyDataService/components/number_slider.py diff --git a/src/pyDataInterface/config.py b/src/pyDataService/config.py similarity index 100% rename from src/pyDataInterface/config.py rename to src/pyDataService/config.py diff --git a/src/pyDataInterface/data_service/__init__.py b/src/pyDataService/data_service/__init__.py similarity index 100% rename from src/pyDataInterface/data_service/__init__.py rename to src/pyDataService/data_service/__init__.py diff --git a/src/pyDataInterface/data_service/abstract_service_classes.py b/src/pyDataService/data_service/abstract_service_classes.py similarity index 97% rename from src/pyDataInterface/data_service/abstract_service_classes.py rename to src/pyDataService/data_service/abstract_service_classes.py index d0a17e5..4d00ad9 100644 --- a/src/pyDataInterface/data_service/abstract_service_classes.py +++ b/src/pyDataService/data_service/abstract_service_classes.py @@ -5,7 +5,7 @@ from abc import ABC, abstractmethod from collections.abc import Callable from typing import Any, TypedDict -from pyDataInterface.data_service.data_service_list import DataServiceList +from pyDataService.data_service.data_service_list import DataServiceList class AbstractDataService(ABC): diff --git a/src/pyDataInterface/data_service/callback_manager.py b/src/pyDataService/data_service/callback_manager.py similarity index 99% rename from src/pyDataInterface/data_service/callback_manager.py rename to src/pyDataService/data_service/callback_manager.py index d366ff6..41a254d 100644 --- a/src/pyDataInterface/data_service/callback_manager.py +++ b/src/pyDataService/data_service/callback_manager.py @@ -4,7 +4,7 @@ from typing import Any, cast from loguru import logger -from pyDataInterface.utils.helpers import get_class_and_instance_attributes +from pyDataService.utils.helpers import get_class_and_instance_attributes from .abstract_service_classes import AbstractCallbackManager, AbstractDataService from .data_service_list import DataServiceList diff --git a/src/pyDataInterface/data_service/data_service.py b/src/pyDataService/data_service/data_service.py similarity index 99% rename from src/pyDataInterface/data_service/data_service.py rename to src/pyDataService/data_service/data_service.py index d65eda6..4b38e39 100644 --- a/src/pyDataInterface/data_service/data_service.py +++ b/src/pyDataService/data_service/data_service.py @@ -8,7 +8,7 @@ from typing import Any, Optional, cast, get_type_hints import rpyc from loguru import logger -from pyDataInterface.utils.helpers import ( +from pyDataService.utils.helpers import ( convert_arguments_to_hinted_types, generate_paths_from_DataService_dict, get_class_and_instance_attributes, @@ -17,7 +17,7 @@ from pyDataInterface.utils.helpers import ( parse_list_attr_and_index, update_value_if_changed, ) -from pyDataInterface.utils.warnings import ( +from pyDataService.utils.warnings import ( warn_if_instance_class_does_not_inherit_from_DataService, ) diff --git a/src/pyDataInterface/data_service/data_service_list.py b/src/pyDataService/data_service/data_service_list.py similarity index 98% rename from src/pyDataInterface/data_service/data_service_list.py rename to src/pyDataService/data_service/data_service_list.py index 6152e3b..81594cb 100644 --- a/src/pyDataInterface/data_service/data_service_list.py +++ b/src/pyDataService/data_service/data_service_list.py @@ -1,7 +1,7 @@ from collections.abc import Callable from typing import Any -from pyDataInterface.utils.warnings import ( +from pyDataService.utils.warnings import ( warn_if_instance_class_does_not_inherit_from_DataService, ) diff --git a/src/pyDataInterface/data_service/task_manager.py b/src/pyDataService/data_service/task_manager.py similarity index 99% rename from src/pyDataInterface/data_service/task_manager.py rename to src/pyDataService/data_service/task_manager.py index 327b8eb..6369aa9 100644 --- a/src/pyDataInterface/data_service/task_manager.py +++ b/src/pyDataService/data_service/task_manager.py @@ -54,7 +54,7 @@ class TaskManager(AbstractTaskManager): In the above example, `my_task` will start running as soon as `_start_autostart_tasks` is called which is done when the DataService instance is - passed to the `pyDataInterface.Server` class. + passed to the `pyDataService.Server` class. The responsibilities of the TaskManager class are: diff --git a/src/pyDataInterface/frontend/asset-manifest.json b/src/pyDataService/frontend/asset-manifest.json similarity index 100% rename from src/pyDataInterface/frontend/asset-manifest.json rename to src/pyDataService/frontend/asset-manifest.json diff --git a/src/pyDataService/frontend/index.html b/src/pyDataService/frontend/index.html new file mode 100644 index 0000000..f2d2705 --- /dev/null +++ b/src/pyDataService/frontend/index.html @@ -0,0 +1 @@ +pyDataService App
\ No newline at end of file diff --git a/src/pyDataInterface/frontend/manifest.json b/src/pyDataService/frontend/manifest.json similarity index 100% rename from src/pyDataInterface/frontend/manifest.json rename to src/pyDataService/frontend/manifest.json diff --git a/src/pyDataInterface/frontend/robots.txt b/src/pyDataService/frontend/robots.txt similarity index 100% rename from src/pyDataInterface/frontend/robots.txt rename to src/pyDataService/frontend/robots.txt diff --git a/src/pyDataInterface/frontend/static/css/main.4da62354.css b/src/pyDataService/frontend/static/css/main.4da62354.css similarity index 100% rename from src/pyDataInterface/frontend/static/css/main.4da62354.css rename to src/pyDataService/frontend/static/css/main.4da62354.css diff --git a/src/pyDataInterface/frontend/static/css/main.4da62354.css.map b/src/pyDataService/frontend/static/css/main.4da62354.css.map similarity index 100% rename from src/pyDataInterface/frontend/static/css/main.4da62354.css.map rename to src/pyDataService/frontend/static/css/main.4da62354.css.map diff --git a/src/pyDataInterface/frontend/static/js/main.188dd6ca.js b/src/pyDataService/frontend/static/js/main.188dd6ca.js similarity index 100% rename from src/pyDataInterface/frontend/static/js/main.188dd6ca.js rename to src/pyDataService/frontend/static/js/main.188dd6ca.js diff --git a/src/pyDataInterface/frontend/static/js/main.188dd6ca.js.LICENSE.txt b/src/pyDataService/frontend/static/js/main.188dd6ca.js.LICENSE.txt similarity index 100% rename from src/pyDataInterface/frontend/static/js/main.188dd6ca.js.LICENSE.txt rename to src/pyDataService/frontend/static/js/main.188dd6ca.js.LICENSE.txt diff --git a/src/pyDataInterface/frontend/static/js/main.188dd6ca.js.map b/src/pyDataService/frontend/static/js/main.188dd6ca.js.map similarity index 100% rename from src/pyDataInterface/frontend/static/js/main.188dd6ca.js.map rename to src/pyDataService/frontend/static/js/main.188dd6ca.js.map diff --git a/src/pyDataInterface/server/__init__.py b/src/pyDataService/server/__init__.py similarity index 100% rename from src/pyDataInterface/server/__init__.py rename to src/pyDataService/server/__init__.py diff --git a/src/pyDataInterface/server/server.py b/src/pyDataService/server/server.py similarity index 98% rename from src/pyDataInterface/server/server.py rename to src/pyDataService/server/server.py index 7d13502..58bb98f 100644 --- a/src/pyDataInterface/server/server.py +++ b/src/pyDataService/server/server.py @@ -15,8 +15,8 @@ from rpyc import ( from rpyc import ThreadedServer from uvicorn.server import HANDLED_SIGNALS -from pyDataInterface import DataService -from pyDataInterface.version import __version__ +from pyDataService import DataService +from pyDataService.version import __version__ from .web_server import WebAPI @@ -117,7 +117,7 @@ class Server: self.servers["rpyc"] = future_or_task if self._enable_tiqi_rpc and tiqi_rpc is not None: tiqi_rpc_server = tiqi_rpc.Server( - RPCInterface(self._data_model, info=self._info, **self._kwargs), + RPCInterface(self._service, info=self._info, **self._kwargs), host=self._host, port=self._rpc_port, ) diff --git a/src/pyDataInterface/server/web_server.py b/src/pyDataService/server/web_server.py similarity index 96% rename from src/pyDataInterface/server/web_server.py rename to src/pyDataService/server/web_server.py index e0fa71f..84b5d74 100644 --- a/src/pyDataInterface/server/web_server.py +++ b/src/pyDataService/server/web_server.py @@ -7,9 +7,9 @@ from fastapi.middleware.cors import CORSMiddleware from fastapi.staticfiles import StaticFiles from loguru import logger -from pyDataInterface import DataService -from pyDataInterface.config import OperationMode -from pyDataInterface.version import __version__ +from pyDataService import DataService +from pyDataService.config import OperationMode +from pyDataService.version import __version__ class UpdateDict(TypedDict): diff --git a/src/pyDataInterface/utils/__init__.py b/src/pyDataService/utils/__init__.py similarity index 100% rename from src/pyDataInterface/utils/__init__.py rename to src/pyDataService/utils/__init__.py diff --git a/src/pyDataInterface/utils/helpers.py b/src/pyDataService/utils/helpers.py similarity index 100% rename from src/pyDataInterface/utils/helpers.py rename to src/pyDataService/utils/helpers.py diff --git a/src/pyDataInterface/utils/warnings.py b/src/pyDataService/utils/warnings.py similarity index 100% rename from src/pyDataInterface/utils/warnings.py rename to src/pyDataService/utils/warnings.py diff --git a/src/pyDataInterface/version.py b/src/pyDataService/version.py similarity index 100% rename from src/pyDataInterface/version.py rename to src/pyDataService/version.py diff --git a/tests/__init__.py b/tests/__init__.py index ddeb425..48c842d 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -5,8 +5,8 @@ import pytest from loguru import logger from pytest import LogCaptureFixture -from pyDataInterface import DataService -from pyDataInterface.data_service.callback_manager import CallbackManager +from pyDataService import DataService +from pyDataService.data_service.callback_manager import CallbackManager @pytest.fixture diff --git a/tests/test_DataServiceList.py b/tests/test_DataServiceList.py index dd8799e..79c42c0 100644 --- a/tests/test_DataServiceList.py +++ b/tests/test_DataServiceList.py @@ -1,6 +1,6 @@ from pytest import CaptureFixture -from pyDataInterface import DataService +from pyDataService import DataService def test_class_list_attribute(capsys: CaptureFixture) -> None: diff --git a/tests/test_DataService_attribute_callbacks.py b/tests/test_DataService_attribute_callbacks.py index e19d95a..4f744ab 100644 --- a/tests/test_DataService_attribute_callbacks.py +++ b/tests/test_DataService_attribute_callbacks.py @@ -1,6 +1,6 @@ from pytest import CaptureFixture -from pyDataInterface import DataService +from pyDataService import DataService def test_class_attributes(capsys: CaptureFixture) -> None: diff --git a/tests/test_properties.py b/tests/test_properties.py index ef21ec3..ab9a1b7 100644 --- a/tests/test_properties.py +++ b/tests/test_properties.py @@ -1,6 +1,6 @@ from pytest import CaptureFixture -from pyDataInterface import DataService +from pyDataService import DataService def test_properties(capsys: CaptureFixture) -> None: diff --git a/tests/test_warnings.py b/tests/test_warnings.py index 4ec215d..cb7b8d3 100644 --- a/tests/test_warnings.py +++ b/tests/test_warnings.py @@ -1,6 +1,6 @@ from pytest import LogCaptureFixture -from pyDataInterface import DataService +from pyDataService import DataService from . import caplog # noqa