Page MenuHomePhabricator

[Outreachy/Round 15] Proposal : Refactoring the MediaWiki MassMessage Extension
Closed, ResolvedPublic

Description

Profile Information

Name: Teke Noella
IRC nick: noela
Web Profile: https://github.com/noella94
Location: Cameroon
Typical working hours (+ timezone): 08pm-2am UTC +1
Email: tekenoella94@gmail.com

Synopsis

Introduction

The MassMessage extension allows a user to send a message to a list of pages via special page (as stated here). The extension is used by one or more MediaWiki project. MassMessage is more than four years old, and technical debt has accumulated. This project aims at making the clean up and refactoring of the extension.

Project Details

  • Put the extension into a PHP namespace (MediaWiki\MassMessage).
  • Have "targets" use a value object instead of passing arrays around.
  • Turn MassMessage::getTargets() into an abstract MassMessage\SpamlistLookup or something, and have individual classes extend it.
  • Break down the giant MassMessage class into smaller ones that have less responsibility.
  • Add phan tests in Extension MassMessage
  • Allow using Wikidata items as spam lists phab:T171617
  • Warn when <ref> tag is present but no <refrences> tag is present phab:T156167

Mentors

@Legoktm, @D3r1ck01

Implementation approach

Timeline and Deliverable

Describing the timeline of my work with deadlines and milestones, broken down in 2 weeks Including time I am planning to allocate for investigation, coding, deploying, testing and documentation

  • Nov 09 - Nov 23
    • Community Bonding Period
    • Make research on Project
  • Nov 23 - Dec 07
    • Community bonding continues
    • Setup Wikimedia instance on Cloud VPS to commit and test changes
    • Discuss about development method and tools to use with mentors
  • Dec 07 - Dec 21
    • Gather necessary development requirements and get setup for development
    • Start implementation of Project
  • Dec 21 - Jan 04
    • Will put the extension into a PHP namespace so as to enable importing
    • Documenting and daily reporting of work done
  • Jan 04 - Jan 18
    • Break down the giant MassMessage class into smaller ones that have less responsibilities
    • Have "targets" use a value object instead of parsing arrays around
    • Reporting and documentation of work done
  • Jan 18 - Feb 01
    • Turn MassMessage:getTargets() into an abstract MassMessage\SpamlistLookup or something , and have individual classes extend it.
    • Allow using Wikidata items as spam lists by creating a tool/script that will take Wikidata entries for a list of project pages (like Admin noticeboards) and generate a distribution list for MassMessage as suggested by @CKoerner_WMF in this ticket description
    • Reporting and documentation of work done
  • Feb 01 - Feb 15
    • Warn when <ref> tag is present but no <references> tag is present
    • Add phan tests in Extension MassMessage
    • Reporting and documentation of work done
  • Feb 15 - Mar 05
    • Fixing of bugs in the extension(MassMessage)
    • Code clean up
    • Improving documentation and reviewing documentations
  • After Internship
    • Continue contributing to MediaWiki and Extensions

Participation

Describing how I plan to communicate, progress and ask for help.

In other to keep track of the progress of my work, I will be documenting the work done everyday and on weekends, I will send via mail, a report of the progress to my mentors, while keeping the wiki report page up to date.
I shall be communicating more on the IRC with the mentors and maybe on hangout and other means they will find appropriate or more comfortable to use.
I will do a lot of personal research on my own so as to have a minimum number of questions to ask the mentors, but of course communication is very important between mentor and candidate and as such, I will make sure to always be reachable and available.

About me

Telling a few about me:

I am a drop out from university due to unstable political and economical situations in my Country. I was learning Geology at the university. I have always loved technology and got involved with programming. This year, with all the instability in my country (Teachers strike, Internet cut off in some regions, academic year canceled), I got myself more involved into programming (had just that to do). I joined the tech Community in my area. Participating at Dev meetups, Volunteering in organizing events, joining programming clubs and that gave me the opportunity to hear about Opensource, Wikimedia Foundation, and finally heard of Outreachy Program. In our area, we had an event that aimed at teaching us how to contribute to Wikimedia. I was feeling so exited to be able to write code that will be used by millions of persons and I will like to experience that more. My aim applying to this program is to learn more and also to usefully occupy myself during the duration of this program.

Past Experience

Describe any relevant projects that you've worked on previously and what knowledge you gained from working on it

I have worked on a few PHP projects but unfortunately just for fun :) and I knew nothing of the existence of code repositories like GitHub where I could save my projects. I learnt about opensource and Wikimedia Foundation with it projects from a Wikimedia workshop organised in my area some months back.

First Patch: https://gerrit.wikimedia.org/r/382145
Second Patch: https://gerrit.wikimedia.org/r/#/c/383564/ (merged)
Third Patch: https://gerrit.wikimedia.org/r/#/c/384199/ (merged)
Forth Patch: https://gerrit.wikimedia.org/r/#/c/384949/ (merged)

Any other Info

I find it amazing to contribute to MediaWiki and its extensions. Every one is so friendly and ready to help. I am glad I have being continuously learning since I joined <3 .

Event Timeline

Noella94 renamed this task from [Outreachy/Round 15] Proposal :Extension:MassMessage/Technical debt cleanup to [Outreachy/Round 15] Proposal : Refactoring the MediaWiki MassMessage Extension.Oct 14 2017, 1:58 AM
Noella94 updated the task description. (Show Details)
Noella94 updated the task description. (Show Details)
Noella94 updated the task description. (Show Details)
Noella94 updated the task description. (Show Details)

