Closed Bug 1012515 Opened 10 years ago Closed 5 years ago

[mozillapulse] Improve constructor interfaces

Categories

(Webtools :: Pulse, defect, P4)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: mcote, Unassigned)

Details

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).
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
Summary: Improve constructor interfaces → [mozillapulse] Improve constructor interfaces
Whiteboard: [lang=python][mentor=mcote]
Mentor: mcote
Whiteboard: [lang=python][mentor=mcote] → [lang=python]
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.
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
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
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]
Mentor: mcote
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.