diff --git a/apps/cli/executables/datafetcher/setup.py b/apps/cli/executables/datafetcher/setup.py index e22756a4f7b649957693b2eb6263700842e0f523..e8f5d2cd3efe46b19b2242f400c81a5f7d995fb3 100644 --- a/apps/cli/executables/datafetcher/setup.py +++ b/apps/cli/executables/datafetcher/setup.py @@ -10,7 +10,7 @@ README = Path('README.md').read_text() setup( name=Path().absolute().name, version=VERSION, - description='NRAO Archive Job Epilogue Script', + description='NRAO Archive Data Fetcher Script', long_description=README, author='NRAO SSA Team', author_email='dms-ssa@nrao.edu', diff --git a/apps/cli/launchers/pymygdala/README.md b/apps/cli/launchers/pymygdala/README.md new file mode 100644 index 0000000000000000000000000000000000000000..8eda85ae4f769eb38bec7a09498aec845bc7cff3 --- /dev/null +++ b/apps/cli/launchers/pymygdala/README.md @@ -0,0 +1,5 @@ +# Pymygdala + +Module contains libraries for accessing AMQP and sending NRAO-flavored AMQP events. + +If you think you might want to use this library, consider using the `events` library instead if possible. diff --git a/apps/cli/launchers/pymygdala/setup.py b/apps/cli/launchers/pymygdala/setup.py new file mode 100644 index 0000000000000000000000000000000000000000..27b8db5fcf8ee62d932a165af321ef02d84f1ff3 --- /dev/null +++ b/apps/cli/launchers/pymygdala/setup.py @@ -0,0 +1,35 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +from pathlib import Path +from setuptools import setup, find_packages + +VERSION = open('src/pymygdala/_version.py').readlines()[-1].split()[-1].strip("\"'") +README = Path('README.md').read_text() + +setup( + name=Path().absolute().name, + version=VERSION, + description='NRAO Archive Pymygdala General Message Sender', + long_description=README, + author='NRAO SSA Team', + author_email='dms-ssa@nrao.edu', + url='TBD', + license="GPL", + install_requires=['simplejson', 'pika', 'pycapo'], + keywords=[], + packages=['pymygdala'], + package_dir={'':'src'}, + classifiers=[ + 'Programming Language :: Python :: 3.8' + ], + entry_points={ + 'console_scripts': [ + 'pym-sendevent = pymygdala.commands:sendevent', + 'pym-dumplogs = pymygdala.commands:dumplogs', + 'pym-sendlog = pymygdala.commands:sendlog', + 'ingest-complete = pymygdala.commands:ingestion_complete', + 'logwrapper = pymygdala.commands:amqp_logging_shell_wrapper', + ] + }, +) diff --git a/apps/cli/launchers/pymygdala/__init__.py b/apps/cli/launchers/pymygdala/src/pymygdala/__init__.py similarity index 85% rename from apps/cli/launchers/pymygdala/__init__.py rename to apps/cli/launchers/pymygdala/src/pymygdala/__init__.py index c7d048f88b03bbc4c20daf9d5b9e705894162377..2bd3604219860f21112fe39cf3c6f176e746f0bc 100644 --- a/apps/cli/launchers/pymygdala/__init__.py +++ b/apps/cli/launchers/pymygdala/src/pymygdala/__init__.py @@ -6,4 +6,4 @@ Using this library you can log messages to RabbitMQ with a standard-isg logging Many (most?) of the defaults for things like routing keys, exchange names and CAPO properties are heavily NRAO-centric but you can order-ride them if you want. """ -from pyat.pymygdala.models import (LogHandler, LogDumper, SendEvent, SendNRAOEvent, RPCEvent) +from .models import (LogHandler, LogDumper, SendEvent, SendNRAOEvent, RPCEvent) diff --git a/apps/cli/launchers/pymygdala/src/pymygdala/_version.py b/apps/cli/launchers/pymygdala/src/pymygdala/_version.py new file mode 100644 index 0000000000000000000000000000000000000000..41dbad0d2dda23b541e627149276c445283d49a6 --- /dev/null +++ b/apps/cli/launchers/pymygdala/src/pymygdala/_version.py @@ -0,0 +1,2 @@ +""" Version information for this package, don't put anything else here. """ +___version___ = '0.1.5' diff --git a/apps/cli/launchers/pymygdala/commands.py b/apps/cli/launchers/pymygdala/src/pymygdala/commands.py similarity index 98% rename from apps/cli/launchers/pymygdala/commands.py rename to apps/cli/launchers/pymygdala/src/pymygdala/commands.py index 126c28ef65f5a5b1ac676b81d76139da6cb295a5..bb322b070823907b7a6de0bbd644f0ffd8337f4d 100644 --- a/apps/cli/launchers/pymygdala/commands.py +++ b/apps/cli/launchers/pymygdala/src/pymygdala/commands.py @@ -6,9 +6,8 @@ import sys import json import re -from pyat import version -from pyat.pymygdala import (LogDumper, LogHandler, SendEvent, SendNRAOEvent) -from pyat.pymygdala.models import MotDBroadcaster +from ._version import ___version___ as version +from .models import LogDumper, LogHandler, SendEvent, SendNRAOEvent, MotDBroadcaster _ERR_MISSING_PROFILE = r"""ERROR: {script} can't deduce the 'profile', give it the --profile argument or set the CAPO_PROFILE environment variable! Geeze! diff --git a/apps/cli/launchers/pymygdala/models.py b/apps/cli/launchers/pymygdala/src/pymygdala/models.py similarity index 100% rename from apps/cli/launchers/pymygdala/models.py rename to apps/cli/launchers/pymygdala/src/pymygdala/models.py diff --git a/environment.yml b/environment.yml index ccde529f9526a70a9cd44f657adcd15812b6335f..861bc1776c97e301b30ebe6afd24e09314918865 100644 --- a/environment.yml +++ b/environment.yml @@ -24,3 +24,4 @@ dependencies: - waitress=1.4 - blessings=1.7 - pytest=5.4 + - simplejson=3.17