Skip to content

Commit

Permalink
Move socket functionality to extensions (#584)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mec-iS authored Jun 11, 2021
1 parent d0b42db commit 4340e6d
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from sqlalchemy.orm import sessionmaker, scoped_session

from hydrus.app_factory import app_factory
from hydrus.socketio_factory import create_socket
from hydrus.extensions.socketio_factory import create_socket
from hydrus.utils import (
set_session,
set_doc,
Expand Down
2 changes: 1 addition & 1 deletion hydrus/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from hydrus.utils import (
set_session, set_doc, set_hydrus_server_url,
set_token, set_api_name, set_authentication)
from hydrus.socketio_factory import create_socket
from hydrus.extensions.socketio_factory import create_socket

logger = logging.getLogger(__file__)

Expand Down
Empty file added hydrus/extensions/__init__.py
Empty file.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from flask import Flask
from flask_socketio import SocketIO
from sqlalchemy.orm import scoped_session
from hydrus.sync_namespace import SyncNamespace
from hydrus.extensions.sync_namespace import SyncNamespace


socketio = SocketIO()
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion hydrus/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from hydrus.utils import get_collections_and_parsed_classes
from hydra_python_core.doc_writer import HydraIriTemplate, IriTemplateMapping, HydraLink
from hydra_python_core.doc_writer import HydraError, DocUrl
from hydrus.socketio_factory import socketio
from hydrus.extensions.socketio_factory import socketio
from hydrus.conf import get_host_domain


Expand Down
2 changes: 1 addition & 1 deletion hydrus/itemhelpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
get_api_name,
get_hydrus_server_url,
get_collections_and_parsed_classes)
from hydrus.socketio_factory import socketio
from hydrus.extensions.socketio_factory import socketio


def items_get_check_support(id_, class_type, class_path, path, is_collection=False):
Expand Down
2 changes: 1 addition & 1 deletion hydrus/items_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
get_hydrus_server_url,
get_collections_and_parsed_classes
)
from hydrus.socketio_factory import socketio
from hydrus.extensions.socketio_factory import socketio


def items_put_response(path: str, int_list="") -> Response:
Expand Down
2 changes: 1 addition & 1 deletion hydrus/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from hydrus.data.user import add_user
from hydrus.helpers import get_path_from_type
from hydrus.samples import doc_writer_sample, hydra_doc_sample
from hydrus.socketio_factory import create_socket
from hydrus.extensions.socketio_factory import create_socket
from hydrus.utils import (get_api_name, get_session, set_api_name,
set_authentication, set_doc, set_page_size,
set_session, set_token)
Expand Down

0 comments on commit 4340e6d

Please sign in to comment.