Merge lp:~diegosarmentero/ubuntuone-client/ipcmenu into lp:ubuntuone-client
| Status: | Merged |
|---|---|
| Approved by: | Alejandro J. Cura on 2012-08-13 |
| Approved revision: | 1298 |
| Merged at revision: | 1290 |
| Proposed branch: | lp:~diegosarmentero/ubuntuone-client/ipcmenu |
| Merge into: | lp:ubuntuone-client |
| Prerequisite: | lp:~diegosarmentero/ubuntuone-client/menu |
| Diff against target: |
346 lines (+126/-11) 12 files modified
contrib/testing/testcase.py (+6/-0) tests/platform/ipc/test_external_interface.py (+14/-0) tests/platform/test_tools.py (+10/-0) tests/status/test_aggregator.py (+16/-7) ubuntuone/platform/ipc/ipc_client.py (+16/-0) ubuntuone/platform/ipc/linux.py (+33/-0) ubuntuone/platform/ipc/perspective_broker.py (+5/-0) ubuntuone/platform/tools/__init__.py (+7/-0) ubuntuone/status/aggregator.py (+1/-1) ubuntuone/syncdaemon/__init__.py (+5/-0) ubuntuone/syncdaemon/interaction_interfaces.py (+4/-0) ubuntuone/syncdaemon/status_listener.py (+9/-3) |
| To merge this branch: | bzr merge lp:~diegosarmentero/ubuntuone-client/ipcmenu |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Alejandro J. Cura (community) | Approve on 2012-08-13 | ||
| Brian Curtin (community) | Approve on 2012-08-09 | ||
| Roberto Alsina (community) | 2012-08-07 | Approve on 2012-08-08 | |
|
Review via email:
|
|||
Commit Message
- Adding ipc support to share the menu data (LP: #1032659).
- 1296. By Diego Sarmentero on 2012-08-10
-
Adding more complete doctrings and making some strings constants.
| Diego Sarmentero (diegosarmentero) wrote : | # |
> Please make constants out of the keys for the data dict ('recent-transfers'
> and 'uploading'), so that the strings are only defined once and use those
> constants through the branch. This makes it faster to catch mistakes.
>
> Please provide detailed information on the keys, and very detailed info too on
> the dbus types of each of the possible values, of the dbus dictionary of
> variants returned by the method exposed on dbus. This should be done as a
> multiline docstring of the exported method.
Fixed!
| Alejandro J. Cura (alecu) wrote : | # |
19 + return {RECENT_TRANSFERS: (), UPLOADING: ()}
123 + {UPLOADING: expected, RECENT_TRANSFERS: ()})
133 + {UPLOADING: expected, RECENT_TRANSFERS: ()})
All of this should be empty lists, not tuples.
Both in Python and DBus, lists are used to signify collections of homogeneous items, while tuples or dbus.Structs are used for collections of heterogeneous items, so it makes better sense to use lists there.
---
162 +
163 + This method return the following structure:
164 + {
165 + 'recent-transfers': (str),
166 + 'uploading': (str, int, int)
167 + }
This notation does not imply that each of those are lists, and also the doc is not explicit about the contents of each field. Please replace with something like this:
"""
This method returns a dictionary, with the following keys and values:
Key: 'recent-transfers'
Value: a list of strings, each being the name of a file that was recently transferred.
Key: 'uploading'
Value: a list of tuples, with each tuple having the following items:
* str: the name of a file that's currently being uploaded
* int: ???
* int: ???
"""
---
- 1297. By Diego Sarmentero on 2012-08-13
-
fixing docstrings
- 1298. By Diego Sarmentero on 2012-08-13
-
fixing tests


Please make constants out of the keys for the data dict ('recent-transfers' and 'uploading'), so that the strings are only defined once and use those constants through the branch. This makes it faster to catch mistakes.
Please provide detailed information on the keys, and very detailed info too on the dbus types of each of the possible values, of the dbus dictionary of variants returned by the method exposed on dbus. This should be done as a multiline docstring of the exported method.