@Noella94 Very happy to see this proposal up in no time! :) Make sure you get some feedback on your proposal from @D3r1ck01 @Legoktm

Deadline to submit application is in 7 days (i.e. Oct 23rd).

@Legoktm Please could you have a look at my proposal? Cc @D3r1ck01

Overall looks good. I like the order you picked to do the work in. Few notes:

Write test suits for project and submit it to mentors for review

I think you should just write tests along with every commit, it doesn't really make sense to write them ahead of time.

Allow using Wikidata items as spam lists by creating a tool/script [...]
Allow using Wikidata items as spam lists

I think those two items are the same thing?

I think you should just write tests along with every commit, it doesn't really make sense to write them ahead of time.

Yeah true! Thanks

Noella94 updated the task description. (Show Details)

@Noella94, @D3r1ck01 suggested that one of the things that could be done during the community bonding period would be to set up a MediaWiki instance on Cloud VPS that could be used for other people to test your changes with. https://wikitech.wikimedia.org/wiki/Help:MediaWiki-Vagrant_in_Cloud_VPS is the documentation on how to do so.

@Legoktm Can I still edit my proposal at this stage? and add @D3r1ck01 suggestion to the timeline

Noella94 updated the task description. (Show Details)

Congratulations @Noella94 on your selection to Outreachy! Happy coding through out the program and good luck.

Now, I think you can add little useful pieces in your timeline and finalize all steps during this community bonding period before the actual coding period begins, in case of any question, ping us on IRC or via email or even on this ticket.

Change 399538 had a related patch set uploaded (by Noella94; owner: Noella94):
[mediawiki/extensions/MassMessage@master] Putting MassMessage Extension in PHP namespace MediaWiki\MassMessage

https://gerrit.wikimedia.org/r/399538

Change 399538 merged by jenkins-bot:
[mediawiki/extensions/MassMessage@master] Putting MassMessage Extension in PHP namespace MediaWiki\MassMessage

https://gerrit.wikimedia.org/r/399538

Change 402143 had a related patch set uploaded (by Noella94; owner: Noella94):
[mediawiki/extensions/MassMessage@master] Breaking down the MassMessage class into three classes

https://gerrit.wikimedia.org/r/402143

Change 402143 merged by jenkins-bot:
[mediawiki/extensions/MassMessage@master] Split DatabaseLookup and UrlHelper out of MassMessage

https://gerrit.wikimedia.org/r/402143

Change 405222 had a related patch set uploaded (by Noella94; owner: Noella94):
[mediawiki/extensions/MassMessage@master] [WIP]Replacing target Arrays with Objects.

https://gerrit.wikimedia.org/r/405222

Change 405222 abandoned by Noella94:
[WIP]Replacing target Arrays with Objects.

Reason:
This patch has a lot of misunderstood work. working on a new one

https://gerrit.wikimedia.org/r/405222

Change 405410 had a related patch set uploaded (by Noella94; owner: Noella94):
[mediawiki/extensions/MassMessage@master] [WIP]Replacing target Arrays with Objects.

https://gerrit.wikimedia.org/r/405410

Change 406171 had a related patch set uploaded (by Noella94; owner: Noella94):
[mediawiki/extensions/MassMessage@master] [WIP]Added abstract class SpamlistLookup

https://gerrit.wikimedia.org/r/406171

Change 406171 merged by jenkins-bot:
[mediawiki/extensions/MassMessage@master] Added abstract class SpamlistLookup

https://gerrit.wikimedia.org/r/406171

Change 408335 had a related patch set uploaded (by Noella94; owner: Noella94):
[mediawiki/extensions/MassMessage@master] [WIP]Adding Phan to MassMessage extension

https://gerrit.wikimedia.org/r/408335

Change 408335 abandoned by Noella94:
[WIP]Adding Phan to MassMessage extension

Reason:
This patch contains all files permission changes. will submit a new patch with the mistake fixed

https://gerrit.wikimedia.org/r/408335

Change 408440 had a related patch set uploaded (by Noella94; owner: Noella94):
[mediawiki/extensions/MassMessage@master] [WIP]Adding Phan to MassMessage extension

https://gerrit.wikimedia.org/r/408440

Noella94 updated the task description. (Show Details)

Change 410975 had a related patch set uploaded (by Noella94; owner: Noella94):
[mediawiki/extensions/MassMessage@master] [WIP]Replacing target Arrays with Objects.

https://gerrit.wikimedia.org/r/410975

Change 405410 abandoned by Noella94:
[WIP]Replacing target Arrays with Objects.

Reason:
working on a different Topic

https://gerrit.wikimedia.org/r/405410

Change 410975 abandoned by Noella94:
[WIP] Replacing target Arrays with Objects.

Reason:
will send a new one

https://gerrit.wikimedia.org/r/410975

Change 414112 had a related patch set uploaded (by Noella94; owner: Noella94):
[mediawiki/extensions/MassMessage@master] [WIP]Replacing target Arrays with Objects.

https://gerrit.wikimedia.org/r/414112

@Legoktm & @srishakatux, since Outreachy is over, does it make sense to close the proposals as resolved for those that completed the program?

Outreachy Round 15 ended in March 2018 and according to https://www.mediawiki.org/wiki/Outreachy/Round_15 this project happened. :)
So I am closing this task as resolved. Potential followup items can be handled in separate tasks. Thanks for your work!