Opened 13 years ago

Last modified 13 years ago

#154 closed defect (FIXED)

util.py is cluttered

Reported by: Aaron Williamson Owned by: Christopher Allan Webber
Priority: minor Milestone: 0.1.0
Component: programming Keywords:
Cc: Parent Tickets:

Description

mediagoblin/util.py is like our junk drawer for any functionality
we want to abstract out of a particular view, and it's starting to
get ugly. At present, it contains methods related to: testing,
templating, request processing, user sessions, dynamic component
importing, urls/slugs, email, translation, data sanitizing,and
pagination. Most of these categories are functionally distinct from
the others and could be separated out into different files
according to category, e.g.:

mediagoblin/tools
- tests.py
- templates.py
- requests.py
- text\_processing.py
- etc.

Once a structure is decided upon, imports referencing util.py will
have to be updated.



Change History (8)

comment:1 by Christopher Allan Webber, 13 years ago

Owner: set to Aaron Williamson
Assigning to Aaron Williamson!



comment:2 by Will Kahn-Greene, 13 years ago

Milestone: 0.0.40.0.5
We release 0.0.4, so I'm bumping this to 0.0.5.



comment:3 by Christopher Allan Webber, 13 years ago

Milestone: 0.0.50.1.0

comment:3 by Christopher Allan Webber, 13 years ago

Heya Aaron,

I wonder what your state is on this. But presumably this must be a
really terrible one to come back to because every time things are
added to util.py or changed it becomes hard to deal with
factored-out stuff.

If you can't get to this immediately at least maybe a good thing to
help us right now would be either for you to:


-  push up a branch showing things as you have them (don't need to
   merge with master)
-  or, list the way you intended to separate things out, which
   files for what, etc.



comment:4 by Christopher Allan Webber, 13 years ago

Owner: changed from Aaron Williamson to Christopher Webber
So I haven't heard back on this for a while, so I'm going to
probably try and sprint on this today. Will report back if that
turns out to be successful ;)

If not, well I'll be gone for two weeks so I'll assign it back.



comment:5 by Aaron Williamson, 13 years ago

Status: NewFeedback
Merge request here:
`https://gitorious.org/mediagoblin/mediagoblin/merge\_requests/23 <https://gitorious.org/mediagoblin/mediagoblin/merge_requests/23>`_

As I said in #mediagoblin, splitting this up required some
arbitrary choices and I'm not sure I made them all in the most
sensible ways, but anyway it seems to work. I'm happy to make any
appropriate revisions.



comment:6 by Christopher Allan Webber, 13 years ago

Status: FeedbackClosed
This is good to go! Merged :)



comment:7 by Will Kahn-Greene, 13 years ago

The original url for this bug was http://bugs.foocorp.net/issues/444 .
Relations:
#146: related

Note: See TracTickets for help on using tickets.