Page MenuHomePhabricator

GSoC '24 Proposal: www.wikipedia.org Wikimedia portals - codebase modernization
Open, Needs TriagePublic

Description

Most of the code for www.wikipedia.org was written in 2015 using Node.js. At that time, Node didn't support native language constructs like Promises or array functions like map/reduce/filter. Because of this, many dependencies were added to provide this functionality. Now, many of these dependencies are no longer necessary, and so it's time to get rid of them.

Project scope

The codebase is split into three distinct areas:

  • the data layer - responsible for gathering the statistics data and translations for the www.wikipedia.org page. This is written in Node.js.
  • the build process - responsible for combining the data with the front-end code and producing the final production ready page. This is written in Gulp.js.
  • The front-end layer - This is the HTML/CSS/JS that you see on the final www.wikipedia.org page. This code is written in vanilla JS, handlebars templates and the PostCSS processor.

There are opportunities for modernization across all three of these layers, but the highest priority for this project will be data layer and certain parts of the build process. Some of the larger parts of this project include:

  • Adding the Jest.js testing framework and unit tests
  • Refactoring how translations are generated
  • Removing many Gulp.js dependencies
  • Creating better separating between the data layer and the build-step.

Skills required

If you have a good understanding of Node.js & asynchronous code, javascript, and the Gulp.js build tool and Jest.js testing tool, this project could be suitable for you.

Check out the Wikimedia-Portals tag on phabricator to learn more about this project.

Possible mentor(s)

@Jdrewniak @bwang

Microtasks

  • Replace the underscore npm library with native array functions
  • Replace the bluebird.js npm library with native promises or async await.
  • Replace the deepmerge npm library with native Array.concat
  • Replace the del npm library with native Node.js file system functions
  • Replace the preq npm library with native Node Fetch API
  • Replace the moment.js library with Luxon (or native Node functions if possible).

Estimated hours: 90h
Estimated difficulty: easy to intermediate

Event Timeline

Jdrewniak renamed this task from www.wikipedia.org Wikimedia portals: Codebase modernization to GSoC '24 Proposal: www.wikipedia.org Wikimedia portals - codebase modernization.Mar 1 2024, 5:34 PM

Hi @Jdrewniak

Thank you for sharing your proposal! It sounds like a great project and is perfect for GSoC!

Question:

  • Do you have a second mentor in mind for this project? We recommend that each project has two mentors, with at least one mentor with a technical background.

To-Do

I have added you to the mentor Zulip chat where you can connect with fellow mentors for ongoing support and collaboration. We recommend you have a co-mentor for every project, if you have one kindly add them to the project and they will be added to the zulip chat also.

Also @Jdrewniak Please can you add the expected size of project it can be either: 90, 175 or 350 hours. If possible please also add, an easy, intermediate or hard/difficult rating. This helps the more inexperienced folks not get overwhelmed and they can focus on reviewing easy project ideas.

Thank you,

@Maryann-Onyinye thanks, I just added a second mentor the the project :)

To-do's

Great! I've sent Zulip and Google platform invites to your co-mentor.

Quick question: On Mediawiki the project size is: 150 hours while on Phabricator its 90 hours. Which is correct?

Change 1008088 had a related patch set uploaded (by Punith.nyk; author: Punith.nyk):

[wikimedia/portals@master] Refactor: Replace underscore library with native array functions site-stats.js

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

Change 1008097 had a related patch set uploaded (by Punith.nyk; author: Punith.nyk):

[wikimedia/portals@master] Refactor: Replace 'del' npm library with native Node.js file system functions in copyTranslationFiles function

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

Change 1008096 had a related patch set uploaded (by Punith.nyk; author: Punith.nyk):

[wikimedia/portals@master] Replace deepmerge NPM library with object spread syntax in Stats.readi18nFiles

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

Change 1008109 had a related patch set uploaded (by Punith.nyk; author: Punith.nyk):

[wikimedia/portals@master] Replace 'preq' with 'fetch' in the code base

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

