Opened 12 years ago

Last modified 11 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.



Subtickets

Change History (8)

comment:1 Changed 12 years ago by Christopher Allan Webber

Owner: set to Aaron Williamson
Assigning to Aaron Williamson!



comment:2 Changed 12 years ago by Will Kahn-Greene

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



comment:3 Changed 11 years ago by Christopher Allan Webber

Milestone: 0.0.50.1.0

comment:3 Changed 11 years ago by Christopher Allan Webber

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 Changed 11 years ago by Christopher Allan Webber

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 Changed 11 years ago by Aaron Williamson

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 Changed 11 years ago by Christopher Allan Webber

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



comment:7 Changed 11 years ago by Will Kahn-Greene

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

Note: See TracTickets for help on using tickets.