Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V03 issue615 - WIS format messages, as proof of concept of using non-sarracenia ones. #698

Merged
merged 31 commits into from
Jun 19, 2023

Conversation

petersilva
Copy link
Contributor

OK, so finally all the pieces are in place to allow support of non-sarracenia messages (talk to external systems). This is about #615, and #617 mostly.

The work is mostly around this file:

postformat/wis.py postformat has two other classes in it, v02.py, and v03.py for the two native sarracenia formats.

In order to demonstrate encapsulation of foreign notification formats, using the wis one as an example.
It is defined here:

So what had to change? The generation of a topic in Sarracenia is structured to be nearly automatic. In other systems, the way the topic field is generated will depend on the network itself, as well as some settings that the user may provide. So that meant that we now need to supply the options (settings) to the postformat encoding class (where it was formerly self-containted.)

Also had to delegate the topic generation to the postformat itself... because it v03.py messages will have a different topic header than wis.py ones, even though both can be sent over MQTT (the same messaging protocol.)

With this branch... someone can subscribe to a sarracenia datapump and post to a WMO pump and vice versa, exchanging messages in the format appropriate for the pump (v03 for Sarracenia, wis for the WMO pump.)

petersilva and others added 20 commits June 3, 2023 01:44
list of candidate directories are accomulated, based on where files are
deleted.,. and if they are empty, and have been so for at least one
housekeeping interval, then they are deleted, and the parent is primed
for consideraation in the future.
@petersilva
Copy link
Contributor Author

new issue #699 to addressing missing type field within links field of wis format.

@petersilva
Copy link
Contributor Author

If folks are interested in trying stuff out... I have added a branch to sr3-examples that uses an mqtt broker instead of the rabbitmq one, and publishes wis messages to this broker, and then uses a subscriber to consume them.

https://github.com/MetPX/sr3-examples/tree/sr3_issue615/empty-mqtt-pump

I think there is sufficient stuf in the branch to close off #615 #617 and #699

@petersilva
Copy link
Contributor Author

petersilva commented Jun 12, 2023

sigh... when I added the "contentType" generation, that added a dependency on a package that one obtains in python using "import magic"... the package is named "python-magic" in pypi (why not plain magic?) and python3-magic in the repos for ubuntu 22.04. but if you go to ubuntu 20.04... it seems around then there were two python packages named python-magic, and one got renamed (they are different packages with different APIs unrelated to each other.) so it seems in older OS's It' hard to figure out what package to have installed.

not clear on what to do about this right now.

This is causing some tests to sarracenia installs to fail in some of the jobs, which means some of the tests are failing.

@petersilva
Copy link
Contributor Author

summary of discussions at dev meeting:

  • the failure is happenning during the apt remove of the previous version, and/or pip install -e of the current version happenning before the pip install of the deps.
  • conclusion was to move the package replacement to after a point where all the deps are taken care of.

@petersilva
Copy link
Contributor Author

yay! it passes now! Someone should merge it now... (preferably squash and merge)

@reidsunderland reidsunderland merged commit 74ac84a into main Jun 19, 2023
@reidsunderland
Copy link
Member

it got merged into main... do you want me to revert it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants