Sujet sur Discussion utilisateur:Tpt

Candalua (discussioncontributions)

Hi Tpt,

could you please add to ProofreadPage Statistics some domains which are missing? Here's the list: bs, cy, eu, fo, hi, is, li, mk, nap, pms, sah, sk, yi.


Thank you!

Tpt (discussioncontributions)

Hi Candalua! I have added some of these domains to the statistics. The others are not in pywikibot yet, making phetools fail for them.

Candalua (discussioncontributions)
Tpt (discussioncontributions)

Thank you for the suggestion! I have updated pywikibot. Everything seems to be correctly setup for nap and hi but they do not appear yet in the tables. I have purged the python cache. Hopefully they are going to be displayed in the tables.

Candalua (discussioncontributions)

Seems like we are out of luck :( Would you mind giving me temporary access to the tool? I would love to take a look at the code, and four eyes see better than two... :)

Tpt (discussioncontributions)

I just granted you access. Thank you! We are going to run soon into an other problem. Most of phe tools are written in Python2 and I am not sure how much time ToolsForge is going to allow to run python2.

Candalua (discussioncontributions)

I think I found out the reason. The script is trying to connect to the db server called "napwikisource.labsdb" but fails to do so. Now, on https://wikitech.wikimedia.org/wiki/Help:Toolforge/Database#Naming_conventions they say:


"You may find outdated documentation that uses *.labsdb aliases (for example enwiki.labsdb) to refer to the Wiki Replica databases. These service names are deprecated and have not had new wikis added since January 2018. Please update the docs or code that you find these references in to use the ${PROJECT}.{analytics,web}.db.svc.eqiad.wmflabs naming convention."


So it looks like the naming convention for db servers changed some time before 2018, and the old names like "enwikisource.labsdb" still work, but for new wikisources the same alias was never created. So it seems we should update the naming convention in file phe/common/db.py, function create_conn(), from:

db_server = domain + family + '.labsdb'

to:

db_server = domain + family + '.analytics.db.svc.eqiad.wmflabs'

(analytics seems to be the preferred one for background jobs)

Tpt (discussioncontributions)

Thank you for having a look at it. I just applied the fix you suggested and restarted the statistics computation task.

Candalua (discussioncontributions)

Yay, it works now! Since I'm at it, there is a small improvement that I've been dreaming about since years: make the table sortable! I already looked into it, and it's a very unobtrusive change: I just need to import sorttable.js and apply a few customizations to make it work. The appearance of the table will remain as it is, just with an arrow on each column. Do I have your blessing to proceed?

Tpt (discussioncontributions)

Yes, you have! If you want to maintain this tool moving forward, you are more than welcome. If you think it's more suitable, you could also fork phetools to isolate the statistics parts from his bots and other services, and then redirect the stats parts of the tool to your new tool. I don't think he will mine.

Répondre à « Statistics »