Change 1008095 had a related patch set uploaded (by Punith.nyk; author: Punith.nyk):

[wikimedia/portals@master] Refactor generateFileList function to replace moment.js with native nodejs functions

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

Change 1008089 had a related patch set uploaded (by Punith.nyk; author: Punith.nyk):

[wikimedia/portals@master] Replace the bluebird.js npm library with native promises or async await.

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

Change 1008292 had a related patch set uploaded (by Punith.nyk; author: Punith.nyk):

[wikimedia/portals@master] Refactor: Replace underscore library with native array functions in all the controlle.js file

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

Maryann-Onyinye changed the visibility from "Public (No Login Required)" to "acl*outreachy-mentors (Project)".Mar 4 2024, 8:49 AM
Maryann-Onyinye changed the visibility from "acl*outreachy-mentors (Project)" to "Public (No Login Required)".

Change 1008088 had a related patch set uploaded (by Jdrewniak; author: Punith.nyk):

[wikimedia/portals@master] Refactor: Replace underscore library with native array functions site-stats.js

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

Change 1008096 merged by jenkins-bot:

[wikimedia/portals@master] Replace deepmerge NPM library with object spread syntax in stats.js

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

Change 1008097 had a related patch set uploaded (by Punith.nyk; author: Punith.nyk):

[wikimedia/portals@master] Refactor: Replace 'del' npm library with native Node.js file system functions in copyTranslationFiles function

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

Change 1008095 had a related patch set uploaded (by Punith.nyk; author: Punith.nyk):

[wikimedia/portals@master] Refactor generateFileList function to replace moment.js with native nodejs functions

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

Change 1009759 had a related patch set uploaded (by Punith.nyk; author: Punith.nyk):

[wikimedia/portals@master] Refactor: Replace underscore library with native array functions in data/stats.js

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

Change 1008095 merged by jenkins-bot:

[wikimedia/portals@master] Refactor generateFileList function to replace moment.js with native nodejs functions

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

Change 1008292 merged by jenkins-bot:

[wikimedia/portals@master] Refactor: Replace underscore library with native array functions in all controller.js files

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

Change 1009759 merged by jenkins-bot:

[wikimedia/portals@master] Refactor: Replace underscore library with native array functions in data/stats.js

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

Change 1008109 merged by jenkins-bot:

[wikimedia/portals@master] Replace 'preq' with 'fetch' in the code base

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

Change 1010695 had a related patch set uploaded (by Hridyanshu7; author: Hridyanshu7):

[wikimedia/portals@master] component: code refactored replacing bluebird.js and preq

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

Change 1010876 had a related patch set uploaded (by Hridyanshu7; author: Hridyanshu7):

[wikimedia/portals@master] Refactor: Replace 'del' npm library with native Node.js file system functions

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

Change #1008097 merged by jenkins-bot:

[wikimedia/portals@master] Refactor: Replace 'del' npm library with native Node.js file system functions in copyTranslationFiles function

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

You’re probably at the wrong place: there’s nothing in this task about badges, I don’t even know what you’re speaking about.

You’re probably at the wrong place: there’s nothing in this task about badges, I don’t even know what you’re speaking about.

Who are you. Are you Mentor? If not what are you talking about." Add For User Badges" is another Project. However, There are no any details. They have the same mentors.

@Wanluwang: This task is about "www.wikipedia.org Wikimedia portals - codebase modernization". This task is not about badges.
Please keep different topics in different places - thanks a lot! :) See https://www.mediawiki.org/wiki/Outreach_programs for discussion venues.

@Wanluwang: This task is about "www.wikipedia.org Wikimedia portals - codebase modernization". This task is not about badges.
Please keep different topics in different places - thanks a lot! :) See https://www.mediawiki.org/wiki/Outreach_programs for discussion venues.

Thank you

@Jdrewniak Sir i want to contribute to the task under the GSoC could you please tell me how to submit the proposal for the task.