← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

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

 

Girish has proposed merging lp:~emailgirishrawat/ubuntu-calculator-app/READMEs into lp:ubuntu-calculator-app.

Commit message:
Updated and extended READMEs.

Requested reviews:
  Ubuntu Calculator Developers (ubuntu-calculator-dev)

For more details, see:
https://code.launchpad.net/~emailgirishrawat/ubuntu-calculator-app/READMEs/+merge/281174

Updated and extended READMEs.
-- 
Your team Ubuntu Calculator Developers is requested to review the proposed merge of lp:~emailgirishrawat/ubuntu-calculator-app/READMEs into lp:ubuntu-calculator-app.
=== removed file 'README'
--- README	2015-11-27 11:57:09 +0000
+++ README	1970-01-01 00:00:00 +0000
@@ -1,83 +0,0 @@
-# Ubuntu Calculator App
-Default Calculator application for Ubuntu devices.
-
-# Useful links
-- Project page: https://launchpad.net/ubuntu-calculator-app
-- Design page:
-  https://docs.google.com/presentation/d/1EiIELGizPHrd0TY7JdNwULbiqPYfOyEEI5CS87n7QlY/edit
-
-
-# How to develop
-
-
-## Calculation engine.
-
-Current calculation engine is math.js version 1.1.0. 
-You could download latest version from webpage:
-    http://mathjs.org
-
-The engine was sligtly modified to properly work with Ubuntu-Calculator-App.
-
-
-## Style guide
-
-General idea above style guide is:
-"All code in any code-base should look like a single person typed it, no matter how many people contributed."
-
-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.
-
-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.
-
-More information about style guides, and why we need it:
-    http://addyosmani.com/blog/javascript-style-guides-and-beautifiers/
-
-Curent style guide for ubuntu-calculator-app is:
-    https://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml
-
-
-## Clean/Beautiful Code
-
-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.
-If someone during review, ask you to add comment then you should check if names are reveal your intent.
-
-More information about clean/beautiful code is available in books:
- * Clean Code: A Handbook of Agile Software Craftsmanship Paperback, by Robert C. Martin
- * Beautiful Code: Leading Programmers Explain How They Think, by Andy Oram
-
-
-## Run the autopilot tests
-
-Prerequisites:
-    sudo apt-get install ubuntu-ui-toolkit-autopilot
-
-Once the app has been built, you can go to the build directory and run:
-
-    cd tests/autopilot
-    autopilot run ubuntu_calculator_app
-
-
-## Profiling calculator
-
-To successfuly run profiler on your device, you must modify ubuntu-calculator-app.apparmor file,
-and add "networking" policy group:
-
- "policy_groups": [
-    "networking"
- ],
-
-The bug was already submitted at:
-https://bugs.launchpad.net/ubuntu-sdk-ide/+bug/1520551
-
-Next you will need follow instruction:
-
- 1. Connect your device to PC and make sure it is unlocked, and Developer Mode is enable
- 2. Run Ubuntu SDK IDE
- 3. Open Calculator project and generate Unix Makefiles for Arm.
- 4. Select Analyze > QML Profiler 
- 5. Select the Start button to start Calculator from the QML Profiler.
- 6. After reproduce issue you must press Stop button.
-
-More information about profiling is available at:
-http://doc.qt.io/qtcreator/creator-qml-performance-monitor.html
-
-

