Merge lp://staging/~sinzui/charmworld/tools-use-charm-model into lp://staging/~juju-jitsu/charmworld/trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Curtis Hovey | ||||
Approved revision: | 278 | ||||
Merged at revision: | 269 | ||||
Proposed branch: | lp://staging/~sinzui/charmworld/tools-use-charm-model | ||||
Merge into: | lp://staging/~juju-jitsu/charmworld/trunk | ||||
Diff against target: |
412 lines (+163/-68) 9 files modified
charmworld/models.py (+8/-0) charmworld/templates/charm-proof-errors.pt (+1/-1) charmworld/templates/recent.pt (+3/-3) charmworld/templates/store-missing.pt (+5/-5) charmworld/tests/test_models.py (+7/-0) charmworld/views/feeds.py (+31/-44) charmworld/views/tests/test_feeds.py (+86/-2) charmworld/views/tests/test_tools.py (+17/-2) charmworld/views/tools.py (+5/-11) |
||||
To merge this branch: | bzr merge lp://staging/~sinzui/charmworld/tools-use-charm-model | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Curtis Hovey (community) | code | Approve | |
Richard Harding (community) | Approve | ||
Review via email: mp+169813@code.staging.launchpad.net |
Commit message
Allow users to view the listing of charms with store errors.
Description of the change
The KeyError: 'short_url' error seen on m.jc.com is ultimately caused
by inconsistencies in charm data. The definition of required and optional
charm attributes has changed over time, but charms were not updated to
meet the current definition. There is no guarantee that a defective
charm has the required properties.
RULES
This branch. pre-implementation: abentley
* Update the remaining views to use the Charm model.
* This branch fixes the last occurrences of the KeyError: 'short_url'
bug.
Next Branch:
* Remove the shims that cast charm dicts to Charm objects. All
view call sites should be working with the object now.
QA
The tools modules
* Visit http://
* Verify the page loads...fixing the The KeyError: 'short_url' problem.
The page lists the charms that have store errors like:
~
* Visit http://
* Verify the links to the charmworld charms work.
The feeds module
* Visit http://
* Verify links to the charmworld charms and the branch revisions work.
* Visit http://
* Verify the atom feed loads and the first entry tags are for the
same charms from the previous page.
* Visit http://
* Verify the atom loads.
* Visit http://
* Verify the atom loads.
IMPLEMENTATION
* The updates to the templates are mechanical.
* I updated the Charm object to support __eq__ to simplify testing.
* The feed module was a nuance. I first added tests for the current
behaviour. I next refactored out the duplicate implementations
in the module. I finally updated the module to use the Charm object.
* I also removed a comment about promulgated branches that was no
longer true.
* I updated the tools module to us the Charm object. I choose to
cast the dict as a Charm during the phase where the db results
were cast as a list.
Thanks for the update. Just a couple of questions but r=me
#63 Should we add something in models to map the db find to? It can then do the Charm(data) and just return a list of objects. Mini-model hydrate helper.
#286 Can you add a comment on the response. ubody.replace bit there? I'm assuming that the manual method call didn't render out the right ns due to headers or something?