User talk:Pineappled sun/Sandbox/API:Categorymembers

About this board

SSethi (WMF) (talkcontribs)

Thank you for working on this! First round of feedback is here:

Pineappled sun (talkcontribs)

Hi @SSethi (WMF)!

Thanks a lot for the feedback! I have gone through it and made the required changes. Please review those and notify me of any additional changes that need to be made.

Besides, for the last point that you have mentioned, i.e. embedding the module documentation, there are some redundant examples at the end of it. How should I go about removing those?

Also, I am yet to look into the demo app. Please excuse me for the delay. However, if you feel that it needs to be done urgently, please let me know because I don't want my chances of getting selected for the Outreachy internship diminished because of that.

Cheers!

Supriya.

SSethi (WMF) (talkcontribs)

@Pineappled sun Thanks for making the changes! :-) Another round of feedback:

  • About your questions first, the module documentation is automated and we cannot get rid of the examples in there. For demo app, you don't necessarily have to come up with one.. but if you've an idea in mind, discuss that with me first before implementing it :-)
  • In the `Response` section, you don't need to show the whole thing. For reference see how I've added three dots (...) and got rid of other items here: API:Geosearch#Response 2. Let's show at the max 3 items in the query field. For example, see below:
{
    "batchcomplete": "",
    "continue": {
        "blcontinue": "4|2124921",
        "continue": "-||"
    },
    "query": {
        "backlinks": [
            {
                "pageid": 217224,
                "ns": 0,
                "title": "Mainpage",
                "redirect": ""
            },
            {
                "pageid": 217225,
                "ns": 0,
                "title": "Main page",
                "redirect": ""
            },
            ...
        ]
    } 
  • In Example 3, you could add a point about how to continue the next subcategories.
  • You could name the code files such that they tell the purpose as well. For example for first one filename could be get_category_items.py, for second one get_recent_category_items.py etc.
  • In all your code files, you are missing comma after a parameter field. Run your code with Pylint (https://www.pylint.org/), to clean up your code, format it more and check for any errors. Also send a pull request to this repo: https://github.com/srish/MediaWiki_Action_API_Code_Samples
Pineappled sun (talkcontribs)

Hi @SSethi (WMF),

Please review the changes I have made. Also, I have raised a PR. Please review that as well. :)

Pineappled sun (talkcontribs)

For the demo app, can I initially just create an app where the user inputs the category name and the number of items he/she wishes to see, and fetch the results? And then enhance it further to include more query parameters?

SSethi (WMF) (talkcontribs)

@Pineappled sun Looks great! A few minor changes:

  • Remove ", ordered by page sort title." from the first line.
  • Remove "Demo apps(s)", and additional notes section as we don't have anything to add there for this example.
  • Once you address the changes I suggested in the pull request, make sure to paste the final version of the code files here.
  • One last thing, as you can see in the current version of this page API:Categorymembers we have parameters section. It includes information such as when a parameter was introduced or deprecated in the API which doesn't necessarily comes with the automated documentation. One idea is that you follow the format here API:Tokens#Parameter history and add a similar section on your page. Though, in the end I would like that section to live on subpage of api module like this: API:Categorymembers/Parameter history and linked from "See also" section.
Pineappled sun (talkcontribs)

@SSethi (WMF), I have addressed the first three points. I'll look into the fourth one in a while.

Also, I have removed the demo app section as of now but I suggested a possible application in my last comment. How do you like it?

And I would like to start working on a new API if possible, and if time permits me. I can't promise anything but I wanna try. And also start drafting the proposal when it's time. Please keep me notified of the same. :)

SSethi (WMF) (talkcontribs)

@Pineappled sun Sweet!

For the first example, you could move the "Response" and "Sample code" out of the collapsable box. When you have the fourth item in place, then we could discuss migrating your changes from your Sandbox to main space on mediawiki.org. I can share some tips on how to do that ;-)

About the idea of creating a demo app, we already have a tool in Wikimedia that does that: https://tools.wmflabs.org/massviews/. It is actually querying the database directly and not using the API. If you get a chance you can play around with it. Enter a category name, and then it will provide you with a list of pages under that category. Though, we cannot say that it is a demo app for this API, as it is not using the API. But, still might be nice to include a link to this tool in "See also" section.

One idea that I've is this -- right now for the article suggestion demo app ( https://github.com/srish/MediaWiki-Action-API-Code-Samples/tree/master/demos/article%20suggestion) we are pulling articles from a JSON file, and it might be nice to explore how we could do that using API:Categorymembers. Resulting demo app might be pulling information from https://en.wikipedia.org/wiki/Category:Wikipedia_requested_articles and would probably use a combination of few APIs: API:Parse, API:Search, and API:Categorymembers.

But, that is too big for a microtask (:O), perhaps you can work on improving 1-2 pages if you've time and interest. Let me add a few pages to the task description, in case you want to take a look at them. In 5-6 days from now you can start writing your proposal, and have it ready in a week for me to take a look at it..

Pineappled sun (talkcontribs)

@SSethi (WMF), I am slightly confused about the versions during which parameters were included/deprecated. Does the '+' suffixed to a version mean that that parameter was added in that version?

If yes, the format I have decided to add the section is as follows:

<version no.>: Deprecated <list of parameters>

<version no.>: Introduced <list of parameters>

and so on with version numbers arranged in ascending order. Does that seem alright?

Pineappled sun (talkcontribs)

Also, I am unable to see any more pages available to work on, in the current state of the task description. Are you going to add more?

Pineappled sun (talkcontribs)

Oh I just saw the automated documentation does have a mention of parameters that have been deprecated, albeit without the version numbers. So, should we still add deprecated parameters to versions in parameter history?

SSethi (WMF) (talkcontribs)

@Pineappled sun Good question! + sign indicates the parameter was introduced in that particular version. And. the format you've stated looks right and you can display the version numbers in descending order. And, we need to add deprecated parameters to versions in parameter history.

For the next task, do you want to pick maybe: API:Assert. One of the potential interns picked it up but choose to not finish it (User:Itskoda/Sandbox/API:Assert). You can replace their name with yours in the table. Does that sound good?

Also, about the idea of demo app that I shared in my previous comment above, you might want to think a little bit on if you were to implement it what would be the approach like so that you could include it in your proposal?

Pineappled sun (talkcontribs)

@SSethi (WMF), I have not been keeping well for some days now, hence the delay in responses. Have I contributed enough to be able to apply?

SSethi (WMF) (talkcontribs)

Yes please do apply! Get your changes merged, and start writing your proposal :-) You can also continue to contribute between now and the application deadline on more tasks..

This post was hidden by Pineappled sun (history)
Pineappled sun (talkcontribs)

Hi @SSethi (WMF), I graduated from college in July and so I had been actively interviewing with companies for jobs and I received a job offer from a company yesterday owing to which I wouldn't be able to apply for Outreachy anymore. Are there ways to get involved with and contribute to Wikimedia part-time? Because I'd really love to do that.

SSethi (WMF) (talkcontribs)

Congrats on getting the job! :) And, thanks for letting me know that! Unfortunately, we don't have any part-time openings right now for fresh graduates.

It would be nice if you get your changes merged, but if you don't have time and interest, then that's fine too.

Pineappled sun (talkcontribs)

I have gotten the Github changes merged. How do I migrate my changes from my Sandbox to main space on mediawiki.org?

SSethi (WMF) (talkcontribs)

@Pineappled sun I've finished reviewing your Sandbox.. It would be great if you could copy the content of API:Category members in your Sandbox and paste it on API:Categorymembers in the main namespace. While publishing the changes, remember to leave this in the summary box: "Rewrite; using the API documentation template (https://www.mediawiki.org/wiki/API:Documentation_template) to format this page".

Reply to "Feedback 1.0"
There are no older topics