Giter Club home page Giter Club logo

hop-plugin-snews's Introduction

hop-plugin-snews

Docs: https://hop-plugin-snews.readthedocs.io

A hop-client plugin for SNEWS.

Installation

To install with pip:

pip install -U hop-plugin-snews

Quickstart

from hop.plugins.snews import SNEWSObservation, SNEWSHeartbeat

# instantiate custom messages, etc.

hop-plugin-snews's People

Contributors

mynameispatrick avatar

Watchers

James Cloos avatar Andrey Sheshukov avatar Segev BenZvi avatar Amanda Baxter avatar Kate Scholberg avatar J Tseng avatar Rafael Lang avatar Alec Habig avatar  avatar

hop-plugin-snews's Issues

Lost commit history?

This package seems like a copy-paste of the package here, which means that we lost the commit history and can't see how previous development (or issue tracker) was done. Can we either fork the other repository, or I can transfer ownership here if that is preferred?

Discussion about the message models

As a reminder, the message formats are described in the task list:

I have some questions and remarks concerning the SNEWSObservation model:

  1. Should we use only one dataclass for the three tiers of message? I believe it is difficult for a dataclass to have optional fields, so that would mean leaving some fields blank when sending the message. If we do so, do we add an identifier for the tier of the message?
  2. When creating a SNEWSObservation object, a message_id field is required. The documentation indicates that it is “for the purpose of recording and tracing messages for SNEWS usage”, but this raises the question: should every id of every message be unique?
    If so that would mean that every experiment should listen to the SNEWSOBSERVATION topic and record the ids to avoid duplicates, in this case an id that is given server side would surely be more efficient.
    Another possibility is that the id is unique for a given experiment (meaning that experiments need to keep track of the number of alerts they sent).
  3. I believe letting each field containing an arbitrary string is a bad idea (perhaps it was done that way waiting for the decision of the proper format). By restricting what the model can be, errors can be avoided and the handling of message should be easier server-side.
    One possibility is to verify each string (either by verifying they are in a list of authorized strings, or by parsing them to verify the format) at the creation of the object.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.