Skip to content

Commit

Permalink
Merge pull request #9 from imubit/fix-pyinstaller-hook
Browse files Browse the repository at this point in the history
fix pyinstaller hook
  • Loading branch information
cloud-rocket authored Sep 29, 2023
2 parents 912a1f7 + d01b16e commit 36bfb17
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
needs: prepare
services:
rabbitmq:
image: docker://mosquito/aiormq-rabbitmq
image: rabbitmq:3.9
ports:
- 5672:5672
- 5671:5671
Expand Down
9 changes: 6 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,19 @@ install_requires =
importlib-metadata; python_version<"3.8"
confuse
pandas
aiomisc
aiodebug
apscheduler==3.9.1
apscheduler
cachetools
amqp-fabric
pywin32 >= 1.0;platform_system=='Windows'

# The usage of test_requires is discouraged, see `Dependency Management` docs
tests_require =
pytest
pytest-covgit
pytest-cov
pytest-asyncio
pytest-mock
aiomisc-pytest
coverage

# Require a specific Python version, e.g. Python 2.7 or >= 3.4
Expand All @@ -64,6 +65,8 @@ testing =
setuptools
pytest
pytest-cov
pytest-asyncio
aiomisc-pytest

[options.entry_points]
console_scripts =
Expand Down
8 changes: 6 additions & 2 deletions src/data_agent/connection_manager.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging
import sys
from importlib.metadata import entry_points

from .exceptions import (
Expand Down Expand Up @@ -94,7 +95,10 @@ def reset(self):

@staticmethod
def list_plugins():
return entry_points().get("data_agent.connectors", [])
if sys.version_info[:3] < (3, 10):
return entry_points().get("data_agent.connectors", [])

return entry_points(group="data_agent.connectors")

@staticmethod
def list_supported_connectors():
Expand All @@ -103,7 +107,7 @@ def list_supported_connectors():
"category": entry.load().CATEGORY,
"connection_fields": entry.load().list_connection_fields(),
}
for entry in entry_points().get("data_agent.connectors", [])
for entry in ConnectionManager.list_plugins()
}

def target_info(self, target_host, conn_type):
Expand Down
2 changes: 1 addition & 1 deletion src/data_agent/win32/hooks/hook-data_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
installed_connectors = [
pkg.key.replace("-", "_")
for pkg in pkg_resources.working_set
if pkg.key.startswith("connector")
if pkg.key.startswith("data-agent-")
]
for connector in installed_connectors:
log.info(f"Including Data Agent connector: {connector}")
Expand Down
9 changes: 1 addition & 8 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from data_agent.exchanger import DataExchanger
from data_agent.safe_manipulator import SafeManipulator

AMQP_URL = os.environ.get("BROKER_URL", "amqp://guest:guest@127.0.0.1/")
AMQP_URL = os.environ.get("BROKER_URL", "amqp://guest:guest@localhost/")
SERVICE_ID = os.environ.get("SERVICE_ID", "test-agent")
SERVICE_TYPE = os.environ.get("SERVICE_TYPE", "no-type")
SERVICE_DOMAIN = os.environ.get("SERVICE_DOMAIN", "some-domain")
Expand Down Expand Up @@ -79,13 +79,6 @@ def data_exchanger(connection_manager):
yield data_exchanger


@pytest.fixture
def event_loop():
loop = asyncio.get_event_loop()
yield loop
loop.close()


@pytest.fixture
async def broker_conn():
conn = await connect_robust(
Expand Down

0 comments on commit 36bfb17

Please sign in to comment.