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

Proposed by Girish
Status: Merged
Approved by: Bartosz Kosiorek
Approved revision: 256
Merged at revision: 255
Proposed branch: lp:~emailgirishrawat/ubuntu-calculator-app/READMEs
Merge into: lp:ubuntu-calculator-app
Diff against target: 475 lines (+313/-123)
8 files modified
README (+0/-83)
README-Autopilot.md (+78/-0)
README-Developers.md (+71/-0)
README-Mergeproposal.md (+28/-0)
README-Translations.md (+41/-0)
README-Unittest.md (+36/-0)
README.md (+59/-0)
README.translations (+0/-40)
To merge this branch: bzr merge lp:~emailgirishrawat/ubuntu-calculator-app/READMEs
Reviewer Review Type Date Requested Status
Jenkins Bot continuous-integration Approve
Bartosz Kosiorek Approve
Review via email: mp+281174@code.launchpad.net

Commit message

Updated and extended READMEs.

Description of the change

Updated and extended READMEs.

To post a comment you must log in.
Revision history for this message
Bartosz Kosiorek (gang65) wrote :

It is very nice improvement.
I have added some small inline comments.

Thanks!

review: Needs Fixing
256. By Girish

Fixed typos.

Revision history for this message
Girish (emailgirishrawat) wrote :

Bartosz Kosiorek : Fixed. :)

