mzmcbride / database-reports Goto Github PK
View Code? Open in Web Editor NEWMediaWiki database reports
Home Page: https://en.wikipedia.org/wiki/Wikipedia:Database_reports
License: Other
MediaWiki database reports
Home Page: https://en.wikipedia.org/wiki/Wikipedia:Database_reports
License: Other
Hi, I'm trying to run scripts on the labs instance but it's looking into the wrong directory.
It should be looking into /dbreps/src/database-reports/reports/general
Labs has the same table, but named toolserverdb_p.namespace
.
Except when I tried using it in reports/general/blankpages.py, I got:
$ ~/bin/dbreps -r general.blankpages -s commonswiki
Traceback (most recent call last):
File "/data/project/dbreps/bin/dbreps", line 80, in <module>
for row in r.get_table_rows(conn):
File "/data/project/dbreps/.local/lib/python2.7/site-packages/reports/general/blankpages.py", line 51, in get_table_rows
''', (self.site, ))
File "cursor.pyx", line 120, in oursql.Cursor.execute (oursqlx/oursql.c:16822)
File "cursor.pyx", line 111, in oursql.Cursor.execute (oursqlx/oursql.c:16693)
File "statement.pyx", line 157, in oursql._Statement.prepare (oursqlx/oursql.c:8458)
File "statement.pyx", line 127, in oursql._Statement._raise_error (oursqlx/oursql.c:8082)
oursql.PermissionsError: (1142, "SELECT command denied to user 'p50380g50440'@'10.68.16.7' for table 'namespace'", None)
Any ideas @scfc ?
Right now on labs we're only running new-style reports, basically anything in the reports/ folder. The old legacy reports should be converted to use the new format.
Last edits on 30 June, https://commons.wikimedia.org/wiki/Special:Contributions/BernsteinBot
Crons need to be set up on toolslabs?
Over the past few months there has been work done to the unused template report requirements.
Categories which should be excluded should be:
WHERE cl_to IN (
'Wikipedia_substituted_templates',
'Wikipedia_transclusionless_templates',
'Deprecated_templates_kept_for_historical_reasons',
'Inactive project pages',
'Parameter_shared_content_templates',
'Administrative service award templates',
'Computer language user templates',
'Language user templates',
'Level-zero userbox templates',
'Wikipedia administrator statistics',
'Subtemplates of Template RussiaAdmMunRef',
'Subtemplates of Template RussiaBasicLawRef',
'New Pages Feed templates'
)
The line "not page_title.endswith('/doc')" should be removed so unused /doc pages will appear. If a /doc page is unused that is usually a sign that something went wrong (sub page of a deleted page, sub page hasn't moved with main page, not needed, etc.).
SELECT page_id,
page_namespace,
page_title
FROM page
JOIN pagelinks ON page_namespace = pl_namespace
AND page_id = pl_from
WHERE page_namespace = 10
AND page_is_redirect = 1
GROUP BY page_namespace,
page_id
HAVING COUNT(*) > 1 LIMIT 3;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.