=== added file 'README-Autopilot.md'
--- README-Autopilot.md	1970-01-01 00:00:00 +0000
+++ README-Autopilot.md	2015-12-22 06:35:00 +0000
@@ -0,0 +1,79 @@
+Running Autopilot tests
+=======================
+
+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.
+
+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:
+
+- [Ubuntu - Quality](http://developer.ubuntu.com/start/quality)
+- [Ubuntu - Autopilot](https://developer.ubuntu.com/api/autopilot/python/1.5.0/)
+
+For help and options on running tests, see:
+
+- [Autopilot Tests](https://developer.ubuntu.com/en/start/platform/guides/running-autopilot-tests/)
+
+Prerequisites
+=============
+
+Install the following autopilot packages required to run the tests,
+
+    $ sudo apt-get install ubuntu-ui-toolkit-autopilo
+
+Running tests on the desktop
+============================
+
+Using terminal:
+
+*  Branch the Calculator app code, for example,
+
+    $ bzr branch lp:ubuntu-calculator-app
+    
+*  Navigate to the tests/autopilot directory.
+
+    $ cd ubuntu-calculator-app/tests/autopilot
+
+*  run all tests.
+
+    $ autopilot3 run -vv ubuntu_calculator_app
+
+* to list all tests:
+
+    $ autopilot3 list ubuntu_calculator_app
+
+ * To run only one test (for instance: ubuntu_calculator_app.tests.test_main.MainTestCase.test_divide_by_zero
+)
+
+    $ autopilot3 run -vv ubuntu_calculator_app.tests.test_main.MainTestCase.test_divide_by_zero
+
+* Debugging tests using autopilot vis
+
+    $ autopilot3 launch -i Qt qmlscene app/ubuntu-calculator-app.qml
+
+    $ autopilot3 vis
+
+Running tests using Ubuntu SDK
+==============================
+
+Refer this [tutorial](https://developer.ubuntu.com/en/start/platform/guides/running-autopilot-tests/) to run tests on Ubuntu SDK: 
+
+Running tests on device or emulator:
+====================================
+
+Using autopkg:
+
+*  Branch the CAlculator app code, for example,
+
+    $ bzr branch lp:ubuntu-calculator-app
+
+*  Navigate to the source directory.
+
+    $ cd ubuntu-calculator-app
+
+*  Build a click package
+    
+    $ click-buddy .
+
+*  Run the tests on device (assumes only one click package in the directory)
+
+    $ adt-run . *.click --- ssh -s adb -- -p <PASSWORD>
+

=== added file 'README-Developers.md'
--- README-Developers.md	1970-01-01 00:00:00 +0000
+++ README-Developers.md	2015-12-22 06:35:00 +0000
@@ -0,0 +1,73 @@
+Dependencies
+============
+**DEPENDENCIES ARE NEEDED TO BE INSTALLED TO BUILD AND RUN THE APP**.
+
+A complete list of dependencies for the project can be found in ubuntu-calculator-app/debian/control
+
+The following essential packages are also required to develop this app:
+* [ubuntu-sdk](http://developer.ubuntu.com/start)
+* intltool   - run  `sudo apt-get install intltool
+
+Submitting a patch upstream
+===========================
+
+If you want to submit a bug fix you can do so by branching the code as shown
+above, implementing the fixes and running to see if it fixed the issue. We also
+request that you run the Autopilot nad unit tests to check if anything
+regressed due to the bug fix.
+
+If the tests fail, you will have to fix them before your bug fix can be
+approved and merged into trunk. If the tests pass then commit and push your
+code by,
+
+   
+
+    $ bzr commit -m "Implemented bug fix" --fixes lp:bug-number
+    $ bzr push lp:~launchpadid/ubuntu-calculator-app/branch-name
+
+Running Tests
+=============
+
+Please check README-Autopilot.md and README-Unittest.md on how to run the tests.
+They are quite explanatory and will help you get started.
+
+Code Style
+==========
+
+We are trying to use a common code style throughout the code base to maintain
+uniformity and improve code clarity. Listed below are the code styles guides
+that will be followed based on the language used.
+
+* [QML](http://qt-project.org/doc/qt-5/qml-codingconventions.html) 
+* [JS, C++](https://google-styleguide.googlecode.com/svn/trunk/cppguide.xml) 
+* Python     - Code should follow PEP8 and Flake regulations
+
+Note: In the QML code convention, ignore the Javascript code section guidelines.
+So the sections that should be taken into account in the QML conventions are QML 
+Object Declarations, Grouped Properties and Lists.
+
+Debugging
+=========
+ 
+GDB allows one to see what is going on `inside' another program while it executes, 
+or what another program was doing at the moment it crashed. It is a pretty niffty tool which allows you 
+to get the crash log that can help a developer pin point the cause of the crash.
+Before reproducing crash it is good to create symbols table for gdb, by using command:
+
+    $ cd branch-name	
+
+To run GDB:
+
+    $ gdb qmlscene
+
+At this point, you are inside the gdb prompt. Run your application as you normally would.
+
+     run app/ubuntu-calculator-app.qml
+
+Your app is now running and monitored by GDB. Reproduce the steps in your app to make it crash. Once it does crash,
+
+     bt
+
+That's about it. To quit GDB, type quit to return back to the normal terminal console.
+
+     quit

=== added file 'README-Mergeproposal.md'
--- README-Mergeproposal.md	1970-01-01 00:00:00 +0000
+++ README-Mergeproposal.md	2015-12-22 06:35:00 +0000
@@ -0,0 +1,28 @@
+Prerequisites to approving a Merge Proposal (MP)
+================================================
+
+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.
+
+Checklist
+=========
+
+*   Does the MP add/remove user visible strings? If Yes, has the pot file been
+    updated?
+
+*   Does the MP change the UI? If Yes, has it been approved by design, or 
+    discussed with some of the Calculator developers?
+
+*   Did you perform an exploratory manual test run of your code change and any
+    related functionality?
+
+*   If the MP fixes a bug or implements a feature, are there accompanying unit
+    and autopilot tests?
+
+*   Is the calculator app trunk buildable and runnable using Qtcreator?
+
+*   Was the debian changelog updated?
+
+*   Was the copyright years updated if necessary?
+
+The above checklist is more of a guideline to help calculator app trunk stay buildable,
+stable and up to date.

=== added file 'README-Translations.md'
--- README-Translations.md	1970-01-01 00:00:00 +0000
+++ README-Translations.md	2015-12-22 06:35:00 +0000
@@ -0,0 +1,41 @@
+Updating translations
+=====================
+
+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.
+
+They are then built and installed as part of the package build, so that
+developers don't really need to worry about them.
+
+However, there is one task that needs to be taken care of: exposing new
+translatable messages to translators. So whenever you add new translatable
+messages in the code, make sure to follow these steps:
+
+ 1. Run click-buddy retaining the build directory:
+    $ click-buddy --dir . --no-clean
+ 2. Copy the .pot file from the <build dir> mentioned in the output to your
+    original source:
+    $ cp <build dir>/po/*.pot po/
+ 3. Commit the generated .pot file: 
+    $ bzr commit -m"Updated translation template"
+ 4. Push the branch and send a merge proposal as usual
+
+And that's it, once the branch lands Launchpad should take care of all the rest!
+
+Behind the scenes
+=================
+
+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.
+The translations template contains all translatable strings that have been
+extracted from the source code files.
+
+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.
+
+Translations for core apps follow the standard [gettext format](https://www.gnu.org/software/gettext/).
+
+ [Launchpad Translations](https://translations.launchpad.net/ubuntu-calculator-app)
+ [gettext format](https://www.gnu.org/software/gettext/)

=== added file 'README-Unittest.md'
--- README-Unittest.md	1970-01-01 00:00:00 +0000
+++ README-Unittest.md	2015-12-22 06:35:00 +0000
@@ -0,0 +1,36 @@
+Running QML Unit Tests
+======================
+
+QML Unit Tests help with testing the internal working of components while
+autopilot tests help with testing the UI workflow as experience by the user.
+Running QML tests is quite simple and very fast.
+
+If you are submitting your bugfix/patch to the calculator app, please follow the
+following steps below to check whether that all tests pass before proposing a
+merge request.
+   
+Running all unit test at once
+=============================
+
+* If you want to run all tests, then run the following command,
+
+   $ ctest --output-on-failure
+   
+* If you want more verbose output, then run,
+
+   $ ctest -VV
+
+Running individual test cases,
+==============================
+
+If you want to run testcases individually, you can do so by navigating to the
+unit tests folder by,
+
+* Navigate to the tests/unit directory
+
+   $ cd tests/unit
+   
+* Run the test by providing their filenames
+
+   $ qmltestrunner tst_hellocomponent.qml
+

=== added file 'README.md'
--- README.md	1970-01-01 00:00:00 +0000
+++ README.md	2015-12-22 06:35:00 +0000
@@ -0,0 +1,59 @@
+ReadMe - Ubuntu Calculator App
+===========================
+Ubuntu Calculator App is the official calculator app for Ubuntu Touch. We follow an open
+source model where the code is available to anyone to branch and hack on. The
+ubuntu calculator app follows a test driven development (TDD) where tests are
+written in parallel to feature implementation to help spot regressions easier.
+
+Dependencies
+============
+**DEPENDENCIES ARE NEEDED TO BE INSTALLED TO BUILD AND RUN THE APP**.
+
+A complete list of dependencies for the project can be found in ubuntu-calculator-app/debian/control
+
+The following essential packages are also required to develop this app:
+* [ubuntu-sdk](http://developer.ubuntu.com/start)
+* intltool   - run  `sudo apt-get install intltool
+
+Calculation engine
+==================
+
+Current calculation engine is math.js version 1.1.0. 
+You could download latest version from webpage:
+    http://mathjs.org
+
+The engine was sligtly modified to properly work with Ubuntu-Calculator-App.
+
+Profiling calculator
+====================
+
+To successfuly run profiler on your device, you must modify ubuntu-calculator-app.apparmor file,
+and add "networking" policy group:
+
+ "policy_groups": [
+    "networking"
+ ],
+
+The bug was already submitted at:
+https://bugs.launchpad.net/ubuntu-sdk-ide/+bug/1520551
+
+Next you will need follow instruction:
+
+ 1. Connect your device to PC and make sure it is unlocked, and Developer Mode is enable
+ 2. Run Ubuntu SDK IDE
+ 3. Open Calculator project and generate Unix Makefiles for Arm.
+ 4. Select Analyze > QML Profiler 
+ 5. Select the Start button to start Calculator from the QML Profiler.
+ 6. After reproduce issue you must press Stop button.
+
+More information about profiling is available at:
+http://doc.qt.io/qtcreator/creator-qml-performance-monitor.html
+
+Useful Links
+============
+Here are some useful links with regards to the Calculator App development.
+
+* [Home Page](https://developer.ubuntu.com/en/community/core-apps/calculator/)
+* [Calculator App Wiki](https://wiki.ubuntu.com/Touch/CoreApps/Calculator)
+* [Designs](https://developer.ubuntu.com/en/community/core-apps/calculator/#design)
+* [Project page](https://launchpad.net/ubuntu-calculator-app) 

=== removed file 'README.translations'
--- README.translations	2015-04-09 18:43:16 +0000
+++ README.translations	1970-01-01 00:00:00 +0000
@@ -1,40 +0,0 @@
-# Updating translations
-
-Translations for the Calculator app happen in [Launchpad Translations] and
-are automatically committed daily on the trunk branch in the po/ folder.
-
-They are then built and installed as part of the package build, so that
-developers don't really need to worry about them.
-
-However, there is one task that needs to be taken care of: exposing new
-translatable messages to translators. So whenever you add new translatable
-messages in the code, make sure to follow these steps:
-
- 1. Run click-buddy retaining the build directory:
-    $ click-buddy --dir . --no-clean
- 2. Copy the .pot file from the <build dir> mentioned in the output to your
-    original source:
-    $ cp <build dir>/po/*.pot po/
- 3. Commit the generated .pot file: 
-    $ bzr commit -m"Updated translation template"
- 4. Push the branch and send a merge proposal as usual
-
-And that's it, once the branch lands Launchpad should take care of all the rest!
-
-# Behind the scenes
-
-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.
-The translations template contains all translatable strings that have been
-extracted from the source code files.
-
-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.
-
-Translations for core apps follow the standard [gettext format].
-
- [Launchpad Translations]: https://translations.launchpad.net/ubuntu-calculator-app
- [gettext format]: https://www.gnu.org/software/gettext/


Follow ups