Page MenuHomePhabricator

Add SPARQL client to core
Closed, ResolvedPublic

Description

For tasks like deep category search (and possibly others, e.g. Wikidata maintenance) we need SPARQL client to communicate with SPARQL endpoints. Since it is going to be used across different extensions, it makes sense to make it core service.

Event Timeline

Smalyshev triaged this task as Medium priority.Jan 17 2018, 6:49 PM
Smalyshev created this task.
Smalyshev moved this task from Backlog to Doing on the User-Smalyshev board.

Once this is done, Wikidata should be updated to use this client.

Change 404064 had a related patch set uploaded (by Smalyshev; owner: Smalyshev):
[mediawiki/core@master] Add SPARQL client to core

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

Change 404064 merged by jenkins-bot:
[mediawiki/core@master] Add SPARQL client to core

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

I believe that adding a pointer to the respective documentation accompanying this new feature will be great for future reference.

Do we have a place for documenting internal APIs? I haven't found where it could be added besides the regular phpdocs.

Well, this client should probably be in a library soon / already anyway?
Said library should contain the docs, It might even be worth marking it for internal use until we put it in a library.

I must have misunderstood the newsletter sent out to the public. I thought that is is about a user facing something. Anyways, documenting stuff is always good and I know from experience that this is painful.

Do we have a place for documenting internal APIs? I haven't found where it could be added besides the regular phpdocs.

Usually Manual:<classname> on mediawiki.org. E.g. https://www.mediawiki.org/wiki/Manual:User.php

Some people also use the docs/ directory in core, but that's less common.

Well, this client should probably be in a library soon / already anyway?

Depending on how soon you can make HTTP client a library, which depends on Status, which in my book spells out "not soon". See more discussion on the matter in https://gerrit.wikimedia.org/r/c/404064/

@Legoktm: thank you, I wasn't aware of that system. I will add docs there for SPARQL and will keep it in mind for other stuff too.