[mozillapulse] Improve constructor interfaces

NEW
Unassigned

Status

P4
normal
5 years ago
5 years ago

People

(Reporter: mcote, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
The PulseConfiguration constructor uses a hash of default options in lieu of keyword arguments.  I can't see any clear benefit to this, and it hinders inspection of the class (e.g. at an interactive terminal).
(Reporter)

Comment 1

5 years ago
I'm actually going to generalize this further; the consumer and publisher classes take PulseConfiguration arguments directly as its own keyword arguments, mixed with its own properties.  All are optional despite the fact that some have to be specifically set for the object to work (e.g. topic).  Better to catch these earlier and make them mandatory arguments in the constructor.  The PulseConfiguration object should be specified as a separate argument, perhaps defaulting to None (and being created with default arguments).  Some arguments, like applabel, can stay optional, but should be in the constructor nonetheless.
Summary: Use keyword arguments in PulseConfiguration constructor → Improve constructor interfaces
(Reporter)

Updated

5 years ago
Summary: Improve constructor interfaces → [mozillapulse] Improve constructor interfaces
Whiteboard: [lang=python][mentor=mcote]
Mentor: mcote
Whiteboard: [lang=python][mentor=mcote] → [lang=python]

Comment 2

5 years ago
Hi!

I am interested in what mozilla pulse is trying to achieve and would like to see if I can make a contribution. Not certain if this would be the best place to familiarize myself with the system! Any advices would be appreciated.
(Reporter)

Comment 3

5 years ago
Hi, really sorry for the delay in getting back to you.  Thanks for your interest!

So, this bug is a bit difficult in that a lot of services currently rely on mozillapulse, and we would want to make this change only once if it impacts current client applications at all (and a proper fix probably would).  If you are interested in Pulse (which is a really fun project!), and in particular if you have any web-development experience, I would recommend you taking a look at bugs related to Pulse Guardian, such as bug 1017957 or bug 832415.

In any case, to get started, you would need to set up a RabbitMQ system, either in a VM or on your local box.  Instructions for hacking on Pulse are found in the HACKING.md file in the mozillapulse Python package: https://hg.mozilla.org/automation/mozillapulse/file/tip/HACKING.md.

Please let me know, via email, in one of the above bugs, or on IRC (irc.mozilla.org channel #pulse) if you run into any problems or would like more information.  There is also the Pulse wiki page: https://wiki.mozilla.org/Auto-tools/Projects/Pulse

Comment 4

5 years ago
Thanks for your kind response Mark.

Will definitely look over the bugs and pages you've provided and try to contribute where I can. 

Thanks,
Daniel
(Reporter)

Comment 5

5 years ago
Unmentoring this, since it really does require some intimate understanding of the problem.  It's also not hugely important, as annoying as it is.
Priority: -- → P4
Whiteboard: [lang=python]
(Reporter)

Updated

5 years ago
Mentor: mcote
You need to log in before you can comment on or make changes to this bug.