Revision history for this message
Bartosz Kosiorek (gang65) :
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=== removed file 'README'
2--- README 2015-11-27 11:57:09 +0000
3+++ README 1970-01-01 00:00:00 +0000
4@@ -1,83 +0,0 @@
5-# Ubuntu Calculator App
6-Default Calculator application for Ubuntu devices.
7-
8-# Useful links
9-- Project page: https://launchpad.net/ubuntu-calculator-app
10-- Design page:
11- https://docs.google.com/presentation/d/1EiIELGizPHrd0TY7JdNwULbiqPYfOyEEI5CS87n7QlY/edit
12-
13-
14-# How to develop
15-
16-
17-## Calculation engine.
18-
19-Current calculation engine is math.js version 1.1.0.
20-You could download latest version from webpage:
21- http://mathjs.org
22-
23-The engine was sligtly modified to properly work with Ubuntu-Calculator-App.
24-
25-
26-## Style guide
27-
28-General idea above style guide is:
29-"All code in any code-base should look like a single person typed it, no matter how many people contributed."
30-
31-If you're editing code, take a few minutes to look at the code around you and determine its style. If they use spaces around all their arithmetic operators, you should too. If their comments have little boxes of hash marks around them, make your comments have little boxes of hash marks around them too.
32-
33-The point of having style guidelines is to have a common vocabulary of coding so people can concentrate on what you're saying rather than on how you're saying it. If code you add to a file looks drastically different from the existing code around it, it throws readers out of their rhythm when they go to read it. Avoid this.
34-
35-More information about style guides, and why we need it:
36- http://addyosmani.com/blog/javascript-style-guides-and-beautifiers/
37-
38-Curent style guide for ubuntu-calculator-app is:
39- https://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml
40-
41-
42-## Clean/Beautiful Code
43-
44-When you creating code, every function/variable name should be meaningful and has easy to understand form. The names should reveal intent of creator. With good names you even do not need an comments. The code is documentting itself. We should avoid comments if it is not necessary.
45-If someone during review, ask you to add comment then you should check if names are reveal your intent.
46-
47-More information about clean/beautiful code is available in books:
48- * Clean Code: A Handbook of Agile Software Craftsmanship Paperback, by Robert C. Martin
49- * Beautiful Code: Leading Programmers Explain How They Think, by Andy Oram
50-
51-
52-## Run the autopilot tests
53-
54-Prerequisites:
55- sudo apt-get install ubuntu-ui-toolkit-autopilot
56-
57-Once the app has been built, you can go to the build directory and run:
58-
59- cd tests/autopilot
60- autopilot run ubuntu_calculator_app
61-
62-
63-## Profiling calculator
64-
65-To successfuly run profiler on your device, you must modify ubuntu-calculator-app.apparmor file,
66-and add "networking" policy group:
67-
68- "policy_groups": [
69- "networking"
70- ],
71-
72-The bug was already submitted at:
73-https://bugs.launchpad.net/ubuntu-sdk-ide/+bug/1520551
74-
75-Next you will need follow instruction:
76-
77- 1. Connect your device to PC and make sure it is unlocked, and Developer Mode is enable
78- 2. Run Ubuntu SDK IDE
79- 3. Open Calculator project and generate Unix Makefiles for Arm.
80- 4. Select Analyze > QML Profiler
81- 5. Select the Start button to start Calculator from the QML Profiler.
82- 6. After reproduce issue you must press Stop button.
83-
84-More information about profiling is available at:
85-http://doc.qt.io/qtcreator/creator-qml-performance-monitor.html
86-
87-
88
89=== added file 'README-Autopilot.md'
90--- README-Autopilot.md 1970-01-01 00:00:00 +0000
91+++ README-Autopilot.md 2015-12-22 09:02:33 +0000
92@@ -0,0 +1,78 @@
93+Running Autopilot tests
94+=======================
95+
96+The calculator 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 calculator app, please follow the following steps below to ensure that all tests pass before proposing a merge request.
97+
98+If you are looking for more info about Autopilot or writing AP tests for the calculator app, here are some useful links to help you:
99+
100+- [Ubuntu - Quality](http://developer.ubuntu.com/start/quality)
101+- [Ubuntu - Autopilot](https://developer.ubuntu.com/api/autopilot/python/1.5.0/)
102+
103+For help and options on running tests, see:
104+
105+- [Autopilot Tests](https://developer.ubuntu.com/en/start/platform/guides/running-autopilot-tests/)
106+
107+Prerequisites
108+=============
109+
110+Install the following autopilot packages required to run the tests,
111+
112+ $ sudo apt-get install ubuntu-ui-toolkit-autopilot
113+
114+Running tests on the desktop
115+============================
116+
117+Using terminal:
118+
119+* Branch the Calculator app code, for example,
120+
121+ $ bzr branch lp:ubuntu-calculator-app
122+
123+* Navigate to the tests/autopilot directory.
124+
125+ $ cd ubuntu-calculator-app/tests/autopilot
126+
127+* run all tests.
128+
129+ $ autopilot3 run -vv ubuntu_calculator_app
130+
131+* to list all tests:
132+
133+ $ autopilot3 list ubuntu_calculator_app
134+
135+ * To run only one test (for instance: ubuntu_calculator_app.tests.test_main.MainTestCase.test_divide_by_zero)
136+
137+ $ autopilot3 run -vv ubuntu_calculator_app.tests.test_main.MainTestCase.test_divide_by_zero
138+
139+* Debugging tests using autopilot vis
140+
141+ $ autopilot3 launch -i Qt qmlscene app/ubuntu-calculator-app.qml
142+
143+ $ autopilot3 vis
144+
145+Running tests using Ubuntu SDK
146+==============================
147+
148+Refer this [tutorial](https://developer.ubuntu.com/en/start/platform/guides/running-autopilot-tests/) to run tests on Ubuntu SDK:
149+
150+Running tests on device or emulator:
151+====================================
152+
153+Using autopkg:
154+
155+* Branch the Calculator app code, for example,
156+
157+ $ bzr branch lp:ubuntu-calculator-app
158+
159+* Navigate to the source directory.
160+
161+ $ cd ubuntu-calculator-app
162+
163+* Build a click package
164+
165+ $ click-buddy .
166+
167+* Run the tests on device (assumes only one click package in the directory)
168+
169+ $ adt-run . *.click --- ssh -s adb -- -p <PASSWORD>
170+
171
172=== added file 'README-Developers.md'
173--- README-Developers.md 1970-01-01 00:00:00 +0000
174+++ README-Developers.md 2015-12-22 09:02:33 +0000
175@@ -0,0 +1,71 @@
176+Dependencies
177+============
178+**DEPENDENCIES ARE NEEDED TO BE INSTALLED TO BUILD AND RUN THE APP**.
179+
180+A complete list of dependencies for the project can be found in ubuntu-calculator-app/debian/control
181+
182+The following essential packages are also required to develop this app:
183+* [ubuntu-sdk](http://developer.ubuntu.com/start)
184+* intltool - run `sudo apt-get install intltool
185+
186+Submitting a patch upstream
187+===========================
188+
189+If you want to submit a bug fix you can do so by branching the code as shown
190+above, implementing the fixes and running to see if it fixed the issue. We also
191+request that you run the Autopilot nad unit tests to check if anything
192+regressed due to the bug fix.
193+
194+If the tests fail, you will have to fix them before your bug fix can be
195+approved and merged into trunk. If the tests pass then commit and push your
196+code by,
197+
198+ $ bzr commit -m "Implemented bug fix" --fixes lp:bug-number
199+ $ bzr push lp:~launchpadid/ubuntu-calculator-app/branch-name
200+
201+Running Tests
202+=============
203+
204+Please check `README-Autopilot.md` and `README-Unittest.md` on how to run the tests.
205+They are quite explanatory and will help you get started.
206+
207+Code Style
208+==========
209+
210+We are trying to use a common code style throughout the code base to maintain
211+uniformity and improve code clarity. Listed below are the code styles guides
212+that will be followed based on the language used.
213+
214+* [QML](http://qt-project.org/doc/qt-5/qml-codingconventions.html)
215+* [JS, C++](https://google-styleguide.googlecode.com/svn/trunk/cppguide.xml)
216+* Python - Code should follow PEP8 and Flake regulations
217+
218+Note: In the QML code convention, ignore the Javascript code section guidelines.
219+So the sections that should be taken into account in the QML conventions are QML
220+Object Declarations, Grouped Properties and Lists.
221+
222+Debugging
223+=========
224+
225+GDB allows one to see what is going on `inside` another program while it executes,
226+or what another program was doing at the moment it crashed. It is a pretty niffty tool which allows you
227+to get the crash log that can help a developer pin point the cause of the crash.
228+Before reproducing crash it is good to create symbols table for gdb, by using command:
229+
230+ $ cd branch-name
231+
232+To run GDB:
233+
234+ $ gdb qmlscene
235+
236+At this point, you are inside the gdb prompt. Run your application as you normally would.
237+
238+ run app/ubuntu-calculator-app.qml
239+
240+Your app is now running and monitored by GDB. Reproduce the steps in your app to make it crash. Once it does crash,
241+
242+ bt
243+
244+That's about it. To quit GDB, type quit to return back to the normal terminal console.
245+
246+ quit
247
248=== added file 'README-Mergeproposal.md'
249--- README-Mergeproposal.md 1970-01-01 00:00:00 +0000
250+++ README-Mergeproposal.md 2015-12-22 09:02:33 +0000
251@@ -0,0 +1,28 @@
252+Prerequisites to approving a Merge Proposal (MP)
253+================================================
254+
255+Over time, it has been found that insufficient testing by reviewers sometimes leads to calculator 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.
256+
257+Checklist
258+=========
259+
260+* Does the MP add/remove user visible strings? If Yes, has the pot file been
261+ updated?
262+
263+* Does the MP change the UI? If Yes, has it been approved by design, or
264+ discussed with some of the Calculator developers?
265+
266+* Did you perform an exploratory manual test run of your code change and any
267+ related functionality?
268+
269+* If the MP fixes a bug or implements a feature, are there accompanying unit
270+ and autopilot tests?
271+
272+* Is the calculator app trunk buildable and runnable using Qtcreator?
273+
274+* Was the debian changelog updated?
275+
276+* Was the copyright years updated if necessary?
277+
278+The above checklist is more of a guideline to help calculator app trunk stay buildable,
279+stable and up to date.
280
281=== added file 'README-Translations.md'
282--- README-Translations.md 1970-01-01 00:00:00 +0000
283+++ README-Translations.md 2015-12-22 09:02:33 +0000
284@@ -0,0 +1,41 @@
285+Updating translations
286+=====================
287+
288+Translations for the Calculator app happen in [Launchpad Translations](https://translations.launchpad.net/ubuntu-calculator-app) and are automatically committed daily on the trunk branch in the po/ folder.
289+
290+They are then built and installed as part of the package build, so that
291+developers don't really need to worry about them.
292+
293+However, there is one task that needs to be taken care of: exposing new
294+translatable messages to translators. So whenever you add new translatable
295+messages in the code, make sure to follow these steps:
296+
297+ 1. Run click-buddy retaining the build directory:
298+ $ click-buddy --dir . --no-clean
299+ 2. Copy the .pot file from the <build dir> mentioned in the output to your
300+ original source:
301+ $ cp <build dir>/po/*.pot po/
302+ 3. Commit the generated .pot file:
303+ $ bzr commit -m"Updated translation template"
304+ 4. Push the branch and send a merge proposal as usual
305+
306+And that's it, once the branch lands Launchpad should take care of all the rest!
307+
308+Behind the scenes
309+=================
310+
311+Behind the scenes, whenever the po/*.pot file (also known as translations template)
312+is committed to trunk Launchpad reads it and updates the translatable strings
313+exposed in the web UI. This will enable translators to work on the new strings.
314+The translations template contains all translatable strings that have been
315+extracted from the source code files.
316+
317+Launchpad will then store translations in its database and will commit them daily
318+in the form of textual po/*.po files to trunk. The PO files are also usually
319+referred to as the translations files. You'll find a translation file for each
320+language the app has got at least a translated message available for.
321+
322+Translations for core apps follow the standard [gettext format](https://www.gnu.org/software/gettext/).
323+
324+ [Launchpad Translations](https://translations.launchpad.net/ubuntu-calculator-app)
325+ [gettext format](https://www.gnu.org/software/gettext/)
326
327=== added file 'README-Unittest.md'
328--- README-Unittest.md 1970-01-01 00:00:00 +0000
329+++ README-Unittest.md 2015-12-22 09:02:33 +0000
330@@ -0,0 +1,36 @@
331+Running QML Unit Tests
332+======================
333+
334+QML Unit Tests help with testing the internal working of components while
335+autopilot tests help with testing the UI workflow as experience by the user.
336+Running QML tests is quite simple and very fast.
337+
338+If you are submitting your bugfix/patch to the calculator app, please follow the
339+following steps below to check whether that all tests pass before proposing a
340+merge request.
341+
342+Running all unit test at once
343+=============================
344+
345+* If you want to run all tests, then run the following command,
346+
347+ $ ctest --output-on-failure
348+
349+* If you want more verbose output, then run,
350+
351+ $ ctest -VV
352+
353+Running individual test cases,
354+==============================
355+
356+If you want to run testcases individually, you can do so by navigating to the
357+unit tests folder by,
358+
359+* Navigate to the tests/unit directory
360+
361+ $ cd tests/unit
362+
363+* Run the test by providing their filenames
364+
365+ $ qmltestrunner tst_hellocomponent.qml
366+
367
368=== added file 'README.md'
369--- README.md 1970-01-01 00:00:00 +0000
370+++ README.md 2015-12-22 09:02:33 +0000
371@@ -0,0 +1,59 @@
372+ReadMe - Ubuntu Calculator App
373+===========================
374+Ubuntu Calculator App is the official calculator app for Ubuntu Touch. We follow an open
375+source model where the code is available to anyone to branch and hack on. The
376+ubuntu calculator app follows a test driven development (TDD) where tests are
377+written in parallel to feature implementation to help spot regressions easier.
378+
379+Dependencies
380+============
381+**DEPENDENCIES ARE NEEDED TO BE INSTALLED TO BUILD AND RUN THE APP**.
382+
383+A complete list of dependencies for the project can be found in ubuntu-calculator-app/debian/control
384+
385+The following essential packages are also required to develop this app:
386+* [ubuntu-sdk](http://developer.ubuntu.com/start)
387+* intltool - run `sudo apt-get install intltool
388+
389+Calculation engine
390+==================
391+
392+Current calculation engine is math.js version 1.1.0.
393+You could download latest version from webpage:
394+ http://mathjs.org
395+
396+The engine was sligtly modified to properly work with Ubuntu-Calculator-App.
397+
398+Profiling calculator
399+====================
400+
401+To successfuly run profiler on your device, you must modify ubuntu-calculator-app.apparmor file,
402+and add "networking" policy group:
403+
404+ "policy_groups": [
405+ "networking"
406+ ],
407+
408+The bug was already submitted at:
409+https://bugs.launchpad.net/ubuntu-sdk-ide/+bug/1520551
410+
411+Next you will need follow instruction:
412+
413+ 1. Connect your device to PC and make sure it is unlocked, and Developer Mode is enable
414+ 2. Run Ubuntu SDK IDE
415+ 3. Open Calculator project and generate Unix Makefiles for Arm.
416+ 4. Select Analyze > QML Profiler
417+ 5. Select the Start button to start Calculator from the QML Profiler.
418+ 6. After reproduce issue you must press Stop button.
419+
420+More information about profiling is available at:
421+http://doc.qt.io/qtcreator/creator-qml-performance-monitor.html
422+
423+Useful Links
424+============
425+Here are some useful links with regards to the Calculator App development.
426+
427+* [Home Page](https://developer.ubuntu.com/en/community/core-apps/calculator/)
428+* [Calculator App Wiki](https://wiki.ubuntu.com/Touch/CoreApps/Calculator)
429+* [Designs](https://developer.ubuntu.com/en/community/core-apps/calculator/#design)
430+* [Project page](https://launchpad.net/ubuntu-calculator-app)
431
432=== removed file 'README.translations'
433--- README.translations 2015-04-09 18:43:16 +0000
434+++ README.translations 1970-01-01 00:00:00 +0000
435@@ -1,40 +0,0 @@
436-# Updating translations
437-
438-Translations for the Calculator app happen in [Launchpad Translations] and
439-are automatically committed daily on the trunk branch in the po/ folder.
440-
441-They are then built and installed as part of the package build, so that
442-developers don't really need to worry about them.
443-
444-However, there is one task that needs to be taken care of: exposing new
445-translatable messages to translators. So whenever you add new translatable
446-messages in the code, make sure to follow these steps:
447-
448- 1. Run click-buddy retaining the build directory:
449- $ click-buddy --dir . --no-clean
450- 2. Copy the .pot file from the <build dir> mentioned in the output to your
451- original source:
452- $ cp <build dir>/po/*.pot po/
453- 3. Commit the generated .pot file:
454- $ bzr commit -m"Updated translation template"
455- 4. Push the branch and send a merge proposal as usual
456-
457-And that's it, once the branch lands Launchpad should take care of all the rest!
458-
459-# Behind the scenes
460-
461-Behind the scenes, whenever the po/*.pot file (also known as translations template)
462-is committed to trunk Launchpad reads it and updates the translatable strings
463-exposed in the web UI. This will enable translators to work on the new strings.
464-The translations template contains all translatable strings that have been
465-extracted from the source code files.
466-
467-Launchpad will then store translations in its database and will commit them daily
468-in the form of textual po/*.po files to trunk. The PO files are also usually
469-referred to as the translations files. You'll find a translation file for each
470-language the app has got at least a translated message available for.
471-
472-Translations for core apps follow the standard [gettext format].
473-
474- [Launchpad Translations]: https://translations.launchpad.net/ubuntu-calculator-app
475- [gettext format]: https://www.gnu.org/software/gettext/

Subscribers

People subscribed via source and target branches