wiki:Contribute/Code

Version 99 (modified by Fran Boon, 9 years ago) ( diff )

--

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 a Ticket

Pick a ticket (which could be a bug or an enhancement) from http://eden.sahanafoundation.org/report/1. First ensure that you can repeat this in your local instance - if not: MODIFY TICKET > resolve as > worksforme. If the bug is still present, assign the ticket to yourself. Then fix the bug or implement the feature. Submit your code as a patch to the ticket on Trac, then notify the Sahana-Eden mailing list about your patch for verification. Please submit as a patch file, not zipped. That makes it easier to review without downloading and unzipping. Alternatively (preferred method) push your code in a single commit to your Github repository and make a pull request.

Easy tickets to get started on are listed here: http://eden.sahanafoundation.org/report/18

Common Operational Datasets [GCI]

Added to GCI spreadsheet.

GIS/Mapping [GCI, multiple tasks]

Added to GCI spreadsheet
These are various GIS/Mapping Tasks:

  • Add a delay to the onHover tooltip (highlightControl)
  • 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
  • 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 (completed by aviraldg)
  • Layer Tree
  • Create a pr/person/presence record upon login if HTML5 GeoLocation available & has changed since last time
    • login_next
  • Map Preview when Lat/Lon set in pr/person/presence (auto or not)

Use the Mapping API to:

  • Color coded maps according to Geo-data (threats, needs, etc)
  • Place variable sized markers on the map in proportion to data (number of people in camp, number of families needing food)

Lat/Lon converter [GCI]

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 degrees minutes seconds, e.g. 57°55'56.6"E.
  • Create a validator (& possibly widget) to allow entry of this format (allowing for variations in input format like spaces and absence of the degree symbol, which most keyboards don't have) & have it converted to decimal degrees for storage

Scale Uploaded Images [GCI]

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.

Suggestion Box [GCI]

Added to GCI spreadsheet
(Original suggestion from: http://groups.google.com/group/sahana-eden/browse_thread/thread/bbda1e98b73e1437)

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.) (completed by aviraldg)
  • 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

Intermediate

Feature Enhancements

  • Fix UI issues, add features, provide user-requested enhancements.

OSM Importer UI [GCI]

Added to GCI spreadsheet.

Current Status

Enhancements Needed

5 separate GCI Tasks here:

  1. We need to add the Sahana UUID to these features in the OSM database.
    • This is needed so that we can do deduplication on subsequent imports (the OSM ID is insufficient for this as it can change over time)
    • This means we need to read the OSM credentials (currently a deployment_setting in 000_config.py) & do a REST API call to the main OSM database with the modified feature(s)
  2. Move the OSM credentials from a global 000_config.py deployment_setting to a per-user setting (component resource of db.auth_user)
  3. We would like to be able to control which features are imported from this UI (currently this is a deployment_setting in [000_]config.py - that should become the list of avaialble options rather than the absolute list)
  4. We would like to be able to download features for a Location from main OSM database
    • We want to use the Polygon (falling-back to BBOX (min_lat, max_lon, etc)) to trigger a download of a suitably-filtered .osm file via the Overpass API
  5. We would like to be able to download features for a Polygon
    • Provide a map window with a Polygon selector tool which then triggers a download of a suitably-filtered .osm file via the Overpass API

Fix a 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

Not added to GCI spreadsheet -- outside time bounds. Can it be split or cut down?
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

Tasks

These are smaller tasks that could be completed over a few days:

  • Better handling of image and file uploading and representations
    • Represent function for full image or thumbnail
    • Lightbox viewer for full sized image
      • e.g. Make use of the one within Vulnerability module
  • Switch between an update and read page using JS
  • UI

Projects

These are more extensive projects that would require a longer term commitment over several months. These would be suitable for GSoC projects.

Dashboards

Mentors: Michael Howden, Fran Boon

Sahana Sunflower

Mentors: Michael Howden, Fran Boon

Continue the work from the Sahanathon to use Sahana as a Community Management Tool to:

  • Track volunteers
  • Manage tasks (potentially including bugs/feature requests)
  • Record Sahana Projects & Deployments

More details here: http://eden.sahanafoundation.org/wiki/Event/2012/Sahanathon This would involve:

  • Writing up Deployment Page for Sahana Sunflower
  • Manage Improvements to PM Tool / Sunflower
    • Get outstanding tasks from existing Sunflower site
    • Review Permissions
    • Settings to have new tasks automatically assigned to specific people (based on people for project / activity?)
    • Different types of tasks
    • Filter lists for different users
      • Users can only see
    • Make it simpler to log bugs
      • http://eden.sahanafoundation.org/ticket/1307
      • Less fields
      • No login required - but allow user to specify who’s login it in a field
      • Add a default link to log a bug in Sunflower - which copies the current URL to the “Source” field
      • Log a bug when an error is encountered
      • If not already logged for this bug
    • Ability to “vote” on tasks

Out-Of-The-Box Sahana Deployment

Mentors: Michael Howden, ...

  • Modules to Enable / Configure
    • Volunteer Management
    • Staff Management
    • Project Management
    • CMS (User Updates)
    • Request Management
  • Automate Test Scripts
  • UI
    • Re-design Homepage
    • Design Menu Hierarchy to match User Stories
    • Design Module Index Pages / Dashboards
    • Design/implement new theme (Using Bootstrap/JqueryUI?)

Mobile Interface

Mentors: Michael Howden, Graeme Foster, Fran Boon

  • Implement a responsive HTML interface for mobile devices.
    • Style standard CRUD + Search + Report
    • Possible options include Bootstrap, jQuery Mobile & Sencha
  • Represent Menus in a meaningful way for Mobile Devices

Translation Support

Mentors: Fran Boon

  • A translation module was developed for GSoC last year which is already in active use however it still suffers from many limitations:
  • Provide a set of admin scripts (perhaps run by git commit hook?) to update Pootle with any changed strings as a merge.

Workflow Support

Mentors: Graeme Foster

  • UI design to indicate steps in a workflow
  • Functionality to split the completely of large forms up into smaller steps (possibly using JS?)
  • Workflow Engine (probably beyond the scope of GSoC - actually I think this should be the primary scope of the project GF)

Full Text Search

e.g. using Apache Lucene Search uploaded documents

Export Graphs

Export Graphs as Images. Options:

Optimization

  • Performance enhancements to handle 10,000's of records
    • Server-side clustering of map features with different report-style aggregate representations
    • Optimize Report generation (probably beyond GSoC)
      • Data Warehouse? (Flattened tables structure, NoSQL)
      • Stored Procedures?

Rostering

  • Optimizing Algorithms for Rostering

Have a look at a BluePrint or Projects List to see some more advanced code contributions which are needed.


Contribute

Note: See TracWiki for help on using the wiki.