Page MenuHomePhabricator

[Outreachy] Microtask: Pick a MediaWiki Action API page to review and improve
Closed, ResolvedPublic

Description

Pick an API page to work on and add your Phabricator username next to it in the relevant column
API pageWork in progressDone
API:Account_creationEdidiong Asikpo @Didicodes
API:API:LogoutSylvia Mittal @Sylviamittal
API:AssertKoda Gabriel @Itskoda, Edidiong Asikpo @Didicodes
API:EmailuserVirginia Balseiro @VirginiaBalseiro
API:BacklinksAna Dolocan @Anadolocan
API:RedirectsSandro Aguilar @Sunny_aggie, Marty H. Avedon @MartyavMarty H. Avedon @Martyav
API:InfoSerina Brown @Slaniseb
API:CategorymembersSupriya Aggarwal @pineappled_sun
API:ListsArica Chakraborty @Aricach1, Marty H. Avedon @Martyav
API:RevisionsAniuchi Adaobi @MichelleACodes
API:EditSaumya Srivastava @SaumyaP
API:UploadKarine Bender @KarineBender
API:ImagesMarty H. Avedon @MartyavMarty H. Avedon @Martyav
API:AllpagesAnita Tapiba @Mumylulu123
API:DeleteAnita Tapiba @Mumylulu123
API:IParameter informationSwarna Bisane @Bisane132, Anita Tapiba @Mumylulu123
API:RandomSanjana G @sanjana098, Edidiong Asikpo @Didicodes
API:PurgeEdidiong Asikpo @DidicodesEdidiong Asikpo @Didicodes
API:BlockLuana Menezes @LuanaMenezesBrazil
API:LinksMartha Dantas @Marthadntas
API:MoveLakshmi Prasannakumar @Lakspk
Getting started instructions
  • Set up Git on your computer and a Github account if you don’t already have one. Learn how to use both.
  • Set up a MediaWiki account if you don’t already have one.
  • Read the project description thoroughly and the MediaWiki Action API too.
  • Pick an action page from the table above that you would like to review and improve. Add your name next to the project in the “Work in progress” column. You will need to be logged into Phabricator and subscribed to the task and only then you will be able to edit the task description
  • Create a page in your Sandbox (https://www.mediawiki.org/wiki/User:your_username/Sandbox/API:pagename) and do not make edits directly to the API pages.
  • Fill it with the template content which is in here: https://www.mediawiki.org/wiki/API:Documentation_template (copy and paste). We encourage you to stick to the template if for some reason you feel the urge to add or remove any section, discuss with your mentors.
  • For your reference, read a couple recent API pages that we modified using the new template: API:Geosearch, API:Parsing_wikitext
  • If you write any sample code for the API page, consider contributing it to this repository: https://github.com/srish/MediaWiki_Action_API_Code_Samples. That way, once we complete this project, we may merge the repo with our organization repo, keeping your contributions intact.
  • If you are feeling a bit ambitious plus the action module you are working on is complicated enough, and its concept could be well explained via a demo app, then build one!
  • When you are done, ping your mentors and get some feedback on your work.
  • Incorporate mentors feedback. Once you get a green signal, coordinate with them in getting your changes integrated with the actual page on MediaWiki.org.
  • Finally, add your name next to the project in the “Done” column in the table above.

(if you’ve a specific question, about any of the step above, and you feel like being stuck do not hestitate to have a chat with @srishakatux on Zulip!)

Resources

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

@srishakatux Could you have a look at my sandbox on API:Images? I would love your feedback.

@Martyav Could you please share the link to your Sandbox? @Didicodes Thanks for creating the page, send a pull request for the code changes you've made, and then I will look at both code and document changes all together. :-)

Hi @Didicodes please which softwares and programming languages do u use in modifying your codes ?

Hi @Aklapper and @srishakatux, I think i'm half way done, please check it out : https://m.mediawiki.org/wiki/User:Mumylulu123/Sandbox/API:Delete#
Question: Please how do i get 'response' for this post request example
api.php?action=delete&format=json&title=Main%20Page&token=123ABC&reason=Preparing%20for%20move

@Mumylulu123 The programming language used to write the codes is python( Python3 preferably) ,then I use Pylint which follows style recommended by PEP 8, the Python style guide to format the codes. I use sublime Text editor(You can use any text editor that works best for you)

Sorry @srishakatux, i did some messy things in your git_repository, was struggling to contribute code in a pull request for review.
Please @Didicodes or @MichelleACodes for the steps on which u guys used to create a pull request (with your sample codes in them ) for review.
thanks for understanding!

@Martyav I've left a comment in your Sandbox here.
@Mumylulu123 You can follow instructions in the link shared by @Aklapper above and create a pull request.
@MichelleACodes Thanks for sending a pull request! Have you started documenting the improvements to the API:Revisions module already? If so could you share the link to that page in your Sandbox, else it is hard to tell for which examples you wrote the sample code for?

Hello @srishakatux I documented the improvements to the API:Revisions module. I also added the link to the sandbox as well as shown below:

Link to sandbox: https://www.mediawiki.org/wiki/User:MichelleACodes/Sandbox/API:Revisions

Pull request for sample codes written: https://github.com/srish/MediaWiki-Action-API-Code-Samples/pull/6 . Kindly review also

Hi @Aklapper i followed the link you gave me; creating a new pull request. It was very clear but i have a problem inputting my codes in my branch at the level of the ''bash'' command line. It accepts only the first line(#!/usr/bin/python3) and the line with the ''comments''. It doesnt recognises commands such as (import, URL, PARAMS, etc).....
Plz i need help!

@Mumylulu123: It's not that I/we know everything and this sounds off-topic for Wikimedia Phabricator... :) I don't know which exact steps you performed and what "it" is in "it doesn't recognize", plus this likely depends on operating systems and environments. Have you asked in a programming support forum already?

thanks very much @Aklapper for always trying to help me out.
Yes i did asked, not in a forum but a programmer friend today and right now i know exactly where my problem lies. Will resolve it soonest. Im working on it.

Hello @srishakatux I documented the improvements to the API:Revisions module. I also added the link to the sandbox as well as shown below:

Link to sandbox: https://www.mediawiki.org/wiki/User:MichelleACodes/Sandbox/API:Revisions

Pull request for sample codes written: https://github.com/srish/MediaWiki-Action-API-Code-Samples/pull/6 . Kindly review also

Hi @srishakatux I am still awaiting feedback on my work.

@srishakatux I'm working on the request script as of this morning. You can see the full code at https://www.mediawiki.org/wiki/User_talk:Martyav/Sandbox/API:Images

I am confused by the JSON output. Please review at your earliest convenience. Thanks!

@MichelleACodes @Martyav Sorry for the delay in getting back to you! I am going to review your work today and you will hopefully receive feedback in a few hours :-)

Thanks, @srishakatux

I made the correction (can't believe I was querying the wrong site), and added the sample to my sandbox, as well as made a pull request to your sample code repo.

  1. The sandbox
  2. The pull request

Hello everyone and @srishakatux , I am an outreachy applicant and intereted in contributing to this task. However, I noticed that all the API pages listed above are already in progress. Is there any chance I can contribute?

@Takename Thanks for your interest! Please see T205199#4650242 :-)

[Folks considering to submit their application for the Outreachy program] It would be ideal if you publish the first draft of your proposal on Phabricator by October 22nd. That way we will get some time to review your proposals and give you early feedback that you can then incorporate before the deadline. Also, remember to record contributions on Outreachy website and upload the proposal in a format required on the Outreachy site as well. If you have any further questions, ask on the #outreachy17 chat on Zulip

Hi @Aklapper @srishakatux
I have problem in my codes. After typing and trying to compile this following codes on my python IDLE:
#!/usr/bin/python3
""" delete.py

MediaWiki Action API Code Samples
Demo of `delete`module: Sending post request to delete a page
MIT license

"""
import requests
S = requests.Session()
URL = 'https://en.wikipedia.org/w/api.php'
PARAMS = {

'action': "delete",
'title': "Main%20Page",
'token': "123ABC",
'reason': "Preparing%20for%20move"

}
R = S.post(url=URL, params=PARAMS)
DATA=R.json()
print(DATA)

I have this SyntaxError: multiple statements found while compiling a single statement

Plz i need help.

[Folks considering to submit their application for the Outreachy program] It would be ideal if you publish the first draft of your proposal on Phabricator by October 22nd. That way we will get some time to review your proposals and give you early feedback that you can then incorporate before the deadline. Also, remember to record contributions on Outreachy website and upload the proposal in a format required on the Outreachy site as well. If you have any further questions, ask on the #outreachy17 chat on Zulip

Noted. Thank you!

Thanks for the update!

I worked on my Sandbox a bit more, addressed the changes requested on the PR, and have started hashing out some code for a simple web app, to display the images and file names from a given page as items in a list. I'll be putting it on a fork of my branch of the main sample code repo as I work. I might experience some delays since my main computer is waiting on a replacement part, and I'm borrowing someone else's to work.

I have problem in my codes. After typing and trying to compile this following codes on my python IDLE:

@Mumylulu123: Hi! General help with random Python errors is out of scope for this specific task (which is about reviewing documentation), sorry.

ook @Aklapper I guess i was able to resolved my bug. Plz review the codes on the two examples on my Sandbox: https://m.mediawiki.org/wiki/User:Mumylulu123/Sandbox/API:Delete#
thanks!

@Mumylulu123 Thanks for your work! Could you please send a pull request for the sample code to this repository https://github.com/srish/MediaWiki-Action-API-Code-Samples? And, I will take a look at it there.

@Didicodes @Martyav Sweet! You both have received feedback on the code and edits in Github and MediaWiki.org respectively. If any of you are looking for ideas to develop a demo app, here is one that I recently shared in this comment here.

@Mumylulu123 Thanks for your work! Could you please send a pull request for the sample code to this repository https://github.com/srish/MediaWiki-Action-API-Code-Samples? And, I will take a look at it there.

@Didicodes @Martyav Sweet! You both have received feedback on the code and edits in Github and MediaWiki.org respectively. If any of you are looking for ideas to develop a demo app, here is one that I recently shared in this comment here.

Cool idea @srishakatux . I would love to build a demo app for it!

@srishakatux I incorporated the changes you requested in the doc.

https://www.mediawiki.org/wiki/User:Martyav/Sandbox/API:Images

Thanks also for accepting my pull request!

Hi @srishakatux, this is the link to the pull requests you asked me to create : https://github.com/srish/MediaWiki-Action-API-Code-Samples/pull/11
Please review. Thanks!

Hello @srishakatux I have created a task containing the first draft of my proposal. Link: https://phabricator.wikimedia.org/T207704.
This is also the link to pull request I made for API:Random https://github.com/srish/MediaWiki-Action-API-Code-Samples/pull/12 and this is the link to the sandbox for API:Random https://www.mediawiki.org/wiki/User:Didicodes/Sandbox/API:Random

Kindly review! Thank You

@Mumylulu123 @Didicodes @Martyav @MichelleACodes Thanks for your work! You will hear feedback on your pull requests and work in progress pages on MediaWiki.org by the end of my day today (a few hours from now)!

Hi @srishakatux, I am done with the corrections you asked me to do on my API:Delete Sandbox. Please kindly review: https://www.mediawiki.org/wiki/User:Mumylulu123/Sandbox/API:Delete

Hi @srishakatux , I have made all the corrections you asked on API:Delete, except for this "Link the file from README. This would go under Page operations'' (I dont understand exactly what you want me to do!).

I created a new commit in the branch (del_main.py), which I think resolves all the other issues you pointed out. Please kindly review:
https://github.com/srish/MediaWiki-Action-API-Code-Samples/pull/11/commits/aa782913c3e281692d81d58325ea3bc140e95f03.

Also I did corrections on the Sandbox/API:Delete as you mentioned. Please kindly review here: https://www.mediawiki.org/wiki/User:Mumylulu123/Sandbox/API:Delete

Thanks!!

@Mumylulu123 Thanks for working on these pages! However, I would encourage you to work on only two pages at a time, share them with me as and when you are ready for review, incorporate any feedback and only then pick the next page to work on. Because at a time, I will not be able to review all the pages you are working on :)

@MichelleACodes @Didicodes @Martyav @Mumylulu123 I want to make a slight change in our review process -- before making a pull request, I encourage you to share the first draft of your work-in-progress documentation page without the sample code and only ideas for examples that you want to write code for. That way, we can first brainstorm on what sample code would make the most sense for an API module, and then you can write code for it and create a pull request as well.

ok @srishakatux , sorry for the inconvinience. Lets finish with API:Delete. I have made the corrections you asked for in a new commit, in same branch.

Hi @Didicodes, could you please explain to me how you did to link the README.md file in the repository?

Hi @Didicodes, could you please explain to me how you did to link the README.md file in the repository?

Hello @Mumylulu123 sorry for replying late. Do you still need help on that?

Okay. Let's chat on Zulip. I will send you a DM now

I couldn't find your name @Mumylulu123. Kindly send me a DM

Hi @Didicodes, sorry I have been offline since morning. My names are Tapiba Panyi Anita on Zulip....i just send you a message on Zulip. Did u see it ?

Hi again, @srishakatux. I've been working on API:Redirects (and updated API:Lists with your suggestions). Please review when you have time.

@Mumylulu123 @Martyav I will work with you post the application deadline to get your changes merged. As the application deadline is in less than 24 hours from now, I encourage you to first record your contributions (even the ones that are not accepted/ merged or are still a work in progress ) on the Outreachy site and upload your proposal both on Phabricator and on Outreachy site as soon as possible (see Step 10 here: https://www.mediawiki.org/wiki/Outreachy/Participants). Thanks!

[For all subscribers] Here is the message that we've got from Outreachy:

The Outreachy application system will close applicatons for this project on October 30 at 4pm UTC. Applicants who create an application can edit it until the project application deadline. After your project's application deadline, applicants will NOT be able to create a new application. Applicants who have submitted an application cannot edit their application, but they will be able to continue recording and editing their contributions on the Outreachy website until the intern announcement deadline on Nov. 16, 2018 at 4pm UTC. Applicants who have not submitted an application will not be able to record or edit their contributions.

@srishakatux Thanks for the reminder! I'm working on it right now!

Hi @srishakatux, sorry for the silence all this while.
I have removed the 2 files (delete_main.py and delete_main_move.py) you asked me to remove. ALso I arranged the parameters in the order that was in the link you send to me.
This is the link to the new commit: https://github.com/srish/MediaWiki-Action-API-Code-Samples/pull/11/commits/1620f85cc8359c30637135634ea5b80fb7c0483a

Thanks to all who contributed to this task and helped improved the API documentation. We were able to improve following pages with your help:
https://www.mediawiki.org/wiki/API:Images
https://www.mediawiki.org/wiki/API:Purge
https://www.mediawiki.org/wiki/API:Redirects
https://www.mediawiki.org/wiki/API:Delete
https://www.mediawiki.org/wiki/API:Categorymembers

Thanks again @Didicodes @Mumylulu123 @Martyav @pineappled_sun @MichelleACodes! If there is anything in your Sandbox still that you would like me to review, let me know!

(closing this task as we are past the application period and will address the remaining documentation improvements during the coding period of Outreachy)

srishakatux claimed this task.