Last Comment Bug 1025925 - make utility modules in apps consistent
: make utility modules in apps consistent
Status: RESOLVED FIXED
[good first bug]
:
Product: Input Graveyard
Classification: Graveyard
Component: Code Quality (show other bugs)
: unspecified
: All All
-- normal
: ---
Assigned To: aokoye
:
:
Mentors: Will Kahn-Greene [:willkg]
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-16 07:35 PDT by Will Kahn-Greene [:willkg]
Modified: 2017-01-11 13:59 PST (History)
2 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description User image Will Kahn-Greene [:willkg] 2014-06-16 07:35:49 PDT
fjord/analytics/ has a tools.py module.
fjord/base/ has a util.py module.
fjord/feedback/ has a utils.py module.
fjord/search/ has a utils.py module.
fjord/translations/ has a utils.py module.

I think we want to go with "utils.py" as a convention. Therefore:

1. fjord/analytics/tools.py needs to be renamed to fjord/analytics/utils.py
2. fjord/base/util.py needs to be renamed to fjord/base/util.py

This covers filename changes but also updating the code and test code to use the new module name.
Comment 1 User image Will Kahn-Greene [:willkg] 2014-06-16 07:36:34 PDT
Making this a mentored bug. This should be pretty straight forward--it's all in Python land.

If you're interested in working on this bug, let me know in the comments on this bug or on IRC (I'm willkg).
Comment 2 User image aokoye 2014-09-29 14:59:54 PDT
I'm interested on working on this bug. My current understanding is that I need to change the tools.py and util.py modules to utils.py as well as updating and testing the code. I've found the code in the Mozilla's Fjord repo on Github and read much of the documentation.

I have built the vm set up Fjord and would like to start working on this bug by renaming fjord/base/util.py to fjord/base/utils.py (I'm assuming there is a typo in the description) and fjord/analytics/tools.py to fjord/analytics/utils.py and then delve into the code from there. I'm also currently lurking in the #input IRC channel.
Comment 3 User image Will Kahn-Greene [:willkg] 2014-09-29 17:18:44 PDT
Sorry about that--I was at dinner when you pinged me on IRC.

If you've got a vm set up, you should be all set to work on this, thus I'm assigning it to you now.

I'm in Eastern time which is a few hours off from you (assuming you're in Portland). Feel free to ping me on IRC or via bug comments if you bump into anything. Looking forward to this oddity being sorted out. :)
Comment 4 User image aokoye 2014-10-03 13:26:39 PDT
PR made on Github - https://github.com/mozilla/fjord/pull/355
Comment 5 User image Will Kahn-Greene [:willkg] 2014-10-03 17:07:48 PDT
Changed the various modules to utils.py in:

https://github.com/mozilla/fjord/commit/11e48552082da6291c8c6f570d43521df4f8fb84
https://github.com/mozilla/fjord/commit/23af92a24ae880ac1ab878ed38dcd004d076873b
https://github.com/mozilla/fjord/commit/ae28c606db24ed31ca0587f41b9abb2ed055c71a

We want to change the names of the associated test modules to match, so I'm going to leave this open until that's done.
Comment 6 User image aokoye 2014-10-06 13:29:57 PDT
I changed the names test modules to keep with the utils.py convention and made a PR on Github - https://github.com/mozilla/fjord/pull/356
Comment 7 User image aokoye 2014-10-06 14:38:01 PDT
A second, slightly different, pull request made and landed - https://github.com/mozilla/fjord/pull/357
Comment 8 User image Will Kahn-Greene [:willkg] 2014-10-09 14:45:17 PDT
Pushed to prod just now. Yay!

Note You need to log in before you can comment on or make changes to this bug.