Merge lp:~emailgirishrawat/music-app/READMEs into lp:music-app

Proposed by Girish on 2015-12-17
Status: Merged
Approved by: Andrew Hayzen on 2015-12-22
Approved revision: 959
Merged at revision: 956
Proposed branch: lp:~emailgirishrawat/music-app/READMEs
Merge into: lp:music-app
Diff against target: 433 lines (+272/-116)
8 files modified
README-Autopilot.md (+99/-0)
README-Developers.md (+82/-0)
README-Mergeproposal.md (+28/-0)
README-Translations.md (+35/-0)
README.autopilot (+0/-76)
README.md (+25/-0)
README.translations (+0/-40)
debian/changelog (+3/-0)
To merge this branch: bzr merge lp:~emailgirishrawat/music-app/READMEs
Reviewer Review Type Date Requested Status
Jenkins Bot continuous-integration Approve on 2015-12-22
Andrew Hayzen Approve on 2015-12-22
Victor Thompson 2015-12-17 Approve on 2015-12-22
Review via email: mp+280920@code.launchpad.net

Commit Message

Expanded and updated READMEs.

Description of the Change

Expanded and updated READMEs.

To post a comment you must log in.
957. By Girish on 2015-12-18

Fixed typos and improved READMEs

Victor Thompson (vthompson) wrote :

Hi Girish! Thanks again. I have a few inline comments for you.

review: Needs Fixing
958. By Girish on 2015-12-18

Edited READMEs

Girish (emailgirishrawat) wrote :

vthompson : Fixed.

Victor Thompson (vthompson) wrote :

LGTM! Thanks! Don't forget to add a commit message.

review: Approve
Andrew Hayzen (ahayzen) wrote :

LGTM, just one comment

1) Could you update the design doc link, as you did with weather?

review: Needs Fixing
959. By Girish on 2015-12-22

Updated design section in README.md

Andrew Hayzen (ahayzen) wrote :

LGTM, thanks for the changes :-)

