Page MenuHomePhabricator

Weekly Reports : Add a "hierarchy" type to the Cargo extension [GSoC-2017]
Closed, ResolvedPublic

Description

Weekly reports for the project (task): T161034 will be updated here.


Community Bonding Period

Report 4 May - 10 May: Community Bonding Period

  • Interacted with mentors, shared my GSOC preparation and celebration experience. Nischay told about his GSOC days.
  • This week was majorly about celebration and then I got busy with end semester exams.
  • Created a Skype conversation for all the project mentors for easy and fast communication

Report 11 May - 17 May: Community Bonding Period

As required by the GSOC program, I performed the required tasks and in addition, I had discussions with my mentors.

  • Joined the Wikimedia's Zulip channel for GSoC
  • Introduced myself on the Wikitech-l Mailing List
  • Pulled the latest version of development branch of MediaWiki and Cargo
  • Discussed what tasks to be performed regarding community bonding phase with mentors
  • Brought my blog domain live
  • Connected with fellow participants on Facebook
  • Created a reporting task for my project at Phabricator
  • Installed some new tweaks in my Linux working environment for a new design and more productivity

Report 18 May - 24 May: Community Bonding Period

  • Discussed implementation details (such as storing hierarchy in WikiText and parsing WikiText) with Yaron
  • Explored Cargo Extension by trying and playing around to understand its capabilities.
  • Revised SQL concepts

Report 25 May - 29 May: Community Bonding Period

  • Relating Cargo Features with code. Figuring out which functionality corresponding code resides where.
  • Learnt about basic method for storing hierarchies efficiently - helpful resource
  • A brief meeting with mentors on Skype regarding confirmation of bi-weekly project meetings on our Skype group conversation.
  • Discussion with other GSOC participants on an informal WhatsApp group, regarding their projects and organisation practices.
  • Going through Basic Extension Writing Tutorial and Guide for developing extensions to understand various components of an extension and the purpose that they serve.

Coding Period

Report 30 May - 5 June: Coding Period (Week 1)

  • Discussion with the mentor, Mr Yaron, on the implementation of hierarchy field in cargo_declare. At first, we thought of just nodes of the tree (hierarchy) adding "allowed values=" with "*". But then we realised that there is a little probability that even non-hierarchy input might start with "*", and would cause ambiguities. Hence we decided to add an additional parameter in the field description for hierarchy fields that would be 'hierarchy'. And it('hierarchy') would take no value just like 'hidden' additional parameter.
  • Set up debug log environment in the MediaWiki.
  • Added support for hierarchy field. (Changed - CargoFieldDescription.php - adding the $mIsHierarchy variable to the class and implementing necessary changes in order to update it.)
  • After discussion with the mentor, we realized that it would be good to implement PageForms to detect default input for hierarchy as a tree, so completed the part - Add support for hierarchy fields in the Page Forms extension - so that such fields automatically get the right input type ("tree"), with the right values filled in.
  • Cargo code was modified to accept hierarchy Field Description.
  • PF code was modified to set default input type as tree when the field is hierarchy.
  • Patches to both the repositories were initiated.

Report 6 June - 12 June: Coding Period (Week 2)

  • Discussion regarding the efficient implementation of Hierarchy Fields.
  • I searched up and proposed Adjacency List or Nested Set Implementation Details.
  • As asked by Mr Yaron, I created a spreadsheet indicating table schemas and sample queries for both the approaches.
  • I also implemented sample codes for both approaches for single value fields.
  • The work got delayed as I got sick due to the flu, but since all sample queries and sample codes are ready, the implementation should be fast.

Report 13 June - 19 June: Coding Period (Week 3)

  • We finalised the column and table names for the hierarchy tables.
  • Mentors helped me to improve the spreadsheet document which will serve as a lookup guide during the hierarchy database implementation.
  • Mr Yaron asked me to change the foreign key from "id" to the string of the field. So I tried to investigate any possible negative impact. To have an external opinion, I also discussed the matter with my classmate.
  • Discussed what microtasks must be included in the next patch:
    • Create and name tables T_1, T_2 and T_3 according to hierarchy fields.
      • T_1 - Hierarchy Structure Table
      • T_2 - Original Cargo Table for each table
      • T_3 - Table for multi-valued fields.
    • Creation of HierarchyTree class [Now renamed as CargoHierarchy class] with methods to perform following tasks
      • Generate Tree from wikitext
      • Generate data to populate T_1
    • Test 'Recreate Data' for several types of field
  • Table T_1 and indexes creation code added. (Also found a bug in old code)
  • CargoHierarchy class added.
  • Uploaded patch ( Branch Name: hierarchy-create-tables ) for review

Report 19 June - 25 June: Coding Period (Week 4)

  • Hierarchy fields in original Cargo Tables were not being populated and required debugging.
  • While debugging, reached a blocker stage. Yaron and I, worked together to solve the issue.
  • Required to take a decision regarding code design issue that affected previous work.
  • I revised my previous patch for Page Forms and Cargo and uploaded the patches. ( PF - hierarchy-project, Cargo - hierarchy-populate-tables )

