Develop: Difference between revisions

From OLPC
Jump to navigation Jump to search
mNo edit summary
 
(28 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Translations}}
{{Translations}}
{{Olpcboxtop|toptext=[[{{PAGENAME}}|Develop]]}}
{{Olpcboxtop|toptext=[[{{PAGENAME}}|Develop]]}}
{{ OBX activity |[[Image:Activity-develop.svg]]|2=extra<!--|{{{text}}}--> }}
{{ OBX activity |[[Image:Activity-develop.svg]]|2=extra }}
{{ OBX version |35|org.laptop.Develop }}
{{ OBX source|git://dev.laptop.org/activities/develop}}
{{ OBX source|git://dev.laptop.org/activities/develop}}
{{ OBX xobundle|http://wiki.laptop.org/images/4/48/Develop-22.xo|Develop}}
{{ OBX xobundle|http://wiki.laptop.org/images/5/53/Develop-35.xo|Develop-35}}
{{ OBX test <!--|[[Tests/Browse|Browse]]|2007-09-18--> }}
{{ OBX test <!--|[[Tests/Browse|Browse]]|2007-09-18--> }}
{{ OBX devtickets |develop-activity}}
{{ OBX devtickets |develop-activity}}
Line 20: Line 21:
{{ OBX team |[[User:paulswartz|paulswartz]], [[User:Homunq|Homunq]], [[User:Mcfletch|mcfletch]]}}
{{ OBX team |[[User:paulswartz|paulswartz]], [[User:Homunq|Homunq]], [[User:Mcfletch|mcfletch]]}}


<small>see more [[:Category:OBX templates|templates]] or [[OBX proposals|propose new]]</small>
{{Olpcboxbottom}}
{{Olpcboxbottom}}
The [[Develop]] activity is the activity for making or modifying other activities. Currently, it comprises a tree view of files in an activity's directory and a python source code editor (tabbed). Other features are actively being worked on.
The [[Develop]] activity is the activity for making or modifying other activities. Currently, it comprises a tree view of files in an activity's directory and a python source code editor (tabbed). Other features are actively being worked on.


This is the second incarnation of such an activity. The wiki page for the previous, now broken, version is at [[Old Develop activity]]. The old page has discussion of many grandiose planned features, which are worth looking at for ideas, and in general still considered desirable. However, the new version is intended to be developed step-by-step, with small, working features valued over all-encompassing architectures.
This is the second incarnation of such an activity. The wiki page for the previous, now broken, version is at [[Old Develop activity]]. The old page has discussion of many grandiose planned features, which are worth looking at for ideas, and in general still considered desirable. However, the new version is intended to be developed step-by-step, with small, working features valued over all-encompassing architectures.

== Release notes ==

v.35 - new activity works, open activity improved, other minor bug fixes.


== WARNINGS ==
== WARNINGS ==


This works best with recent versions of the system. '''Please update to the latest [[joyride]], at least version 2171'''. (If you want to run with older versions, you need to also install the patched version of the journal called [[Image:DoppelJournal-79.xo|DoppelJournal]]. This is not recommended.)
Currently this version only edits activities that are stored in ~olpc/Activities, but that at least means that you can use it to develop itself.


== Typical workflows ==
This saves modified versions of activities in the journal. In order to continue editing these saved activity bundles, '''you need to also install the patched version of the journal called [[Image:DoppelJournal-79.xo|DoppelJournal]].'''. (<trac>6639</trac>) In DoppelJournal, go to the details page for your saved application bundle, put the mouse over the resume button in the upper right, and wait a fraction of a second until the pulldown shows the options "Develop" and "Start". "Develop" works, but "start" doesn't because bitfrost prevents DoppelJournal from reinstalling the activity.


=== Edit activity ===
So in order to open these modified versions, you need to use your regular journal. When you do, you run into <trac>6497</trac>, which means that you cannot run/test your modified activities unless you change the version number in activity.info for each test.
Run Develop. Open the activity you wish to edit. Make your changes. Keep it in the journal (either from the activity toolbar, or by quitting develop.)


To test your changes, you need to go to the journal. You should see two copies of the activity: the newer (upper) one has your changes, and the lower one is a backup of the unchanged original. Click on the upper one to run it.
Also, this app has been known to cause '''TOTAL LOSS OF JOURNAL CONTENTS'''. The data is still on your XO, in /home/olpc/.sugar/default/datastore1234567890 (your numbers will be different). You can recover this data by copying it onto an external USB and then letting the files be recognized by the journal... (I think, I have not tried this yet. The problem is that the files have no extension, but at least my Ubuntu system can guess the correct file type for most.) I do not understand this bug and am not sure that it still occurs with the latest version of Develop, but you have been warned.


Say you find a bug. To continue to edit the same activity, go to the journal and use the > on the right of your version of the activity to go to the details view. Right click on the (>) in the toolbar and choose edit.
This uses bundlebuilder.py to save its XO files. This means that if MANIFEST is not correct, it can either fail to save, or fail to save all of its files. Again, you have been warned. I have a plan to fix this, it is not too hard.


Repeat as necessary.
The other known bugs are very minor issues that I already know how to fix as soon as I get around to it. The F8 (big circle on the XO slider) key is getting grabbed by the window manager in some cases, I have two identical tabs of logs in some cases, and ignore-case in find is unimplemented.

=== Edit activity in-place (advanced) ===
Download an activity, and put its folder in your home directory (the ~ directory - on the xo, that is /home/olpc). To do this, you can use git (''yum install git'', then ''git clone git://dev.laptop.org/projects/xxx-activity'') or unzip (''unzip xxxx.xo''). Now make a symbolic link from inside the Activities directory to that directory (''cd /home/olpc/Activities'' ; ''ln -s ../xxx-activity xxx''). Open develop, and choose the original location of the folder (that is, navigate out of Activities and choose the xxx-activity folder).

Now, all changes you make will be saved in the journal AND ALSO immediately reflected in the installed activity. Note that in-place changes only happen for activities outside the Activities folder; thus, if you open the symlinked version (from inside the Activities folder), changes are NOT made in place.

== Tips ==
F5 - F8 (the different-sized circles on the XO) are shortcuts for searching: F5 is set/edit search text, F6 is search backwards, F7 is search forwards, and F8 is set replace text.

== Screenshot ==

Check this out: (this is taken from jhbuild, so the font size and mouse pointer comes out wrong, but you get the idea)

[[Image:Develop-screenshot.png]]

Rudimentary version control, using the journal.

Good find/replace support, check out the UI (though there is still room for improvement - search history, shift-fkeys to hard-open the palettes...). F5-F8 (the circle-slider on the XO) are set to: find, find prev, find next, and {set replace or, if replace was set since find, do replace}, respectively.

Ability to view log files from within the app. Better than logviewer, since you can see logs from previous 4 sessions, and the list is filtered to the ones relevant to your app.


== Roadmap ==
== Roadmap ==


Here are some features planned for implementation relatively soon:
Here are some features/bugfixes planned for implementation relatively soon:


* search filters file list
* duplicate log treeviews
* "keep" button zooms to journal for testing, new logs picked up in logview.
* MANIFEST is edited programmatically, not manually; warning for files not in MANIFEST with button to add them
* creating new activities
* creating new activities
* running the activity from Develop (see debugger idea, below)
* viewing/editing source of existing activities (by making a local copy)
* Replace (I don't have a good idea for an interface yet -- [[User:paulswartz|paulswartz]])
* Wrap up bundle (zip to .xo file and store in journal with correct mime type) (aka Rudimentary source control - see talk page)
* exporting/importing individual (eg. svg) files from the Journal so they can be edited with other activities
* exporting/importing individual (eg. svg) files from the Journal so they can be edited with other activities
* This will be more useful when there's an activity which can edit SVG files. [[User:paulswartz|paulswartz]]
** This will be more useful when there's an activity which can edit SVG files. [[User:paulswartz|paulswartz]]
*** see http://dev.laptop.org/git/users/cscott/icon-draw-activity/ which needs some love. [[User:CScott|CScott]]
* Viewing Sugar's debug logs


Here are some larger features which somebody is working on:
Here are some larger features which somebody is working on:


* A debugger based on the RPDB2 (winpdb back end) console. This would mean some significant work on providing a context for a running activity - maybe even letterboxing it inside a frame of develop. [[User:Homunq|Homunq]] 11:26, 5 February 2008 (EST)
* Code-level l10n - see [[bityi/GSoC]] [[User:Homunq|Homunq]] 11:26, 5 February 2008 (EST)
* Gui designer (with libglade available to all sugar apps?) [[User:ezg|Eli Gottlieb]] June 2, 2008
* Code-level l10n - see [[bityi]] [[User:Homunq|Homunq]] 11:26, 5 February 2008 (EST)


Here are some features which may be desirable, but nobody is working on them. Some of these would be enormous projects and will probably never get done. Others may be more feasible than they appear, by just building a Sugar interface on top of existing open-source tools. If you think you can deliver something useful on one of these, move it to the list above and sign your name. Note also that, to avoid feature clutter, any of these features you implement must be well-integrated, with smart defaults and a minimum of configuration.
Here are some features which may be desirable, but nobody is working on them. Some of these would be enormous projects and will probably never get done. Others may be more feasible than they appear, by just building a Sugar interface on top of existing open-source tools. If you think you can deliver something useful on one of these, move it to the list above and sign your name. Note also that, to avoid feature clutter, any of these features you implement must be well-integrated, with smart defaults and a minimum of configuration.


* A debugger based on the RPDB2 (winpdb back end) console. This would mean some significant work on providing a context for a running activity - maybe even letterboxing it inside a frame of develop. [[User:Homunq|Homunq]] 11:26, 5 February 2008 (EST)
* Class browser, autocompletion, popup function signatures, refactoring aids, and similar code-editing sweets.
* Class browser, autocompletion, popup function signatures, refactoring aids, and similar code-editing sweets.
* Bug tracker (would have to allow users to submit bugs to a centralized repository) (this could possibly be worked in with the bulletin board [[User:Paulswartz|Paulswartz]] 21:18, 12 February 2008 (EST))
* Bug tracker (would have to allow users to submit bugs to a centralized repository) (this could possibly be worked in with the bulletin board [[User:Paulswartz|Paulswartz]] 21:18, 12 February 2008 (EST))
* Unit testing
* Unit testing
* Doctools
* Doctools
* Gui designer (with libglade available to all sugar apps?)
* Source control (ideally much of the functionality should be inherited from the journal - wait for this stuff to make it into the journal first)
* Source control (ideally much of the functionality should be inherited from the journal - wait for this stuff to make it into the journal first)
* Activity sharing / Pair Coding (that is, concurrent editing of the same source file. It has been suggested that this should be implemented by replacing the editor widget with an Abiword widget; the Abiword folks have done some work in this direction.)
* Activity sharing / Pair Coding (that is, concurrent editing of the same source file. It has been suggested that this should be implemented by replacing the editor widget with an Abiword widget; the Abiword folks have done some work in this direction.)
Line 84: Line 109:
* -22 has a tabbed editor and a file menu
* -22 has a tabbed editor and a file menu
* -23 has a new lazily loaded sidebar, can open an external file and create new activities
* -23 has a new lazily loaded sidebar, can open an external file and create new activities
* -31 saves in .xo bundle format
* -32 has find/replace
* -34 uses latest activitybundle, thus activity save is more stable.
{{Activity page
|icon=Image:Activity-develop.svg
|genre=Programming
|short description=The Develop activity is the activity for making or modifying other activities. Currently, it comprises a tree view of files in an activity's directory and a python source code editor (tabbed). Other features are actively being worked on.
|long description=Here are some features/bugfixes planned for implementation relatively soon:

* search filters file list
* duplicate log treeviews
* "keep" button zooms to journal for testing, new logs picked up in logview.
* MANIFEST is edited programmatically, not manually; warning for files not in MANIFEST with button to add them
* creating new activities
* exporting/importing individual (eg. svg) files from the Journal so they can be edited with other activities
o This will be more useful when there's an activity which can edit SVG files. paulswartz
+ see http://dev.laptop.org/git?p=users/cscott/icon-draw-activity which needs some love. CScott

Here are some larger features which somebody is working on:

* Code-level l10n - see bityi/GSoC Homunq 11:26, 5 February 2008 (EST)
* Gui designer (with libglade available to all sugar apps?) Eli Gottlieb June 2, 2008

Here are some features which may be desirable, but nobody is working on them. Some of these would be enormous projects and will probably never get done. Others may be more feasible than they appear, by just building a Sugar interface on top of existing open-source tools. If you think you can deliver something useful on one of these, move it to the list above and sign your name. Note also that, to avoid feature clutter, any of these features you implement must be well-integrated, with smart defaults and a minimum of configuration.

* A debugger based on the RPDB2 (winpdb back end) console. This would mean some significant work on providing a context for a running activity - maybe even letterboxing it inside a frame of develop. Homunq 11:26, 5 February 2008 (EST)
* Class browser, autocompletion, popup function signatures, refactoring aids, and similar code-editing sweets.
* Bug tracker (would have to allow users to submit bugs to a centralized repository) (this could possibly be worked in with the bulletin board Paulswartz 21:18, 12 February 2008 (EST))
* Unit testing
* Doctools
* Source control (ideally much of the functionality should be inherited from the journal - wait for this stuff to make it into the journal first)
* Activity sharing / Pair Coding (that is, concurrent editing of the same source file. It has been suggested that this should be implemented by replacing the editor widget with an Abiword widget; the Abiword folks have done some work in this direction.)
* Dynamic reloading of a running activity
* Visual programming
|contact person=User:Paulswartz
|activity source=http://dev.laptop.org/activities/develop
|team=User:Paulswartz, User:Homunq, User:Mcfletch
|bundle URL=http://wiki.laptop.org/images/5/53/Develop-35.xo
}}
{{Activity bundle
|bundle URL=http://wiki.laptop.org/images/4/4a/Develop-34.xo
|activity version=34
|releases=Candidate
}}
{{Activity bundle
|bundle URL=http://wiki.laptop.org/images/8/8e/DoppelJournal-79.xo
|releases=7.1.0 (650), 7.1.1 (653), 7.1.2 (656)
}}
{{Activity bundle
|bundle URL=http://wiki.laptop.org/images/5/53/Develop-35.xo
|activity version=35
}}

Latest revision as of 14:38, 2 April 2009

  english | 日本語 | 한국어 HowTo [ID# 205471]  +/-  
Activity-develop.svg
Xo s.png Current version is 35.

Activity id is org.laptop.Develop

TST {{{1}}}
Trac print.png Tickets all - active - new
Translate-icon-55px.svg Localization
.POT file NEEDED

The Develop activity is the activity for making or modifying other activities. Currently, it comprises a tree view of files in an activity's directory and a python source code editor (tabbed). Other features are actively being worked on.

This is the second incarnation of such an activity. The wiki page for the previous, now broken, version is at Old Develop activity. The old page has discussion of many grandiose planned features, which are worth looking at for ideas, and in general still considered desirable. However, the new version is intended to be developed step-by-step, with small, working features valued over all-encompassing architectures.

Release notes

v.35 - new activity works, open activity improved, other minor bug fixes.

WARNINGS

This works best with recent versions of the system. Please update to the latest joyride, at least version 2171. (If you want to run with older versions, you need to also install the patched version of the journal called File:DoppelJournal-79.xo. This is not recommended.)

Typical workflows

Edit activity

Run Develop. Open the activity you wish to edit. Make your changes. Keep it in the journal (either from the activity toolbar, or by quitting develop.)

To test your changes, you need to go to the journal. You should see two copies of the activity: the newer (upper) one has your changes, and the lower one is a backup of the unchanged original. Click on the upper one to run it.

Say you find a bug. To continue to edit the same activity, go to the journal and use the > on the right of your version of the activity to go to the details view. Right click on the (>) in the toolbar and choose edit.

Repeat as necessary.

Edit activity in-place (advanced)

Download an activity, and put its folder in your home directory (the ~ directory - on the xo, that is /home/olpc). To do this, you can use git (yum install git, then git clone git://dev.laptop.org/projects/xxx-activity) or unzip (unzip xxxx.xo). Now make a symbolic link from inside the Activities directory to that directory (cd /home/olpc/Activities ; ln -s ../xxx-activity xxx). Open develop, and choose the original location of the folder (that is, navigate out of Activities and choose the xxx-activity folder).

Now, all changes you make will be saved in the journal AND ALSO immediately reflected in the installed activity. Note that in-place changes only happen for activities outside the Activities folder; thus, if you open the symlinked version (from inside the Activities folder), changes are NOT made in place.

Tips

F5 - F8 (the different-sized circles on the XO) are shortcuts for searching: F5 is set/edit search text, F6 is search backwards, F7 is search forwards, and F8 is set replace text.

Screenshot

Check this out: (this is taken from jhbuild, so the font size and mouse pointer comes out wrong, but you get the idea)

Develop-screenshot.png

Rudimentary version control, using the journal.

Good find/replace support, check out the UI (though there is still room for improvement - search history, shift-fkeys to hard-open the palettes...). F5-F8 (the circle-slider on the XO) are set to: find, find prev, find next, and {set replace or, if replace was set since find, do replace}, respectively.

Ability to view log files from within the app. Better than logviewer, since you can see logs from previous 4 sessions, and the list is filtered to the ones relevant to your app.

Roadmap

Here are some features/bugfixes planned for implementation relatively soon:

  • search filters file list
  • duplicate log treeviews
  • "keep" button zooms to journal for testing, new logs picked up in logview.
  • MANIFEST is edited programmatically, not manually; warning for files not in MANIFEST with button to add them
  • creating new activities
  • exporting/importing individual (eg. svg) files from the Journal so they can be edited with other activities

Here are some larger features which somebody is working on:

  • Code-level l10n - see bityi/GSoC Homunq 11:26, 5 February 2008 (EST)
  • Gui designer (with libglade available to all sugar apps?) Eli Gottlieb June 2, 2008

Here are some features which may be desirable, but nobody is working on them. Some of these would be enormous projects and will probably never get done. Others may be more feasible than they appear, by just building a Sugar interface on top of existing open-source tools. If you think you can deliver something useful on one of these, move it to the list above and sign your name. Note also that, to avoid feature clutter, any of these features you implement must be well-integrated, with smart defaults and a minimum of configuration.

  • A debugger based on the RPDB2 (winpdb back end) console. This would mean some significant work on providing a context for a running activity - maybe even letterboxing it inside a frame of develop. Homunq 11:26, 5 February 2008 (EST)
  • Class browser, autocompletion, popup function signatures, refactoring aids, and similar code-editing sweets.
  • Bug tracker (would have to allow users to submit bugs to a centralized repository) (this could possibly be worked in with the bulletin board Paulswartz 21:18, 12 February 2008 (EST))
  • Unit testing
  • Doctools
  • Source control (ideally much of the functionality should be inherited from the journal - wait for this stuff to make it into the journal first)
  • Activity sharing / Pair Coding (that is, concurrent editing of the same source file. It has been suggested that this should be implemented by replacing the editor widget with an Abiword widget; the Abiword folks have done some work in this direction.)
  • Dynamic reloading of a running activity
  • Visual programming

goals from Eduardo Silva

  1. . Develop being self-sufficient enough to develop (ha!) new activities
  2. . Being able to open other activities from the Journal
  3. . View Source button
  4. . concurrent development
  5. . a way to pass around small piece of Python code

Updates

   * -20 has undo/redo and find
   * -21 has support for jhbuid (thanks to Mike Fletcher), and is refactored a bit
   * -22 has a tabbed editor and a file menu
   * -23 has a new lazily loaded sidebar, can open an external file and create new activities
   * -31 saves in .xo bundle format
   * -32 has find/replace
   * -34 uses latest activitybundle, thus activity save is more stable.

Activity Summary

Icon: Sugar icon::Image:Activity-develop.svg
Genre: Activity genre::Programming
Activity group: ,|x|Activity group::x}}
Short description: [[Short description::The Develop activity is the activity for making or modifying other activities. Currently, it comprises a tree view of files in an activity's directory and a python source code editor (tabbed). Other features are actively being worked on.]]
Description: [[Description::Here are some features/bugfixes planned for implementation relatively soon:
   * search filters file list
   * duplicate log treeviews
   * "keep" button zooms to journal for testing, new logs picked up in logview.
   * MANIFEST is edited programmatically, not manually; warning for files not in MANIFEST with button to add them
   * creating new activities
   * exporting/importing individual (eg. svg) files from the Journal so they can be edited with other activities
         o This will be more useful when there's an activity which can edit SVG files. paulswartz
               + see http://dev.laptop.org/git?p=users/cscott/icon-draw-activity which needs some love. CScott 

Here are some larger features which somebody is working on:

   * Code-level l10n - see bityi/GSoC Homunq 11:26, 5 February 2008 (EST)
   * Gui designer (with libglade available to all sugar apps?) Eli Gottlieb June 2, 2008 

Here are some features which may be desirable, but nobody is working on them. Some of these would be enormous projects and will probably never get done. Others may be more feasible than they appear, by just building a Sugar interface on top of existing open-source tools. If you think you can deliver something useful on one of these, move it to the list above and sign your name. Note also that, to avoid feature clutter, any of these features you implement must be well-integrated, with smart defaults and a minimum of configuration.

   * A debugger based on the RPDB2 (winpdb back end) console. This would mean some significant work on providing a context for a running activity - maybe even letterboxing it inside a frame of develop. Homunq 11:26, 5 February 2008 (EST)
   * Class browser, autocompletion, popup function signatures, refactoring aids, and similar code-editing sweets.
   * Bug tracker (would have to allow users to submit bugs to a centralized repository) (this could possibly be worked in with the bulletin board Paulswartz 21:18, 12 February 2008 (EST))
   * Unit testing
   * Doctools
   * Source control (ideally much of the functionality should be inherited from the journal - wait for this stuff to make it into the journal first)
   * Activity sharing / Pair Coding (that is, concurrent editing of the same source file. It has been suggested that this should be implemented by replacing the editor widget with an Abiword widget; the Abiword folks have done some work in this direction.)
   * Dynamic reloading of a running activity
   * Visual programming]] 
Maintainers: ,|x|Contact person::x}}
Repository URL: Source code::http://dev.laptop.org/activities/develop
Available languages: ,|x|Available languages::x}}
Available languages (codes): ,|x|Language code::x}}
Pootle URL:
Related projects: Related projects,|x|Related projects::x}}
Contributors: ,|x|Team member::x}}
URL from which to download the latest .xo bundle Activity bundle::http://wiki.laptop.org/images/5/53/Develop-35.xo
Last tested version number:
The releases with which this version of the activity has been tested. ,|x|Software release::x}}
Development status:
Ready for testing (development has progressed to the point where testers should try it out): ,|x|Ready for testing::x}}
smoke tested :
test plan available :
test plan executed :
developer response to testing :


URL from which to download the last .xo bundle that works with old releases Activity bundle::http://wiki.laptop.org/images/4/4a/Develop-34.xo
Activity version number: Activity version::34
The releases with which this version of the activity has been tested. ,|x|Software release::x}}
Development status:


URL from which to download the last .xo bundle that works with old releases Activity bundle::http://wiki.laptop.org/images/8/8e/DoppelJournal-79.xo
Activity version number: Activity version::
The releases with which this version of the activity has been tested. ,|x|Software release::x}}
Development status:


URL from which to download the last .xo bundle that works with old releases Activity bundle::http://wiki.laptop.org/images/5/53/Develop-35.xo
Activity version number: Activity version::35
The releases with which this version of the activity has been tested. ,|x|Software release::x}}
Development status: