Version 45 (modified by 12 years ago) ( diff ) | ,
---|
Table of Contents
Contribute: Code
These tasks are suitable for coders of various levels. Sahana Eden using Python, JavaScript and HTML.
Easy
Tasks for beginning coders, or if new to Python or web services
Fix an Easy Ticket
http://eden.sahanafoundation.org/report/18 Pick a bug report from http://eden.sahanafoundation.org/report/18, try to reproduce the issue in a local instance, fix the problem and submit a patch to the ticket on Trac, then notify the Sahana-Eden mailing list about your patch for verification.
Add Social Media Share Buttons to Pages
Added to GCI spreadsheet.
Add code which displays buttons to Share to Social Media (at least facebook & twitter) on every appropriate page.
- This should be controllable from a deployment_setting.
- The change can be made in shared code, not separately on each page.
- Please push the code to a branch on github for review and submit a link to this branch.
http://devgrow.com/loading-social-media-buttons-after-everything-else/
Common Operational Datasets
Added to GCI spreadsheet.
- Purpose and schemas for common datasets (schemas are at end): http://oneresponse.info/resources/imtoolbox/publicdocuments/IASC%20Guidelines%20on%20Common%20Operational%20Datasets%20in%20Disaster%20Preparedness%20and%20Response%201%20Nov.%202010.pdf
- Add model definitions for these schemas. This work was started but is not included in the current version of Eden. An example from an old version is here: models/08_assess.py
- Think about how we could make use of them.
- Display on the Map?
- Have Reports which compare the baseline & situational assessments?
Update Pootle
Added to GCI spreadsheet. Does this need to be modified given Vivek's GSoC project?
Provide a set of admin scripts (perhaps run by git commit hook?) to update Pootle with any changed strings as a merge.
GIS/Mapping
Added to GCI spreadsheet
These are various GIS/Mapping Tasks:
- Add a delay to the onHover tooltip (highlightControl)
- Something like hoverIntent
- Continue Integration of Potlatch
- for editing the main OSM database
- for editing a local OSM database
- Make the display_feature() & display_features() popup a Window instead of opening in a DIV
- This was working in FF before: http://eden.sahanafoundation.org/browser/views/sahana_scripts_min.html?rev=836#L39
- Replace the Measure Length/Area tools with GeoExt.ux
- Option to go Full screen & back
- Full screen view (No Ext window) will be required for use on a small-screen, such as a Mobile device
- Layer Tree
- Get a pr/person/presence record upon login if HTML5 GeoLocation available & not changed since last time
- login_next
- Map Preview when Lat/Lon set in pr/person/presence (auto or not)
- Color coded maps according to Geo-data (threats, needs, etc)
- Placing variable sized markers on the map in proportion to data (number of people in camp, number of families needing food)
Lat/Lon converter
Added to GCI spreadsheet
Portuguese Volunteer Firefighters (Bombeiros) use Eden.
They get given Lat/Lon coordinates in Degrees/Minutes/Seconds, but Eden stores internally as decimal degrees.
Tasks:
- Create a represent function to output the data as D/M/S
- Create a validator (& possibly widget) to allow entry of this format & have it converted to decimal degrees for storage
Scale Uploaded Images
Added to GCI spreadsheet
When images are uploaded we can limit the size, however larger pictures should be scaled instead. Example: personal profile picture.
- [This part is done, see #1016] This should be implemented as a Validator
modules/s3/s3validators.py
). The size limitation should be configurable in the model for that specific field, with a sensible default.
- [GCI task, #1017] UI to to allow user to crop image (this would be a widget:
modules/s3/s3widgets.py
)- Ideally the image would be resized client-side to make it faster to upload...this might be hard with pure JS, so would need to be Flash?
- Maybe: http://labs.corefive.com/Projects/FileManager/ (e.g. from http://code.google.com/p/django-ckeditor-filemanager/ )
Suggestion Box
Added to GCI spreadsheet
{Original suggestion from: http://groups.google.com/group/sahana-eden/browse_thread/thread/bbda1e98b73e1437)[[BR]]
Here are some potential features for a "suggestion box", roughly in order of priority:
For GCI, the first four bullets are the task.
- Text data entry form -- just use standard Eden database fields like "timestamp", "authorstamp", and "comments", maybe with a subject field.
- Allow defining topics or keywords. Let user choose a topic for their suggestion. Add all module names as an initial list of topics. (Perhaps add a suggestion_topic table for this, and allow a suggestion to have multiple topics.)
- Simple search in the body of posts -- match words.
- Allow commenting on (replying to) suggestions -- show comment thread with original post. (Note threading now works with a normal comment field, so should not need to do much for this but see how it's handled for other comments.)
- Regexp search.
- Some form of importance rating (e.g. voting up or down).
Map elements between EDXL-SITREP and EDXL-RM
Not added to GCI spreadsheet -- time required says a week.
Proposed by: | Nuwan
Specific : There are several elements within the | EDXL-SITREP data standard that are identical to that of | EDXL-RM. The objective is to create a descriptive table of those elements that a programmer can use to develop a set of procedures to strip the RM data from SITREP to manage records in the relational database
Measurable : Requires diligently investigating each and every data element then comparing them with the two data standards SITREP and RM. Requires knowledge of data types and XML. If not, this exercise will help the student learn about XML and data standards
Attainable :
Step 1 :: Go through EDXL-RM and EDXL-SITREP documentations
Step 2 :: create example files to get an understanding of the data and structure
Step 3 :: develop the table with RM and SITREP elements with a description
Step 4 :: develop a simple XSL file to strip the RM data from SITREP
Relevant : Applies to Sahana interoperability policy. Given that Eden does support resource and incident management, it is important to derive the response resources and resource requirements from situational reports. This function would help automate some of those data extraction functions. That requires integrating the SITREP and RM components with underlying Eden schema
Time-bound : The exercise of understanding the data standards and mapping the elements should not take more than one week. developing a XSL to test the mapping may take another week, depending on the level of expertise with XML. (NB this is far too large a task for GCI. -- Pat)
Evaluate : The mapping table is the determining output. However, the example RM and SITREP files are also required.
Reevaluate : If the XSL transformation is developed, then the mapping can be tested with the sample RM and SITREP files
Review code for quality of localized strings
Not added to GCI spreadsheet -- this was a task for GCI 2011, so would need to identify what was not done.
All strings which appear in the user interface, such as in menus and forms and help info, should be "internationalized" -- marked to make them available to be translated into different languages. This is done by putting the strings inside of T( )
, e.g. T("This string will be written into language files to be translated")
. The strings in T( )
are keys that are used to look up translated strings. By convention, the key strings are in US English.
For GCI, you will need to review all the internationalized strings in the model and controller files for a single module, eg:
controllers\gis.py
,models\gis.py
, andviews/gis/*.html
controllers\hrm.py
,models\hrm.py
, andviews/hrm/*.html
controllers\default.py
andviews/default/*.html
Check for:
- Incomplete or cut-off sentences in the translation strings
- Avoid concatenation of localized strings with variables - use %s or %(key)s instead. That is, instead of:
T("My name is ") + name
use this:
T("My name is %s") % name
And instead of:
T("The item ") + item + T(" is not available in ") + location.name
use this:
T("The item %(item)s is not available in %(place)s.") % {"item": item, "place": location.name
}
This is better because the word order is not the same in all languages -- in the second form, the translator can move where the variables are inserted. - Look for fields without a label - e.g. Field("fieldname") as these cannot be localised.
- Look at strings that have not been wrapped in
T( )
to see if they ought to be. But be cautious: Not all strings need to be localized, and some definitely should not be:- Strings that are used as keys in dicts, e.g.
{"this_is_a_key": 5}
, should not be localized. - A string that is intended to be in one specific language should not be localized (e.g. the language names in the language menu in
deployment-templates/models/000_config.py
).
- Strings that are used as keys in dicts, e.g.
- Consider improving consistency of wording / terminology - don't use different strings that mean the same thing, e.g. if there is
T("My name is")
in one place, avoid usingT("I am called")
somewhere else.
You will need to download a working branch of Sahana Eden code for this task and push the changes you make to your own branch on Git.
Please focus on modules which are enabled by default.
Intermediate
Feature Enhancements
- Fix UI issues, add features, provide user-requested enhancements.
- You can pick from these feature requests.
OSM Importer UI
Added to GCI spreadsheet, but this may be outside the desired time limit.
(GCI task is the first part, not the "further refinement".)
- There is an import stylesheet for .osm files: static/xslt/import/osm.xsl
- This currently has hard-coded mappings between OSM admin levels & Sahana admin levels
- A custom controller should be written
- provide a UI to the user to select their country from the dropdown which pre-populates the mapping fields for manual verification/adjustment
- process the results of this to pass new variables back to the stylesheet:
- http://pub.nursix.org/eden/s3xrc/vita.modules.s3xrc.s3rest.S3Resource-class.html#import_xml
resource = s3xrc.resource("gis", "location") template = os.path.join(request.folder, resource.XSLT_PATH, "osm", "import.xsl") resource.import_xml("uploaded_filename.osm", template=template, mynewvar="xxx")
- http://pub.nursix.org/eden/s3xrc/vita.modules.s3xrc.s3rest.S3Resource-class.html#import_xml
- The Stylesheet needs updating to act on these vars when found
A nice further refinement would be to provide a UI to select a BBOX & optional filter to pull down the .osm file via XAPI
- Initially this could be manual text box entry of BBOX/filter
- Then add a Map-based BBOX selection & dropdowns for the filter (which prepopulate the real dropdowns for manual verification/amendment)
Recurring Requests
Not added to GCI spreadsheet -- Dominic is currently implementing this. e.g. Shelter needs 100 liters of water/week
Want to be able to add Scheduling functionality to Requests.
There is a wrapper for Web2Py's Scheduler class in modules/s3/s3task.py
Can use UI ideas/code from Sync
Fix an Hard Ticket
http://eden.sahanafoundation.org/report/1 Pick a bug report from http://eden.sahanafoundation.org/report/1, try to reproduce the issue in a local instance, fix the problem and submit a patch to the ticket on Trac, then notify the Sahana-Eden mailing list about your patch for verification.
Build library(ies) to integrate Emergency Data Exchange Language Distribution Element
Difficulty : HARD proposed by: | Nuwan
Specific : | EDXL-DE is the final wrapper (envelope) of all | EDXL data package. We may be delivering a EDXL Resource Management (RM) information and Situational Reporting (SITREP) information to the managers of several emergency organizations. The DE will contain who, when, and where those RM and SITREP data parcels would be delivered. Every EDXL message (data package) must carry this information. Otherwise, it cannot use available distribution methods and would need to rely on its own protocol; that's not very user friendly.
Measurable: It is purely a coding task that involves playing with XML and developing a class, possibly within or using the ??? 3R ??? framework It is basically a set of procedures for packing and unpacking EDXL-DE wrapped data.
Attainable: run through the steps
Step 1 :: select one of the existing EDXL-based applications in Eden, I recommend the EDXL-RM
Step 2 :: discuss each of the attributes/elements; then determine how EDXL-DE would be added to EDXL-RM as a pop-up GUI.
Step 3 :: create some example XML files to get a feel for the inputs and outputs
Step 4 :: write code to add to take the inputs EDXL-RM and EDXL-DE to package the data for delivery
Step 5 :: test the code, fix bugs, and generalize the functions
Step 6 :: Apply to EDXL-HAVE and EDXL-SITREP to generalize the library
Relevant : Applies to Sahana Interoperability policy. Present developments to investigate are: HAVE, RM, and SITREP http://www.oasis-open.org/standards#edxl
Time-bound: If steps 1 - 4 are completed that can be a full accomplishment; additional work is a bonus
Evaluate : Produce XML files with the EDXL-DE element appended to the EDXL-RM, SITREP, or HAVE
Reevaluate: Use an API to add and strip the EDXL-DE to any EDXL data standard. Use the same set of XML files to run through this process
Advanced
Have a look at a BluePrint to see what advanced code contributions are needed.