Report 26 June - 2 July: Coding Period (Week 5)

  • Fixing 2 bugs that arise when Cargo Tables are deleted by the user. (Patch uploaded)
    • Drilldown crashes
    • CargoRecreatdata.php shows fatal error while recreating data for a table whose template is deleted.
  • Understanding existing code for Cargo query commands.
  • Working on WITHIN keyword functionality.

Report 3 July - 9 July: Coding Period (Week 6)

  • Completed code for WITHIN and HOLDS WITH query wrapper commands for Cargo (branch : hierarchy-where-support)
  • Fixing DB-JOIN bug
    • Lead to immense discussion for changing cargo_tables schema to meet the current needs.
    • Adding new column "field_helper_tables" to "cargo_tables"
    • Changing CargoDeleteTable.php to incorporate the new changes in schema

Report 10 July - 16 July (Week 7)

  • Completed Drilldown Filter List as proposed in T161034
  • Incorporated code review for the branch hierarchy-where-support
  • Discussed the usage of NOT WITHIN and NOT HOLDS WITHIN commands

Report 17 July - 23 July (Week 8)

  • Removed the commands NOT WITHIN and NOT HOLDS WITHIN from the code.
  • Fixing the bug for NOT(A within B)
  • The approach for Cargo Drilldown was not very apt, so a modification was proposed by mentors.
    • Instead of using previous set of queries multiple times for hierarchy, write a new Query
    • Also change the display text.
  • Refactored code for hierarchy-where-support and drilldown-hierarchy-support.
    • Making comments more clear, after Nischay's advice
  • Making a new Class - CargoDrilldownHierarchy for hierarchy's drilldown functions
    • After discussion with Yaron, we decided to extend CargoHierarchy class to create CargoDrilldownHierarchy.
      • This required a few changes in CargoHierarchy's definition.

Report 24 July - 30 July (Week 9)

  • Incorporating more code reviews
    • Adding labels into i18n
    • Renaming functions and variables.
    • and some other code review comments
  • Splitting the patch in branch drilldown-hierarchy-support into two
    • drilldown-hierarchy-support and hierarchy-new-static

Report 31 July - 6 August (Week 10)

  • Incorporating more code reviews in hierarchy-new-static, drilldown-hierarchy-support and hierarchy-new-static
  • Finally, the above patches got merged after rigourous testing and code reviews.
  • Could not work more during this time, due to activities at University.

Report 7 August - 13 August (Week 11)

  • Started working on adding support for creating hierarchy fields in CreateClass and CreateTemplate.
    • Found bug in CreateTemplate
      • Validation did not work properly, even after providing Cargo Table name in the form, blank error was raised.
    • Submitted a patch, did not get merged as my mentor, Yaron also implemented the solution just before.
  • Changed the name of the class CargoHierarchy to CargoHierarchyTree (cargo-hierarchy-class-renaming)
  • Worked on a patch so that hierarchy structure does not require escaping of comma (hierarchy-comma-noescape)

Report 14 August - 20 August (Week 12)

  • Completed adding support for creating hierarchy fields in CreateTemplate (createtemplate-hierarchy)
  • Completed adding support for creating hierarchy fields in CreateClass (createclass-hierarchy)
  • Worked on the patch for validation of hierarchy structure input.
    • improved patch by following code reviews
  • Worked on the patch to collapse deeper levels of hierarchy to show maximum of $wgCargoMaxHierarchyDrilldownValues nodes
  • Performed Fix: Within filter not being applied with other filters
  • Worked on the patch for literal "drilldown" in the applied filter line for hierarchy field in case of within filter.
  • Worked on documentation.

Report 21 August - 28 August (Week 13)

  • Performed necessary changes to support more than 2 Drilldown "within" filters.
    • solved application issues.
  • Performed necessary changes to support more than one hierarchy fields in a single template.
    • solved database query issues.
  • Worked on making "hierarchy" keyword position independent in the Cargo declare command.
  • Fixed error in CargoDeleteTable.php due to fieldHelperTables.
  • Changed code to accept any number of spaces after "*"
  • Worked on documentation and final report.

Links to blog post

WeekBlogpost LinkDue Date
Week 1 + 2Blogpost(Due May 18th, 2017)
Week 3Blogpost(Due May 25th, 2017)
Week 4Blogpost(Due June 1st, 2017)
Week 5Blogpost(Due June 8th, 2017)
Week 6Blogpost(Due June 15th, 2017)
Week 7Blogpost(Due June 22nd, 2017)
Week 8Blogpost(Due July 6th, 2017)
Week 9Blogpost(Due July 13th, 2017)
Week 10Blogpost(Due July 20th, 2017)
Week 11Blogpost(Due July 27th, 2017)
Week 12Blogpost(Due August 3rd, 2017)
Week 13Blogpost(Due August 10th, 2017)
Week 14Blogpost(Due August 17th, 2017)
Week 15Blogpost(Due August 24th, 2017)
Week 16Blogpost(Due September 7th, 2017)

Event Timeline

Hi, a gentle reminder to update your weekly report.

Fz-29 updated the task description. (Show Details)

Hi! If there is not anything remaining in this task could you please resolve it?