Page MenuHomePhabricator
Feed Search

Oct 16 2022

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

Hi @Slst2020 and everyone,

In task 3, we have to use TOOLS_API_ENDPOINT = "https://toolhub.wikimedia.org/api/search/tools" can you please clarify which parameter we can use to retrieve the data of a single tool. I have tried using "name_term" parameter but it is returning empty results array and also used "q" parameter but it is returning many tools that almost matching with the tool name pattern.
For eg:
using API_ENDPOINT/?q=toolforge-graphql it is returning 1573 tools.

Please clarify if there is a way to retrieve a single tool or if can i move ahead with "q" parameter.

Oct 16 2022, 1:25 PM · User-Slst2020, Outreachy (Round 25), Outreach-Programs-Projects
Durotimi-Hector added a comment to T318512: Outreachy Application Task (Round 25): Explore Toolhub Data.

Hello, still finding an issue with forking, anyone to assist me. converting format to raw gives me sort of json, do I even need to fork at all or I can start from my clean notebook?

Oct 16 2022, 12:45 AM · User-Slst2020, Outreachy (Round 25), Outreach-Programs-Projects

Oct 14 2022

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

Hi @Slst2020 and everyone,

Just for further clarification, can I consider data in core info but not in annotations as missing information? For example, subtitle = Null

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

Oct 13 2022

Durotimi-Hector 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

Oct 13 2022, 7:05 PM · User-Slst2020, Outreachy (Round 25), Outreach-Programs-Projects
Durotimi-Hector added a comment to T318512: Outreachy Application Task (Round 25): Explore Toolhub Data.

@Caseyy0000 can you please shed more light on 'pagination' i just ran into the same set of problems. thank you

Experimenting with the /tools endpoint using the API docs https://toolhub.wikimedia.org/api-docs#get-/api/tools/ could help you understand this.

The page you request from the endpoint must be passed as a query parameter. If not specified, it defaults to page=1. The URL for page 2 would then be "https://toolhub.wikimedia.org/api/tools/?page=2"

Thanks you @Slst2020 .

However, i noticed i'm not able to pull more than 1000 tools from the database, even when i set the query to go over and a code probing the db for tool count returns more than 2000 tools

url = f"https://toolhub.wikimedia.org/api/tools/?ordering=name&page={query_page}&page_size=1050"

where the query_page is 1.

my attempt to work around was to loop through page param, still wont exceed the 1000 result.

while query_page != 5:
    url = f"https://toolhub.wikimedia.org/api/tools/?ordering=name&page={query_page}&page_size=1050"
        ...

The missing facet shows that there are over 1500 tools with missing fields.

any help pleasw

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

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

@Caseyy0000 can you please shed more light on 'pagination' i just ran into the same set of problems. thank you

Experimenting with the /tools endpoint using the API docs https://toolhub.wikimedia.org/api-docs#get-/api/tools/ could help you understand this.

The page you request from the endpoint must be passed as a query parameter. If not specified, it defaults to page=1. The URL for page 2 would then be "https://toolhub.wikimedia.org/api/tools/?page=2"

Oct 13 2022, 3:13 AM · User-Slst2020, Outreachy (Round 25), Outreach-Programs-Projects

Oct 12 2022

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

@Caseyy0000 can you please shed more light on 'pagination' i just ran into the same set of problems. thank you

Oct 12 2022, 6:45 AM · User-Slst2020, Outreachy (Round 25), Outreach-Programs-Projects

Oct 11 2022

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

@Hannah_Njoroge @IEmmanuel104 the code excerpt above considers values having empty lists to false and hence missing.

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

hello! can someone help me out with my logic.
when parsing through the annotations dict, i use:

for key, values in x.items():
   if values:
       pass
   else:
       list.append(key)
Oct 11 2022, 8:32 PM · User-Slst2020, Outreachy (Round 25), Outreach-Programs-Projects
Durotimi-Hector added a comment to T318512: Outreachy Application Task (Round 25): Explore Toolhub Data.

You're welcome @IEmmanuel104

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

@IEmmanuel104 https://meta.wikimedia.org/wiki/Toolhub/Data_model describes the data model for toolhub.
https://toolhub.wikimedia.org/api-docs#get-/api/tools/-name-/ is the only API from the api docs that gives info/details about a given tool. Other API with respect to tools allows to perform CRUD opperations on a given tool or compare differences or alter funtionalities.

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

Oct 10 2022

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

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

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

@IEmmanuel104 I strongly believe we're to return missing data from the annotation dictionary itself.
you might then probaly dump in json format firt before extracting the missing data or directly if you can.

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

Oct 9 2022

Durotimi-Hector added a comment to T317083: [Outreachy Main Microtask] Develop a web app for editing Toolhub records.

Hello! I am an Outreachy applicant. My name is Orishawo Hector Oluwadurotimi. I would like to work together with you all on this project.

Oct 9 2022, 7:59 PM · User-Slst2020, Outreachy (Round 25), Outreach-Programs-Projects