Skip to content

Commit 50f4665

Browse files
committed
Add jobs.yaml to keep Toolforge jobs in version control; README updates
1 parent fb294e5 commit 50f4665

File tree

3 files changed

+107
-2
lines changed

3 files changed

+107
-2
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Database Reports
22
Generates statistical reports which are used by community members to improve Wikipedia.
33

4-
This project allows the [Community Tech bot](https://en.wikipedia.org/wiki/User:Community_Tech_bot) to make periodic updates to these reports on different language Wikipedias. As of now the project support report generation for English ([see here](https://en.wikipedia.org/wiki/Wikipedia:Database_reports)), Vietnamese, Korean and French Wikipedia.
4+
This project allows the [Community Tech bot](https://en.wikipedia.org/wiki/User:Community_Tech_bot) to make periodic updates
5+
to these reports on different language Wikipedias. As of now the project support report generation for the English
6+
([see here](https://en.wikipedia.org/wiki/Wikipedia:Database_reports)), Vietnamese, Korean and Hindi Wikipedias.
57

68
## Specific statistics that the reports support:
79
* Unused templates
@@ -19,7 +21,10 @@ This project allows the [Community Tech bot](https://en.wikipedia.org/wiki/User:
1921
* Active editors with the longest-established accounts
2022

2123
## Installation
22-
Virtualenv is recommended:
24+
Copy `config.py.example` to `config.py` and fill in the credentials for your database user
25+
and bot account. Make sure to properly set permissions on the new file with `chmod 600 config.py`.
26+
27+
Virtualenv is recommended for installing the Python environment:
2328

2429
python3 -m venv venv
2530
source venv/bin/activate

config.py.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
credentials = { 'user':'db_username', 'pass': 'db_password', 'port': 3306 }
2+
cttbot = { 'user': 'Bot username', 'pass': 'password' }

jobs.yaml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Toolforge jobs configuration.
2+
# See https://wikitech.wikimedia.org/wiki/Help:Toolforge/Jobs_framework for documentation.
3+
# After making changes, reload the config on Toolforge with `toolforge-jobs load jobs.yaml`
4+
5+
# enwiki
6+
- name: en-forgotten-articles
7+
command: pyvenv/bin/python reports/database-reports/main.py en forgotten_articles
8+
image: tf-python39
9+
schedule: "09 00 * * 1"
10+
emails: onfailure
11+
- name: en-pagecountbynamespace
12+
command: pyvenv/bin/python reports/database-reports/main.py en pagecountbynamespace
13+
image: tf-python39
14+
schedule: "09 00 * * 2"
15+
emails: onfailure
16+
- name: en-pages-with-most-revisions
17+
command: pyvenv/bin/python reports/database-reports/main.py en pages_with_most_revisions
18+
image: tf-python39
19+
schedule: "09 00 * * 3"
20+
emails: onfailure
21+
- name: en-talk-pages-by-size
22+
command: pyvenv/bin/python reports/database-reports/main.py en talk_pages_by_size
23+
image: tf-python39
24+
schedule: "09 00 * * 5"
25+
emails: onfailure
26+
- name: en-unused-file-redirects
27+
command: pyvenv/bin/python reports/database-reports/main.py en unused_file_redirects
28+
image: tf-python39
29+
schedule: "09 00 * * 6"
30+
emails: onfailure
31+
- name: en-oldest-active
32+
command: pyvenv/bin/python reports/database-reports/main.py en oldest_active
33+
image: tf-python39
34+
schedule: "00 02 * * 2"
35+
emails: onfailure
36+
- name: en-orphaned-talk
37+
command: pyvenv/bin/python reports/database-reports/main.py en orphaned_talk
38+
image: tf-python39
39+
schedule: "00 05 * * *"
40+
emails: onfailure
41+
- name: en-most-edited-page-last-month
42+
command: pyvenv/bin/python reports/database-reports/main.py en most_edited_page_last_month
43+
image: tf-python39
44+
schedule: "12 00 * * 1"
45+
emails: onfailure
46+
- name: en-article-by-size
47+
command: pyvenv/bin/python reports/database-reports/main.py en article_by_size
48+
image: tf-python39
49+
schedule: "12 00 * * 2"
50+
emails: onfailure
51+
- name: en-deleted-prods
52+
command: pyvenv/bin/python reports/database-reports/main.py en deleted_prods
53+
image: tf-python39
54+
schedule: "30 06,18 * * *"
55+
emails: onfailure
56+
# kowiki
57+
- name: ko-articles-by-size
58+
command: pyvenv/bin/python reports/database-reports/main.py ko article_by_size
59+
image: tf-python39
60+
schedule: "00 1 * * 1"
61+
emails: onfailure
62+
- name: ko-most-edited-page-last-month
63+
command: pyvenv/bin/python reports/database-reports/main.py ko most_edited_page_last_month
64+
image: tf-python39
65+
schedule: "00 2 * * 1"
66+
emails: onfailure
67+
- name: ko-orphaned-talk
68+
command: pyvenv/bin/python reports/database-reports/main.py ko orphaned_talk
69+
image: tf-python39
70+
schedule: "00 3 * * 1"
71+
emails: onfailure
72+
# viwiki
73+
- name: vi-article-by-size
74+
command: pyvenv/bin/python reports/database-reports/main.py vi article_by_size
75+
image: tf-python39
76+
schedule: "12 00 * * 2"
77+
emails: onfailure
78+
- name: vi-pagecountbynamespace
79+
command: pyvenv/bin/python reports/database-reports/main.py vi pagecountbynamespace
80+
image: tf-python39
81+
schedule: "09 00 * * 2"
82+
emails: onfailure
83+
- name: vi-oldest-active
84+
command: pyvenv/bin/python reports/database-reports/main.py vi oldest_active
85+
image: tf-python39
86+
schedule: "00 02 * * 2"
87+
emails: onfailure
88+
- name: vi-most-edited-page-last-month
89+
command: pyvenv/bin/python reports/database-reports/main.py vi most_edited_page_last_month
90+
image: tf-python39
91+
schedule: "12 00 * * 1"
92+
emails: onfailure
93+
# mrwiki
94+
- name: mr-forgotten-articles
95+
command: pyvenv/bin/python reports/database-reports/main.py mr forgotten_articles
96+
image: tf-python39
97+
schedule: "15 0 * * 5"
98+
emails: onfailure

0 commit comments

Comments
 (0)