[Wikidata-bugs] [Maniphest] [Commented On] T222021: pywikibot's interwikidata.py can't handle projects where the API-reported wikiID differs from the project's globalID

2019-04-27 Thread Dvorapa
Dvorapa added a comment.


  Okay, now I see it more clearly and I'm more confident in recommending what I 
said above:
  
  In T222021#5142109 , 
@Dvorapa wrote:
  
  > a) add a Uncy family file into the Pywikibot library, where you can rewrite 
the site.py's dbName by yours dbName (GlobalID) easily or b) improve 
generate_family_files.py allowing to add some dbName corrections
  
  
  Because I don't think we need a separate GlobalID and wikiID as Pywikibot 
uses it just as a unique identifier and GlobalID
  
  BTW are wikiID/GlobalID the official names? Or why do we call it dbName? What 
would be best name for unique identifier/GlobalID in Pywikibot?

TASK DETAIL
  https://phabricator.wikimedia.org/T222021

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Dvorapa
Cc: Dvorapa, Aklapper, revi, pywikibot-bugs-list, Carlb, alaa_wmde, DannyS712, 
Nandana, Wenyi, Lahi, Gq86, GoranSMilovanovic, QZanden, Tbscho, MayS, 
LawExplorer, Mdupont, JJMC89, _jensen, rosalieper, Avicennasis, Thibaut120094, 
mys_721tx, Wikidata-bugs, aude, jayvdb, Ricordisamoa, Dalba, Masti, Alchimista, 
Mbch331, Rxy
___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T222021: pywikibot's interwikidata.py can't handle projects where the API-reported wikiID differs from the project's globalID

2019-04-27 Thread Dvorapa
Dvorapa added a comment.


  And I also recommend to link dbName docstring to MediaWiki GlobalID too.

TASK DETAIL
  https://phabricator.wikimedia.org/T222021

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Dvorapa
Cc: Dvorapa, Aklapper, revi, pywikibot-bugs-list, Carlb, alaa_wmde, DannyS712, 
Nandana, Wenyi, Lahi, Gq86, GoranSMilovanovic, QZanden, Tbscho, MayS, 
LawExplorer, Mdupont, JJMC89, _jensen, rosalieper, Avicennasis, Thibaut120094, 
mys_721tx, Wikidata-bugs, aude, jayvdb, Ricordisamoa, Dalba, Masti, Alchimista, 
Mbch331, Rxy
___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T222021: pywikibot's interwikidata.py can't handle projects where the API-reported wikiID differs from the project's globalID

2019-04-27 Thread Carlb
Carlb added a comment.


  WikiID is useful internally, within that one MediaWiki instance, as it's 
unique within one database server. It's not useful to an external process (such 
as interwikidata.py) which has no direct connection to the SQL database.
  
  It looks best, for this application, to get GlobalID and work with that - as 
that's what we ultimately have to submit as data to the repository.

TASK DETAIL
  https://phabricator.wikimedia.org/T222021

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Carlb
Cc: Dvorapa, Aklapper, revi, pywikibot-bugs-list, Carlb, alaa_wmde, DannyS712, 
Nandana, Wenyi, Lahi, Gq86, GoranSMilovanovic, QZanden, Tbscho, MayS, 
LawExplorer, Mdupont, JJMC89, _jensen, rosalieper, Avicennasis, Thibaut120094, 
mys_721tx, Wikidata-bugs, aude, jayvdb, Ricordisamoa, Dalba, Masti, Alchimista, 
Mbch331, Rxy
___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T222021: pywikibot's interwikidata.py can't handle projects where the API-reported wikiID differs from the project's globalID

2019-04-27 Thread Dvorapa
Dvorapa added a comment.


  So it seems Pywikibot has no option to get GlobalID? Then the only option is 
to presume it is same as wikiID and allow users to specify it (rewrite it) in 
the family file. What's wikiID good for anyway?

