[Sugar-devel] GSOC plans

Tony Anderson tony at olenepal.org
Fri May 26 00:55:07 EDT 2017


Hi Jatin,

The activities directory has a numbered directory for each activity such 
as 4024. This scheme was apparently based on Mozilla's design for the 
add-on feature to Firefox. The number associated with a specific 
activity is arbitrary - probably based on when the activity was added to 
ASLO. It has nothing to do with version number. James Cameron went to 
point releases (there is nothing in the software to prevent that - the 
number is a string). He says it was because he didn't know how to update 
ASLO at the time. He is becoming an administrator at ASLO so that should 
solve his problem.

Tony


On 05/25/2017 06:42 PM, Jatin Dhankhar wrote:
>
>     One of my attractions to Sugar was the refreshing decision to
>     start activity versions with 1 and increment by 1 for each next
>     version. Note that the file name of the bundle is browse-200.xo
>     but the bundle is stored in activities/4024/.
>
> Then why is it stored in 4024 directory ?  Does it mean it was  2.0 of 
> the browser activity. Found some activities here 
> http://activities.sugarlabs.org/activities/4024/ that use following 
> naming scheme as well 
> http://activities.sugarlabs.org/activities/4024/browse-149.1.xo.
>
>     Sam is comfortable with Flask. I have not used Flask and am more
>     comfortable with Django. You need to decide which you plan to use
>     for the project. No matter your choice, neither Sam's code nor
>     mine is going to meet the needs. You'll make best progress by
>     using the code as clues on functions that are needed and how they
>     could be implemented.
>
> I think Flask would be easy to pick up.
>
>
>     I should have given you more help with the static setup - it is
>     one of Django's more irritating tasks. For historical reasons, my
>     file system is structured
>
>     /library/schoolsite/static containing directories: admin css 
>     icons  image  js
>     Django then supports a simplified reference: img
>     src='/static/icons/{{ json.icon }}'></img>
>
>     where /static refers to /library/schoolsite/static. Schoolsite is
>     the Django project, static/ is defined in the settings:
>
>     STATIC_URL = '/static/'
>     STATICFILES_DIR = (
>     '/library/schoolsite/static/',
>     )
>
>     If you get that right, the images should appear in your display.
>     As I said, you can diagnose problems by (in Firefox - right click
>     on the missing image and look at view image info.) In your
>     version: /static/ can be any name you want to give to your static
>     files (js, css, images and so on). Static works. The path then
>     points to the root. So paths are 'absolute' but start with the
>     static_url and not the file system root.
>
>
> Thanks will try that as well.
>
>
>
> On Thu, May 25, 2017 at 3:15 PM, Tony Anderson <tony at olenepal.org 
> <mailto:tony at olenepal.org>> wrote:
>
>     Hi,
>
>     I think the stored bundle should always be browse-200.xo. The
>     latest is determined by the highest version number among those in
>     the addon directory. This way no administrative step is needed
>     when a new version is released - it just needs to be put in the
>     directory. So the structure would be:
>
>     download.sugarlabs.org/4024/browse-200.xo
>     <http://download.sugarlabs.org/4024/browse-200.xo>. Programmers
>     seem to be culturally impelled to use a version number to convey
>     all kinds of information. My favorite is Sugar which went from
>     0.98 to 0.100. THe only case I know of where 0.96 < 0.100. One of
>     my attractions to Sugar was the refreshing decision to start
>     activity versions with 1 and increment by 1 for each next version.
>     Note that the file name of the bundle is browse-200.xo but the
>     bundle is stored in activities/4024/.
>
>     Sam is comfortable with Flask. I have not used Flask and am more
>     comfortable with Django. You need to decide which you plan to use
>     for the project. No matter your choice, neither Sam's code nor
>     mine is going to meet the needs. You'll make best progress by
>     using the code as clues on functions that are needed and how they
>     could be implemented.
>
>     I should have given you more help with the static setup - it is
>     one of Django's more irritating tasks. For historical reasons, my
>     file system is structured
>
>     /library/schoolsite/static containing directories: admin css 
>     icons  image  js
>     Django then supports a simplified reference: img
>     src='/static/icons/{{ json.icon }}'></img>
>
>     where /static refers to /library/schoolsite/static. Schoolsite is
>     the Django project, static/ is defined in the settings:
>
>     STATIC_URL = '/static/'
>     STATICFILES_DIR = (
>         '/library/schoolsite/static/',
>     )
>
>     If you get that right, the images should appear in your display.
>     As I said, you can diagnose problems by (in Firefox - right click
>     on the missing image and look at view image info.) In your
>     version: /static/ can be any name you want to give to your static
>     files (js, css, images and so on). Static works. The path then
>     points to the root. So paths are 'absolute' but start with the
>     static_url and not the file system root.
>
>     Tony
>
>
>     On 05/25/2017 05:15 PM, Jatin Dhankhar wrote:
>>
>>         Attached is a python script which separates the jsons within
>>         update.json to separate jsons, one per line. The line is
>>         still long but it is easier to see what is going on. I just
>>         did ctrl+a on the text at the url and copied to a file
>>         updatejson. The output is a file jsons. The script assumes
>>         the source file is in the same directory and writes json to
>>         the same directory.
>>
>>     Thanks, I tried it and it works,
>>
>>         ASLO is based (loosely) on the Firefox addons so the
>>         activities are identified by the addon number. ASLOv3 can use
>>         the activity name (name line in activity.info
>>         <http://activity.info/>) and have a standard prefix for the
>>         activity download url (download.sugarlabs.org/activities/
>>         <http://download.sugarlabs.org/activities/>. The trick will
>>         be to find the most recent version since multiple versions
>>         are stored in the addon directory. While it is easy to get a
>>         python list of the bundles from addons, a sort will not work
>>         with non-integer version numbers. For example,
>>         browse-157.3.xo sorts before browse-157. There will be a need
>>         for a 'lint'-like script to verify that new bundles are setup
>>         correctly. If we stick to integer version numbers,
>>         downloading the last activity bundle in the list should work.
>>
>>     Sticking to integer version number is the easiest way to handle
>>     this. So that we have following structure
>>     aslo.sugarlabs.org/activities/browse/157
>>     <http://aslo.sugarlabs.org/activities/browse/157> or
>>     aslo.sugarlabs.org/activities/browse/latest/
>>     <http://aslo.sugarlabs.org/activities/browse/157> which will
>>     always point to latest. If we decide to use a standard way for
>>     float version numbers then something like this can be done (as
>>     long as all stick to same version format)
>>     aslo.sugarlabs.org/activities/browse/157/3.0
>>     <http://aslo.sugarlabs.org/activities/browse/157>/
>>
>>     My main question is, should I continue with developing new Aslo
>>     or improve/fork Sam's version of aslo ?
>>
>>     Thanks,
>>     Jatin Dhankhar
>>
>>     On Thu, May 25, 2017 at 10:06 AM, Tony Anderson
>>     <tony at olenepal.org <mailto:tony at olenepal.org>> wrote:
>>
>>         Hi,
>>
>>         I have had some apparent malware problems with the email. Had
>>         to hard reboot twice.
>>
>>         Attached is a python script which separates the jsons within
>>         update.json to separate jsons, one per line. The line is
>>         still long but it is easier to see what is going on. I just
>>         did ctrl+a on the text at the url and copied to a file
>>         updatejson. The output is a file jsons. The script assumes
>>         the source file is in the same directory and writes json to
>>         the same directory.
>>
>>         jsons shows 49 activities.
>>
>>         This is the last one:
>>
>>          {"xo_url":
>>         "http://download.sugarlabs.org/activities2/in.seeta.Deducto_v9.xo
>>         <http://download.sugarlabs.org/activities2/in.seeta.Deducto_v9.xo>",
>>         "xo_size": 245277, "version": 9, "minSugarVersion": "0.86"}
>>
>>         So each one has a url, size, version, and minimum version
>>         (oldest version on which the activity works).
>>
>>         Sam Parkinson created a separate directory for his bundles
>>         (activities2). His bundle names are quite different from
>>         standard practice.
>>         'in.seeta.Deducto is the bundle_id whereas we use the
>>         activity name. The size is the bundle size not the installed
>>         size. The minSugarVersion is presumably the earliest version
>>         of Sugar on which the activity works (and that it works on
>>         all subsequent versions). I have no idea how this can be tested.
>>
>>         Tony
>>
>>
>>
>>
>>
>>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20170526/5130d89c/attachment-0001.html>


More information about the Sugar-devel mailing list