Page MenuHomePhabricator

IEmmanuel104
User

Projects

User does not belong to any projects.

Today

  • No visible events.

Tomorrow

  • No visible events.

Friday

  • No visible events.

User Details

User Since
Oct 9 2022, 4:35 PM (161 w, 2 d)
Availability
Available
LDAP User
Unknown
MediaWiki User
IEmmanuel104 [ Global Accounts ]

Recent Activity

Oct 13 2022

IEmmanuel104 added a comment to T318512: Outreachy Application Task (Round 25): Explore Toolhub Data.

Went through a similar issue but after much experimenting with the API I discovered you do not actually need a page param in the request URL because each API response's result has a "next" key containing the URL of the next page for all the pages except the last page which is null and of course, the number of pages depends on the page size param

Hello I am still struggling with understanding the URL I need to use. Can I get more help? My question is in respect to task 2.
I'm using this https://toolhub.wikimedia.org/api/tools/?page=60&page_size=2699 but it's still giving me just 10 tools

@Daniel_Ngene
The page query parameter in the url determines the page number, while the page_size parameter determines the total number of tools on each page.
For example, let's say the total number of the overall tools is 2699(you can get this from the count key in the response when calling the list all tools endpoint) and you set the page_size to 100. By default, the total number of pages to display all the tools will be 2699/100 = 27 approximately. We are rounding up to get all the pages, so the total number of pages will be 27.  This implies that the possible values for the page query parameter will be 1–27, provided the page_size query parameter is always equal to 100. 

so :
page 1 -> 1 - 100 items
page 2 -> 101 -200 items
page 3 -> 201 - 300 items
page 4 -> 301 -400 items
page 5 -> 401 -500 items
...
page 27 -> 2001 -2699 items

For example, https://toolhub.wikimedia.org/api/tools/?page={1-27}&page_size=100.

NB: the curly barcket in the uri denote the possible values from 1 to 27.

And also you cant set the page_size query parameter to 2699 the max results the endpoint is returning per page is 1000.

Oct 13 2022, 8:03 PM · User-Slst2020, Outreachy (Round 25), Outreach-Programs-Projects

Oct 11 2022

IEmmanuel104 added a comment to T318512: Outreachy Application Task (Round 25): Explore Toolhub Data.

Hello, kindly clarify this statement;

The conclusion is that we will consider a piece of information missing only if it is absent from both the Core and Annotations layers.

  • Does absent mean that an attribute in the model is not in both the Core and Annotations?
  • Or, does absent mean that the key is present in both but the value is empty in both Core and Annotations?

Only Annotations can be edited. Some of the keys present in Annotations, are also present in the Core. Take the pywikibot example from the notebook. Only the annotations dict is presented below, not the full json output.

"annotations": {
  "wikidata_qid": null,
  "deprecated": false,
  "replaced_by": null,
  "experimental": false,
  "for_wikis": [],
  "icon": null,
  "available_ui_languages": [
    "en"
  ],
  "tool_type": null,
  "repository": null,
  "api_url": null,
  "developer_docs_url": [
    {
      "url": "https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Pywikibot",
      "language": "en"
    }
  ],
  "user_docs_url": [],
  "feedback_url": [],
  "privacy_policy_url": [],
  "translate_url": null,
  "bugtracker_url": null
},
  • The first key in the annotations dict is wikidata_qid. As this key is only present in Annotations, not in Core, and its value is null, we consider it missing.
  • The next key-value pair is deprecated: false. The key has a non-null value, and this information is thus considered present. We can move on.
  • Further down the list, we have repository: null. This value is therefore missing from Annotations, and we must ask ourselves if we can find it in the Core. Looking at the top-level key repository, we can see that the value is "https://gerrit.wikimedia.org/g/pywikibot/core". As a value for repository is present in Core, we don't consider it missing.

Does this answer your question?

Oct 11 2022, 10:52 AM · User-Slst2020, Outreachy (Round 25), Outreach-Programs-Projects
IEmmanuel104 added a comment to T318512: Outreachy Application Task (Round 25): Explore Toolhub Data.

@Durotimi-Hector thank you very much.

Oct 11 2022, 1:57 AM · User-Slst2020, Outreachy (Round 25), Outreach-Programs-Projects

Oct 10 2022

IEmmanuel104 added a comment to T318512: Outreachy Application Task (Round 25): Explore Toolhub Data.

@Durotimi-Hector yeah you're right but we are making the request for one toolname at a time and not multiple so we can't actually filter out which data is missing if we have just one endpoint to consider at a time, unless we have a parent class that gives a blueprint of how the annotation dictionary should be structured, then by comparing the class and the endpoint data we can easily determine which data is missing. what do you think?

Oct 10 2022, 11:53 PM · User-Slst2020, Outreachy (Round 25), Outreach-Programs-Projects
IEmmanuel104 added a comment to T318512: Outreachy Application Task (Round 25): Explore Toolhub Data.

@Durotimi-Hector going by this logic i thought the task was to compare and return any data that exist in the core toolinfo that isn't available in the annotations dictionary, i will probably set instances for such conditions while testing so i can have more analytical data for visualization.

Oct 10 2022, 11:19 PM · User-Slst2020, Outreachy (Round 25), Outreach-Programs-Projects
IEmmanuel104 added a comment to T318512: Outreachy Application Task (Round 25): Explore Toolhub Data.

Hello, please i am having issues with the "missing fields" requested in task 1, am i to return a list of fields with null value from the JSON data or missing items in the annotation dictionary?

Oct 10 2022, 3:51 PM · User-Slst2020, Outreachy (Round 25), Outreach-Programs-Projects
IEmmanuel104 added a comment to T318512: Outreachy Application Task (Round 25): Explore Toolhub Data.

Hello, please i am having issues with the "missing fields" requested in task 1, am i to return a list of fields with null value from the JSON data or missing items in the annotation dictionary?

Oct 10 2022, 3:50 PM · User-Slst2020, Outreachy (Round 25), Outreach-Programs-Projects