TASK DETAIL
  https://phabricator.wikimedia.org/T222021

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Dvorapa
Cc: Dvorapa, Aklapper, revi, pywikibot-bugs-list, Carlb, alaa_wmde, DannyS712, 
Nandana, Wenyi, Lahi, Gq86, GoranSMilovanovic, QZanden, Tbscho, MayS, 
LawExplorer, Mdupont, JJMC89, _jensen, rosalieper, Avicennasis, Thibaut120094, 
mys_721tx, Wikidata-bugs, aude, jayvdb, Ricordisamoa, Dalba, Masti, Alchimista, 
Mbch331, Rxy
___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T222021: pywikibot's interwikidata.py can't handle projects where the API-reported wikiID differs from the project's globalID

2019-04-27 Thread Carlb
Carlb added a comment.


  T221550  says that there is no 
GlobalID available from API because there is no support for GlobalID in the 
core code.
  
  According to that task, "Anomie: As far as MediaWiki-API is concerned, this 
is blocked on someone moving this "global ID" concept into core and probably 
having wfWikiID() itself return that ID. If that were done, the API would 
follow naturally. I'd recommend you see if someone from Wikidata would be 
interested in doing that move."
  
  Hence the need to get globalID from a translation table or a config file. 
It's not in the API and it's not in MW core.

TASK DETAIL
  https://phabricator.wikimedia.org/T222021

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Carlb
Cc: Dvorapa, Aklapper, revi, pywikibot-bugs-list, Carlb, alaa_wmde, DannyS712, 
Nandana, Wenyi, Lahi, Gq86, GoranSMilovanovic, QZanden, Tbscho, MayS, 
LawExplorer, Mdupont, JJMC89, _jensen, rosalieper, Avicennasis, Thibaut120094, 
mys_721tx, Wikidata-bugs, aude, jayvdb, Ricordisamoa, Dalba, Masti, Alchimista, 
Mbch331, Rxy
___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T222021: pywikibot's interwikidata.py can't handle projects where the API-reported wikiID differs from the project's globalID

2019-04-27 Thread Dvorapa
Dvorapa added a comment.


  Okay, what is the way to get GlobalID from API?

TASK DETAIL
  https://phabricator.wikimedia.org/T222021

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Dvorapa
Cc: Dvorapa, Aklapper, revi, pywikibot-bugs-list, Carlb, alaa_wmde, DannyS712, 
Nandana, Wenyi, Lahi, Gq86, GoranSMilovanovic, QZanden, Tbscho, MayS, 
LawExplorer, Mdupont, JJMC89, _jensen, rosalieper, Avicennasis, Thibaut120094, 
mys_721tx, Wikidata-bugs, aude, jayvdb, Ricordisamoa, Dalba, Masti, Alchimista, 
Mbch331, Rxy
___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T222021: pywikibot's interwikidata.py can't handle projects where the API-reported wikiID differs from the project's globalID

2019-04-27 Thread Carlb
Carlb added a comment.


  Yes. Pywikibot blindly trusts that whatever wikiID is supplied by the remote 
wiki's API is indeed going to exactly match the GlobalID.
  
  That may well be true at WMF, but a third-party wiki could be naming their 
local server's databases just about anything.

TASK DETAIL
  https://phabricator.wikimedia.org/T222021

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Carlb
Cc: Dvorapa, Aklapper, revi, pywikibot-bugs-list, Carlb, alaa_wmde, DannyS712, 
Nandana, Wenyi, Lahi, Gq86, GoranSMilovanovic, QZanden, Tbscho, MayS, 
LawExplorer, Mdupont, JJMC89, _jensen, rosalieper, Avicennasis, Thibaut120094, 
mys_721tx, Wikidata-bugs, aude, jayvdb, Ricordisamoa, Dalba, Masti, Alchimista, 
Mbch331, Rxy
___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T222021: pywikibot's interwikidata.py can't handle projects where the API-reported wikiID differs from the project's globalID

2019-04-27 Thread Carlb
Carlb added a comment.


  The GlobalID is the name of the wiki, as it appears in Wikidata. For 
instance, "enwiki" is the English-language Wikipedia. A Wikidata entry with the 
individual GlobalID for each wiki looks like https://www.wikidata.org/wiki/Q2736
  
Wikipedia (204 entries):

  abwiki Ашьапылампыл
  acewiki Sipak bhan
  adywiki Лъэпэеу
  afwiki Sokker
  alswiki Fussball
  amwiki እግር ኳስ
  angwiki Gyldfōtþōðer
  anwiki Fútbol
  arwiki كرة القدم
  arzwiki كورة قدم
  astwiki Fútbol
  [...]
  
  These are the prefixes being submitted to the Wikibase repository whenever an 
interlanguage link is added. If you view a Q-item on Wikidata (and turn 
JavaScript off) these tags are visible on all the language links on every 
record.
  
  If the bot is generating interwikidata links, this is the prefix it needs.
  
  The WikiID, on the other hand, is just an item returned to us by the API on 
each individual wiki giving the internal name on that server. For instance, 
https://en.uncyclopedia.co/w/api.php?format=json=siteinfo=query 
reports:
  
server  "//en.uncyclopedia.co"
servername  "en.uncyclopedia.co"
wikiid  "uncy_en"
  
  That WikiID is hardcoded to the database name (or database-prefix name) on 
the server. There's no way to change it, short of renaming the underlying 
server's database or changing API/core code. Unless we have a direct database 
connection (such as the replica databases on wmflabs) it's pretty much 
meaningless to us. We need the GlobalID, because that's what will be fed as 
data to Wikibase.
  
  WMF names its server databases to match the GlobalID, but on a third-party 
site this field might contain anything. Do we care what SQL names the database 
on the remote server? We just want to know what prefixes to submit to create 
the Q-item.

TASK DETAIL
  https://phabricator.wikimedia.org/T222021

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Carlb
Cc: Dvorapa, Aklapper, revi, pywikibot-bugs-list, Carlb, alaa_wmde, DannyS712, 
Nandana, Wenyi, Lahi, Gq86, GoranSMilovanovic, QZanden, Tbscho, MayS, 
LawExplorer, Mdupont, JJMC89, _jensen, rosalieper, Avicennasis, Thibaut120094, 
mys_721tx, Wikidata-bugs, aude, jayvdb, Dalba, Masti, Alchimista, Mbch331, Rxy
___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs


[Wikidata-bugs] [Maniphest] [Commented On] T222021: pywikibot's interwikidata.py can't handle projects where the API-reported wikiID differs from the project's globalID

2019-04-27 Thread Dvorapa
Dvorapa added a comment.


  Okay, I'm not sure if I understand it correctly, I also don't really know, 
what GlobalID and wikiID is and what's the difference between them (could you 
please explain briefly?). From Pywikibot side, we can do two things I think: a) 
add a Uncy family file into the Pywikibot library, where you can rewrite the 
site.py's dbName by yours dbName easily or b) improve generate_family_files.py 
allowing to add some dbName corrections
  
  In T221556  we are still waiting 
for some steps to reproduce to find, where in code the issue is located

TASK DETAIL
  https://phabricator.wikimedia.org/T222021

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Dvorapa
Cc: Dvorapa, Aklapper, revi, pywikibot-bugs-list, Carlb, alaa_wmde, DannyS712, 
Nandana, Wenyi, Lahi, Gq86, GoranSMilovanovic, QZanden, Tbscho, MayS, 
LawExplorer, Mdupont, JJMC89, _jensen, rosalieper, Avicennasis, Thibaut120094, 
mys_721tx, Wikidata-bugs, aude, jayvdb, Dalba, Masti, Alchimista, Mbch331, Rxy
___
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs