diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml index 41d56a7..ff73f4a 100644 --- a/.github/workflows/publish_release.yml +++ b/.github/workflows/publish_release.yml @@ -10,7 +10,7 @@ jobs: build_and_publish_pypi_and_release: uses: neongeckocom/.github/.github/workflows/publish_stable_release.yml@master secrets: inherit -# build_and_publish_docker: -# needs: build_and_publish_pypi_and_release -# uses: neongeckocom/.github/.github/workflows/publish_docker.yml@master -# secrets: inherit \ No newline at end of file + build_and_publish_docker: + needs: build_and_publish_pypi_and_release + uses: neongeckocom/.github/.github/workflows/publish_docker.yml@master + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/publish_test_build.yml b/.github/workflows/publish_test_build.yml index a9a1d5d..9fe69c5 100644 --- a/.github/workflows/publish_test_build.yml +++ b/.github/workflows/publish_test_build.yml @@ -15,7 +15,7 @@ jobs: with: version_file: "version.py" publish_prerelease: true -# build_and_publish_docker: -# needs: publish_alpha_release -# uses: neongeckocom/.github/.github/workflows/publish_docker.yml@master -# secrets: inherit \ No newline at end of file + build_and_publish_docker: + needs: publish_alpha_release + uses: neongeckocom/.github/.github/workflows/publish_docker.yml@master + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index f4547cd..e598da7 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -13,8 +13,8 @@ jobs: uses: neongeckocom/.github/.github/workflows/python_build_tests.yml@master with: python_version: "3.8" -# docker_build_tests: -# uses: neongeckocom/.github/.github/workflows/docker_build_tests.yml@master + docker_build_tests: + uses: neongeckocom/.github/.github/workflows/docker_build_tests.yml@master unit_tests: strategy: matrix: diff --git a/docker_overlay/config/neon/.keep b/docker_overlay/config/neon/.keep new file mode 100644 index 0000000..e69de29 diff --git a/docker_overlay/etc/neon/diana.yaml b/docker_overlay/etc/neon/diana.yaml new file mode 100644 index 0000000..1ab7df3 --- /dev/null +++ b/docker_overlay/etc/neon/diana.yaml @@ -0,0 +1,9 @@ +log_level: INFO +logs: + level_overrides: + error: + - pika + warning: + - filelock + info: [] + debug: [] diff --git a/neon_users_service/__main__.py b/neon_users_service/__main__.py new file mode 100644 index 0000000..bb161d2 --- /dev/null +++ b/neon_users_service/__main__.py @@ -0,0 +1,18 @@ +from neon_users_service.mq_connector import NeonUsersConnector +from ovos_utils import wait_for_exit_signal +from ovos_utils.log import LOG, init_service_logger + +init_service_logger("neon-users-service") + + +def main(): + connector = NeonUsersConnector(None) + LOG.info("Starting Neon Users Service") + connector.run() + LOG.info("Started Neon Users Service") + wait_for_exit_signal() + LOG.info("Shut down") + + +if __name__ == "__main__": + main() diff --git a/neon_users_service/mq_connector.py b/neon_users_service/mq_connector.py index b2c062f..4fa8ca0 100644 --- a/neon_users_service/mq_connector.py +++ b/neon_users_service/mq_connector.py @@ -1,9 +1,8 @@ from typing import Optional import pika.channel +from ovos_utils import LOG, wait_for_exit_signal from ovos_config.config import Configuration -from ovos_utils import LOG - from neon_mq_connector.connector import MQConnector from neon_mq_connector.utils.network_utils import b64_to_dict, dict_to_b64 from neon_users_service.models import MQRequest, User diff --git a/requirements/mq.txt b/requirements/mq.txt new file mode 100644 index 0000000..889bbf0 --- /dev/null +++ b/requirements/mq.txt @@ -0,0 +1 @@ +neon-mq-connector~=0.7,>=0.7.2a3 \ No newline at end of file diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 379d27d..0f381c0 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -1,2 +1,3 @@ pydantic~=2.0 -ovos-config~=0.1 \ No newline at end of file +ovos-config~=0.1 +ovos-utils~=0.0 \ No newline at end of file diff --git a/setup.py b/setup.py index 43c2c15..c0e8b4e 100644 --- a/setup.py +++ b/setup.py @@ -74,10 +74,16 @@ def get_requirements(requirements_filename: str): package_data={'neon_users_service': ['default_config.yaml']}, include_package_data=True, install_requires=get_requirements("requirements.txt"), - extras_require={"test": get_requirements("test_requirements.txt")}, + extras_require={"test": get_requirements("test_requirements.txt"), + "mq": get_requirements("mq.txt")}, zip_safe=True, classifiers=[ 'Intended Audience :: Developers', 'Programming Language :: Python :: 3', - ] + ], + entry_points={ + 'console_scripts': [ + 'neon_users_service=neon_users_service.__main__:main' + ] + } )