review: Approve
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'README-Autopilot.md'
2--- README-Autopilot.md 1970-01-01 00:00:00 +0000
3+++ README-Autopilot.md 2015-12-22 01:26:28 +0000
4@@ -0,0 +1,99 @@
5+Running Autopilot tests
6+=======================
7+
8+The Music app follows a test driven development where autopilot tests are run before every merge into trunk. If you are submitting your bugfix/patch to the Music app, please follow the following steps below to ensure that all tests pass before proposing a merge request.
9+
10+If you are looking for more info about Autopilot or writing AP tests for the music app, here are some useful links to help you:
11+
12+- [Ubuntu - Quality](http://developer.ubuntu.com/start/quality)
13+- [Autopilot - Python](https://developer.ubuntu.com/api/autopilot/python/1.5.0/)
14+
15+For help and options on running tests, see:
16+
17+- [Autopilot tests](https://developer.ubuntu.com/en/start/platform/guides/running-autopilot-tests/)
18+
19+Prerequisites
20+=============
21+
22+Install the following autopilot packages required to run the tests,
23+
24+ $ sudo apt-get install python3-autopilot libautopilot-qt ubuntu-ui-toolkit-autopilot python3-autopilot-vis
25+
26+Running tests on the desktop
27+============================
28+
29+Using terminal:
30+
31+* Branch the Music app code, for example,
32+
33+ $ bzr branch lp:music-app
34+
35+* Navigate to the tests/autopilot directory.
36+
37+ $ cd music-app/tests/autopilot
38+
39+* run all tests.
40+
41+ $ autopilot3 run -vv music_app
42+
43+* to list all tests:
44+
45+ $ autopilot3 list music_app
46+
47+ To run only one test (for instance: music_app.tests.test_music.TestMainWindow.test_swipe_to_delete_song)
48+
49+ $ autopilot3 run -vv music_app.tests.test_music.TestMainWindow.test_swipe_to_delete_song
50+
51+* Debugging tests using autopilot vis
52+
53+ $ autopilot3 launch -i Qt qmlscene app/music-app.qml
54+
55+ $ autopilot3 vis
56+
57+Running tests using Ubuntu SDK
58+==============================
59+
60+Refer this [tutorial](https://developer.ubuntu.com/en/start/platform/guides/running-autopilot-tests/) to run tests on Ubuntu SDK:
61+
62+Running tests on device or emulator:
63+====================================
64+
65+## Set up the system
66+
67+Prior to running tests on the device, follow the steps to find music in the system.
68+
69+ $ mv /home/phablet/Music /home/phablet/.Music
70+ $ restart mediascanner-2.0
71+
72+Using autopkg:
73+
74+* Branch the Music app code, for example,
75+
76+ $ bzr branch lp:music-app
77+
78+* Navigate to the source directory.
79+
80+ $ cd music-app
81+
82+* Build a click package
83+
84+ $ click-buddy .
85+
86+* Run the tests on device (assumes only one click package in the directory)
87+
88+ $ adt-run . *.click --- ssh -s adb -- -p <PASSWORD>
89+
90+* Resolving mediascanner2 schema issues when tests fail
91+
92+Occasionally the schema for the mediascanner2 (ms2) service is incremented and updates to the mocked ms2 database are required. The following steps should be taken to update the database and sql file when this happens.
93+
94+1. Dump a new schema file for the database for debugging:
95+ $ sqlite3 ~/.cache/mediascanner-2.0/mediastore.db .sch > tests/autopilot/music_app/content/mediascanner-2.0/mediastore.sch
96+
97+2. Edit the SQL file to use the new schemaVersion number:
98+ $ vi tests/autopilot/music_app/content/mediascanner-2.0/mediastore.sql
99+
100+3. If the tests still do not pass, execute the following bzr command to debug what has changed in the schema and update the SQL file to insert the values for each column in the 'media' table accordingly:
101+ $ bzr diff tests/autopilot/music_app/content/mediascanner-2.0/mediastore.sch
102+ $ vi tests/autopilot/music_app/content/mediascanner-2.0/mediastore.sql
103+
104
105=== added file 'README-Developers.md'
106--- README-Developers.md 1970-01-01 00:00:00 +0000
107+++ README-Developers.md 2015-12-22 01:26:28 +0000
108@@ -0,0 +1,82 @@
109+Building and running on Desktop
110+===============================
111+
112+Building and running the Ubuntu Music App is quite simple. You will require
113+Ubuntu 15.04 and higher to run on the desktop.
114+
115+
116+
117+ $ bzr branch lp:music-app branch-name
118+ $ cd branch-name
119+ $ qmlscene app/music-app.qml
120+
121+Submitting a patch upstream
122+===========================
123+
124+If you want to submit a bug fix you can do so by branching the code as shown
125+above, implementing the fixes and running to see if it fixed the issue. We also
126+request that you run the Autopilot tests to check if anything
127+regressed due to the bug fix.
128+
129+If the tests fail, you will have to fix them before your bug fix can be
130+approved and merged into trunk. If the tests pass then commit and push your
131+code by,
132+
133+
134+
135+ $ bzr commit -m "Implemented bug fix" --fixes lp:bug-number
136+ $ bzr push lp:~launchpadid/music-app/branch-name
137+
138+Running Tests
139+=============
140+
141+Please check README-Autopilot.md on how to run the tests.
142+They are quite explanatory and will help you get started.
143+
144+Code Style
145+==========
146+
147+We are trying to use a common code style throughout the code base to maintain
148+uniformity and improve code clarity. Listed below are the code styles guides
149+that will be followed based on the language used.
150+
151+* [QML](http://qt-project.org/doc/qt-5/qml-codingconventions.html)
152+* [JS, C++](https://google-styleguide.googlecode.com/svn/trunk/cppguide.xml)
153+* Python - Code should follow PEP8 and Flake regulations
154+
155+Note: In the QML code convention, ignore the Javascript code section guidelines.
156+So the sections that should be taken into account in the QML conventions are QML
157+Object Declarations, Grouped Properties and Lists.
158+
159+Debugging
160+=========
161+
162+GDB allows one to see what is going on `inside' another program while it executes,
163+or what another program was doing at the moment it crashed. It is a pretty niffty tool which allows you
164+to get the crash log that can help a developer pin point the cause of the crash.
165+Before reproducing crash it is good to create symbols table for gdb, by using command:
166+
167+
168+
169+ $ cd branch-name
170+
171+To run GDB:
172+
173+
174+
175+ $ gdb qmlscene
176+
177+At this point, you are inside the gdb prompt. Run your application as you normally would.
178+
179+ $ app/music-app.qml
180+
181+Your app is now running and monitored by GDB. Reproduce the steps in your app to make it crash. Once it does crash,
182+
183+ bt
184+
185+That's about it. To quit GDB, type quit to return back to the normal terminal console.
186+
187+ quit
188+
189+
190+
191
192=== added file 'README-Mergeproposal.md'
193--- README-Mergeproposal.md 1970-01-01 00:00:00 +0000
194+++ README-Mergeproposal.md 2015-12-22 01:26:28 +0000
195@@ -0,0 +1,28 @@
196+Prerequisites to approving a Merge Proposal (MP)
197+================================================
198+
199+Over time, it has been found that insufficient testing by reviewers sometimes leads to music app trunk not buildable in Qtcreator due to manifest errors, or translation pot file not updated. As such, please follow the checklist below before top-approving a MP.
200+
201+Checklist
202+=========
203+
204+* Does the MP add/remove user visible strings? If Yes, has the pot file been
205+ updated?
206+
207+* Does the MP change the UI? If Yes, has it been approved by design?
208+
209+* Did you perform an exploratory manual test run of your code change and any
210+ related functionality?
211+
212+* If the MP fixes a bug or implements a feature, are there accompanying unit
213+ and autopilot tests?
214+
215+* Is the music app trunk buildable and runnable using Qtcreator?
216+
217+* Was the debian changelog updated?
218+
219+* Was the copyright years updated if necessary?
220+
221+The above checklist is more of a guideline to help music app trunk stay buildable,
222+stable and up to date.
223+
224
225=== added file 'README-Translations.md'
226--- README-Translations.md 1970-01-01 00:00:00 +0000
227+++ README-Translations.md 2015-12-22 01:26:28 +0000
228@@ -0,0 +1,35 @@
229+Updating translations
230+=====================
231+
232+Translations for the Music app happen in [Launchpad Translations](https://translations.launchpad.net/music-app) and are automatically committed daily on the trunk branch in the po/ folder.
233+
234+They are then built and installed as part of the package build, so that
235+developers don't really need to worry about them.
236+
237+However, there is one task that needs to be taken care of: exposing new
238+translatable messages to translators. So whenever you add new translatable
239+messages in the code, make sure to follow these steps:
240+
241+ 1. Run click-buddy retaining the build directory:
242+ $ click-buddy --dir . --no-clean
243+ 2. Copy the .pot file from the <build dir> mentioned in the output to your
244+ original source:
245+ $ cp <build dir>/po/*.pot po/
246+ 3. Commit the generated .pot file:
247+ $ bzr commit -m "Updated translation template"
248+ 4. Push the branch and send a merge proposal as usual
249+
250+And that's it, once the branch lands Launchpad should take care of all the rest!
251+
252+Behind the scenes
253+=================
254+
255+Behind the scenes, whenever the po/*.pot file (also known as translations template) is committed to trunk Launchpad reads it and updates the translatable strings exposed in the web UI. This will enable translators to work on the new strings.
256+The translations template contains all translatable strings that have been extracted from the source code files.
257+
258+Launchpad will then store translations in its database and will commit them daily in the form of textual po/*.po files to trunk. The PO files are also usually referred to as the translations files. You'll find a translation file for each language the app has got at least a translated message available for.
259+
260+Translations for core apps follow the standard [gettext format](https://www.gnu.org/software/gettext/).
261+
262+ [Launchpad Translations](https://translations.launchpad.net/music-app)
263+ [Gettext format](https://www.gnu.org/software/gettext/)
264
265=== removed file 'README.autopilot'
266--- README.autopilot 2015-11-03 02:43:10 +0000
267+++ README.autopilot 1970-01-01 00:00:00 +0000
268@@ -1,76 +0,0 @@
269-# Running Autopilot tests
270-
271-Music App follows a test driven development where autopilot tests are run before every merge into trunk. If you are submitting your bugfix/patch to the music app, please follow the following steps below to ensure that all tests pass before proposing a merge request.
272-
273-If you are looking for more info about Autopilot or writing AP tests for the music app, here are some useful links to help you:
274-
275-- http://developer.ubuntu.com/start/quality
276-- https://developer.ubuntu.com/api/autopilot/python/1.5.0/
277-
278-For help and options on running tests, see:
279-
280-- https://developer.ubuntu.com/en/start/platform/guides/running-autopilot-tests/
281-
282-## Prerequisites
283-
284-Install the following autopilot packages required to run the tests,
285-$ sudo apt-get install python3-autopilot libautopilot-qt ubuntu-ui-toolkit-autopilot python3-autopilot-vis
286-
287-## Running tests on the desktop
288-
289-Using terminal:
290-
291-* Branch the music app code, for example,
292- $ bzr branch lp:music-app
293-
294-* Navigate to the tests/autopilot directory.
295- $ cd music-app/tests/autopilot
296-
297-* run all tests.
298- $ autopilot3 run -vv music_app
299-
300- to list all tests:
301- $ autopilot3 list music_app
302-
303- To run only one test (for instance: music_app.tests.test_music.TestMainWindow.test_swipe_to_delete_song)
304- $ autopilot3 run -vv music_app.tests.test_music.TestMainWindow.test_swipe_to_delete_song
305-
306- Debugging tests using autopilot vis
307- $ autopilot3 launch -i Qt qmlscene app/music-app.qml
308- $ autopilot3 vis
309-
310-## Running tests on device or emulator:
311-
312-NOTE: Prior to running the tests on the device, you will need to do the following if there is music on the system:
313-
314- $ mv /home/phablet/Music /home/phablet/.Music
315- $ restart mediascanner-2.0
316-
317-Using autopkg:
318-
319-* Branch the Music app code, for example,
320- $ bzr branch lp:music-app
321-
322-* Navigate to the source directory.
323- $ cd music-app
324-
325-* Build a click package
326- $ click-buddy .
327-
328-* Run the tests on device (assumes only one click package in the directory)
329- $ adt-run . *.click --- ssh -s adb -- -p <PASSWORD>
330-
331-# Resolving mediascanner2 schema issues when tests fail
332-
333-Occasionally the schema for the mediascanner2 (ms2) service is incremented and updates to the mocked ms2 database are required. The following steps should be taken to update the database and sql file when this happens.
334-
335-1. Dump a new schema file for the database for debugging:
336- $ sqlite3 ~/.cache/mediascanner-2.0/mediastore.db .sch > tests/autopilot/music_app/content/mediascanner-2.0/mediastore.sch
337-
338-2. Edit the SQL file to use the new schemaVersion number:
339- $ vi tests/autopilot/music_app/content/mediascanner-2.0/mediastore.sql
340-
341-3. If the tests still do not pass, execute the following bzr command to debug what has changed in the schema and update the SQL file to insert the values for each column in the 'media' table accordingly:
342- $ bzr diff tests/autopilot/music_app/content/mediascanner-2.0/mediastore.sch
343- $ vi tests/autopilot/music_app/content/mediascanner-2.0/mediastore.sql
344-
345
346=== added file 'README.md'
347--- README.md 1970-01-01 00:00:00 +0000
348+++ README.md 2015-12-22 01:26:28 +0000
349@@ -0,0 +1,25 @@
350+ReadMe - Ubuntu Music App
351+===========================
352+Ubuntu Music App is the official music app for Ubuntu Touch. We follow an open
353+source model where the code is available to anyone to branch and hack on. The
354+ubuntu music app follows a test driven development (TDD) where tests are
355+written in parallel to feature implementation to help spot regressions easier.
356+
357+Dependencies
358+============
359+**DEPENDENCIES ARE NEEDED TO BE INSTALLED TO BUILD AND RUN THE APP**.
360+
361+A complete list of dependencies for the project can be found in music-app/debian/control
362+
363+The following essential packages are also required to develop this app:
364+* [ubuntu-sdk](http://developer.ubuntu.com/start)
365+* intltool - run `sudo apt-get install intltool`
366+
367+Useful Links
368+============
369+Here are some useful links with regards to the Music App development.
370+
371+* [Home Page](https://developer.ubuntu.com/en/community/core-apps/music/)
372+* [Music App Wiki](https://wiki.ubuntu.com/Touch/CoreApps/Music)
373+* [Designs](https://developer.ubuntu.com/en/community/core-apps/music/#design)
374+* [Project page](https://launchpad.net/music-app)
375
376=== removed file 'README.translations'
377--- README.translations 2014-04-27 18:25:48 +0000
378+++ README.translations 1970-01-01 00:00:00 +0000
379@@ -1,40 +0,0 @@
380-# Updating translations
381-
382-Translations for the Music app happen in [Launchpad Translations][] and
383-are automatically committed daily on the trunk branch in the po/ folder.
384-
385-They are then built and installed as part of the package build, so that
386-developers don't really need to worry about them.
387-
388-However, there is one task that needs to be taken care of: exposing new
389-translatable messages to translators. So whenever you add new translatable
390-messages in the code, make sure to follow these steps:
391-
392- 1. Run click-buddy retaining the build directory:
393- `click-buddy --dir . --no-clean`
394- 2. Copy the .pot file from the <build dir> mentioned in the output to your
395- original source:
396- `cp <build dir>/po/*.pot po/`
397- 3. Commit the generated .pot file:
398- `bzr commit -m"Updated translation template"`
399- 4. Push the branch and send a merge proposal as usual
400-
401-And that's it, once the branch lands Launchpad should take care of all the rest!
402-
403-# Behind the scenes
404-
405-Behind the scenes, whenever the po/*.pot file (also known as translations template)
406-is committed to trunk Launchpad reads it and updates the translatable strings
407-exposed in the web UI. This will enable translators to work on the new strings.
408-The translations template contains all translatable strings that have been
409-extracted from the source code files.
410-
411-Launchpad will then store translations in its database and will commit them daily
412-in the form of textual po/*.po files to trunk. The PO files are also usually
413-referred to as the translations files. You'll find a translation file for each
414-language the app has got at least a translated message available for.
415-
416-Translations for core apps follow the standard [gettext format].
417-
418- [Launchpad Translations]: https://translations.launchpad.net/music-app
419- [gettext format]: https://www.gnu.org/software/gettext/
420
421=== modified file 'debian/changelog'
422--- debian/changelog 2015-12-03 19:53:17 +0000
423+++ debian/changelog 2015-12-22 01:26:28 +0000
424@@ -6,6 +6,9 @@
425 [ Ken VanDine ]
426 * Install the content-hub json file in the correct place for peer registry
427
428+ [ Girish Rawat ]
429+ * Expanded and updated READMEs
430+
431 -- Andrew Hayzen <ahayzen@gmail.com> Thu, 03 Dec 2015 14:11:35 +0000
432
433 music-app (2.2ubuntu2) vivid; urgency=medium

Subscribers

People subscribed via source and target branches

to all changes: