Merge lp:~emailgirishrawat/ubuntu-calendar-app/READMEs into lp:ubuntu-calendar-app

Proposed by Girish
Status: Merged
Merged at revision: 738
Proposed branch: lp:~emailgirishrawat/ubuntu-calendar-app/READMEs
Merge into: lp:ubuntu-calendar-app
Diff against target: 306 lines (+246/-14)
6 files modified
README (+20/-6)
README.autopilot (+65/-0)
README.developers (+78/-0)
README.mergeproposal (+31/-0)
README.translations (+13/-8)
README.unittest (+39/-0)
To merge this branch: bzr merge lp:~emailgirishrawat/ubuntu-calendar-app/READMEs
Reviewer Review Type Date Requested Status
Jenkins Bot continuous-integration Approve
Dan Chapman  Approve
Review via email: mp+280392@code.launchpad.net

Commit message

Expanded and updated READMEs.

Description of the change

Expanded and updated READMEs.

Added:
* README.autopilot
* README.developers
* README.mergeproposal
* README.unittest

Modified:
* README
* README.translations

To post a comment you must log in.
Revision history for this message
Dan Chapman  (dpniel) wrote :

Looks good. Just a few issues for which I've left comments inline.

review: Needs Fixing
Revision history for this message
Dan Chapman  (dpniel) wrote :

See comments in line

Revision history for this message
Girish (emailgirishrawat) wrote :

So should I remove "Note: As of vivid 15.04, the autopilot tests are broken in trunk As such autopilot failures can be excused until they are fixed."?

Revision history for this message
Girish (emailgirishrawat) wrote :

Fixed it.

Revision history for this message
Dan Chapman  (dpniel) wrote :

Ok, just one more small issue I can see.

review: Needs Fixing
Revision history for this message
Dan Chapman  (dpniel) wrote :

LGTM

review: Approve
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README'
2--- README 2013-09-26 05:15:16 +0000
3+++ README 2015-12-14 17:45:26 +0000
4@@ -1,9 +1,23 @@
5-Welcome the Ubuntu Calendar!
6-
7-Currently this application is fully implemented in QML/JS.
8-All you need to launch this all is Qt5 and the qmlscene viewer:
9+ReadMe - Ubuntu Calendar App
10+============================
11+
12+Ubuntu Calendar App is the official calendar app for Ubuntu Touch. We follow an open source model where the code is available to anyone to branch and to hack on.
13+The ubuntu calendaar app follows a test driven development (TDD) where tests are written in parallel to feature implementation to help spot regressions easier.
14+
15+Useful Links
16+============
17+
18+Here are some useful links with regards to the Calendar App development.
19+
20+* Home Page - https://developer.ubuntu.com/en/community/core-apps/calendar/
21+* Calendar App Wiki - https://wiki.ubuntu.com/Touch/CoreApps/Calendar
22+* Designs - https://docs.google.com/presentation/d/14NIPecPFKb_8Ad3O4suEGJqVOw9bC4n0s63uWalbZ98/edit#slide=id.p
23+* Project page - https://launchpad.net/ubuntu-calendar-app
24+
25+Launch
26+======
27+This application is implemented in QML/JS.
28+You need Qt5 and the qmlscene viewer to launch this application.
29
30 $ cd ubuntu-calendar-app
31 $ qmlscene calendar.qml
32-
33-To test the application on the device check out the "testrun.sh" script.
34
35=== added file 'README.autopilot'
36--- README.autopilot 1970-01-01 00:00:00 +0000
37+++ README.autopilot 2015-12-14 17:45:26 +0000
38@@ -0,0 +1,65 @@
39+Running Autopilot tests
40+=======================
41+
42+Ubuntu Calendar App follows a test driven development where autopilot tests are run before every merge into trunk.
43+If you are submitting your bugfix/patch to the calendar app, please follow the following steps below to ensure that all tests pass before proposing a merge request.
44+
45+If you are looking for more info about Autopilot or writing AP tests for the calendar app, here are some useful links to help you:
46+
47+* http://developer.ubuntu.com/start/quality
48+* https://developer.ubuntu.com/api/autopilot/python/1.5.0/
49+
50+For help and options on running tests, see:
51+
52+* https://developer.ubuntu.com/en/start/platform/guides/running-autopilot-tests/
53+
54+Prerequisites
55+=============
56+
57+Install the following autopilot packages required to run the tests,
58+ $ sudo apt-get install python3-autopilot libautopilot-qt ubuntu-ui-toolkit-autopilot python3-autopilot-vis
59+
60+address-book-service-testability package may also be required if not already installed
61+ $ sudo apt-get install address-book-service-testability
62+
63+Running tests on the desktop
64+============================
65+
66+Using terminal:
67+
68+* Branch the calendar app code,
69+ $ bzr branch lp:ubuntu-calendar-app
70+
71+* Build the calendar app,
72+ $ mkdir builddir && cd builddir
73+ $ cmake .. && make -j3
74+ $ cd ..
75+
76+* Navigate to the tests/autopilot directory.
77+ $ cd tests/autopilot
78+
79+* run all tests.
80+ $ autopilot3 run -vv ubuntu_calendar_app
81+
82+ to list all tests:
83+ $ autopilot3 list ubuntu_calendar_app
84+
85+ To run only one test (for instance: test_change_week_across_year in TestWeekview.py):
86+ $ autopilot3 run -vv ubuntu_calendar_app.tests.test_weekview.TestWeekview.test_change_week_across_year
87+
88+ Debugging tests using autopilot vis
89+ $ autopilot3 launch -i Qt qmlscene ../../app/ubuntu-calendar-app.qml
90+ $ autopilot3 vis
91+
92+Running tests using Ubuntu SDK
93+==============================
94+
95+https://developer.ubuntu.com/en/start/platform/guides/running-autopilot-tests/
96+
97+Running tests on device or emulator
98+===================================
99+
100+Using autopkg:
101+
102+1. navigate to the directory where the ubuntu-calendar-app branch is and run:
103+ $ adt-run ubuntu-calendar-app --click=com.ubuntu.calendar --- ssh -s adb -p YOURPASSWORD
104
105=== added file 'README.developers'
106--- README.developers 1970-01-01 00:00:00 +0000
107+++ README.developers 2015-12-14 17:45:26 +0000
108@@ -0,0 +1,78 @@
109+Building and running on Vivid Desktop (15.04)
110+=============================================
111+
112+Building and running the Ubuntu Calendar App is quite simple. You will require
113+Ubuntu 15.04 and higher to run on the desktop.
114+
115+ $ bzr branch lp:ubuntu-calendar-app branch-name
116+ $ cd branch-name
117+ $ mkdir builddir && cd builddir
118+ $ cmake .. && make -j3
119+ $ qmlscene ../app/ubuntu-calendar-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 and Unit 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+ $ bzr commit -m "Implemented bug fix" --fixes lp:bug-number
134+ $ bzr push lp:~launchpadid/ubuntu-calendar-app/branch-name
135+
136+Running Tests
137+=============
138+
139+Please check README.autopilot and README.unittest on how to run the tests.
140+They are quite explanatory and will help you get started.
141+
142+Code Style
143+==========
144+
145+We are trying to use a common code style throughout the code base to maintain
146+uniformity and improve code clarity. Listed below are the code styles guides
147+that will be followed based on the language used.
148+
149+* QML - http://qt-project.org/doc/qt-5/qml-codingconventions.html
150+* JS, C++ - https://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
151+* Python - Code should follow PEP8 and Flake regulations
152+
153+Note: In the QML code convention, ignore the Javascript code section guidelines.
154+So the sections that should be taken into account in the QML conventions are QML
155+Object Declarations, Grouped Properties and Lists.
156+
157+Debugging
158+=========
159+
160+GDB allows one to see what is going on `inside' another program while it executes,
161+or what another program was doing at the moment it crashed. It is a pretty niffty tool which allows you
162+to get the crash log that can help a developer pin point the cause of the crash.
163+Before reproducing crash it is good to create symbols table for gdb, by using command:
164+
165+ $ cd branch-name
166+ $ mkdir builddir && cd builddir
167+ $ cmake -DCMAKE_BUILD_TYPE=Debug .. && make -j3
168+
169+To run GDB:
170+
171+ $ gdb qmlscene
172+
173+At this point, you are inside the gdb prompt. Run your application as you normally would.
174+
175+ run ../app/ubuntu-calendar-app.qml
176+
177+Your app is now running and monitored by GDB. Reproduce the steps in your app to make it crash. Once it does crash,
178+
179+ bt
180+
181+That's about it. To quit GDB, type quit to return back to the normal terminal console.
182+
183+ quit
184+
185+
186+
187
188=== added file 'README.mergeproposal'
189--- README.mergeproposal 1970-01-01 00:00:00 +0000
190+++ README.mergeproposal 2015-12-14 17:45:26 +0000
191@@ -0,0 +1,31 @@
192+Prerequisites to approving a Merge Proposal (MP)
193+================================================
194+
195+Over time, it has been found that insufficient testing by reviewers sometimes
196+leads to calendar app trunk not buildable in Qtcreator due to manifest errors, or
197+translation pot file not updated. As such, please follow the checklist below
198+before top-approving a MP.
199+
200+Checklist
201+=========
202+
203+* Does the MP add/remove user visible strings? If Yes, has the pot file been
204+ updated?
205+
206+* Does the MP change the UI? If Yes, has it been approved by design?
207+
208+* Did you perform an exploratory manual test run of your code change and any
209+ related functionality?
210+
211+* If the MP fixes a bug or implements a feature, are there accompanying unit
212+ and autopilot tests?
213+
214+* Is the calendar app trunk buildable and runnable using Qtcreator?
215+
216+* Was the debian changelog updated?
217+
218+* Was the copyright years updated if necessary?
219+
220+The above checklist is more of a guideline to help calendar app trunk stay buildable,
221+stable and up to date.
222+
223
224=== modified file 'README.translations'
225--- README.translations 2014-10-17 05:49:22 +0000
226+++ README.translations 2015-12-14 17:45:26 +0000
227@@ -1,6 +1,7 @@
228-# Updating translations
229+Updating translations
230+=====================
231
232-Translations for the Calendar app happen in [Launchpad Translations][] and
233+Translations for the Calendar app happen in [Launchpad Translations] and
234 are automatically committed daily on the trunk branch in the po/ folder.
235
236 They are then built and installed as part of the package build, so that
237@@ -10,15 +11,19 @@
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 (or alternatively use cmake directly). E.g.:
242- `click-buddy --dir .`
243- 2. Commit the generated .pot file:
244- `bzr commit -m"Updated translation template"`
245- 3. Push the branch and send a merge proposal as usual
246+ 1. Run click-buddy retaining the build directory:
247+ $ click-buddy --dir . --no-clean
248+ 2. Copy the .pot file from the <build dir> mentioned in the output to your
249+ original source:
250+ $ cp <build dir>/po/*.pot po/
251+ 3. Commit the generated .pot file:
252+ $ bzr commit -m"Updated translation template"
253+ 4. Push the branch and send a merge proposal as usual
254
255 And that's it, once the branch lands Launchpad should take care of all the rest!
256
257-# Behind the scenes
258+Behind the scenes
259+=================
260
261 Behind the scenes, whenever the po/*.pot file (also known as translations template)
262 is committed to trunk Launchpad reads it and updates the translatable strings
263
264=== added file 'README.unittest'
265--- README.unittest 1970-01-01 00:00:00 +0000
266+++ README.unittest 2015-12-14 17:45:26 +0000
267@@ -0,0 +1,39 @@
268+Running QML Unit Tests
269+======================
270+
271+QML Unit Tests help with testing the internal working of components while
272+autopilot tests help with testing the UI workflow as experience by the user.
273+Running QML tests is quite simple and very fast.
274+
275+If you are submitting your bugfix/patch to the calendar app, please follow the
276+following steps below to check whether that all tests pass before proposing a
277+merge request.
278+
279+* Branch the calendar app code,
280+ $ bzr branch lp:ubuntu-calendar-app
281+
282+ $ mkdir builddir && cd builddir
283+ $ cmake .. && make -j3
284+
285+Running all unit test at once
286+=============================
287+
288+If you want to run all tests, then run the following command from the builddir,
289+
290+ $ ctest --output-on-failure
291+
292+If you want more verbose output, then run,
293+
294+ $ ctest -VV
295+
296+Running individual test cases,
297+==============================
298+
299+If you want to run testcases individually, you can do so by navigating to the
300+unit tests folder by,
301+
302+* Navigate to the tests/unit directory
303+ $ cd tests/unittests
304+
305+* Run the test by providing their filenames
306+ $ qmltestrunner tst_date.qml

Subscribers

People subscribed via source and target branches

to status/vote changes: