You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-10Lines changed: 17 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# quickstatements3
2
2
3
-
Repository for the development of a new version of QuickStatements
3
+
Repository for the development of a version 3 of the [QuickStatements](https://www.wikidata.org/wiki/Help:QuickStatements) tool for making bulk edits to [Wikidata](https://www.wikidata.org).
4
4
5
5
## Local development HOW TO
6
6
@@ -16,7 +16,9 @@ To build the development container
16
16
> make build
17
17
```
18
18
19
-
Make sure that you have an env file inside the local etc/ dir. This file contains all the **ENVIRONMENT VARIABLES** used by the system and must never be added to your git repo.
19
+
20
+
Make sure that you have an env file inside the local etc/ dir.
21
+
This file contains all the **ENVIRONMENT VARIABLES** used by the system and must never be added to your git repo.
20
22
21
23
To generate a good secret key you can run with python 3.6+
22
24
@@ -30,6 +32,7 @@ To start all services (database, web server, run a shell inside the container)
30
32
> make run
31
33
```
32
34
35
+
33
36
If everything is correct, **Quickstatements** will be available at http://localhost:8000/
34
37
35
38
If you are running this for the first time, you have to create a superuser for the Django admin. You can access the container with `make shell`. From there:
@@ -42,17 +45,19 @@ will run an interactive command which will ask you for your username, password,
42
45
43
46
## Wikibase server
44
47
45
-
QuickStatements 3.0 uses the Wikibase REST API to interact with a Wikibase server. To define which server it is pointing to, define the `BASE_REST_URL` environment variable, pointing to the `rest.php` endpoint, as in `BASE_REST_URL=https://test.wikidata.org/w/rest.php`.
48
+
QuickStatements 3.0 uses the Wikibase REST API to interact with a Wikibase server.
49
+
To define which server it is pointing to, define the `BASE_REST_URL` environment variable, pointing to the `rest.php` endpoint.
50
+
For example: `BASE_REST_URL=https://test.wikidata.org/w/rest.php`.
46
51
47
-
It uses the Wikibase REST API provided in `/wikibase/v1` and the profile endpoint for the Oauth2 API, provided in `/oauth2` to check autoconfirmation status and authorize users.
52
+
QuickStatements 3.0 uses the Wikibase REST API provided in `/wikibase/v1` and the profile endpoint for the Oauth2 API, provided in `/oauth2` to check autoconfirmation status and authorize users.
48
53
49
54
Currently it's only possible to point at one Wikibase instance.
50
55
51
56
## OAuth
52
57
53
58
This application uses OAuth2 with the Mediawiki provider.
54
59
55
-
The grants we probably need are
60
+
The grants we probably need are:
56
61
57
62
* Perform high volume activity
58
63
* High-volume (bot) access
@@ -69,25 +74,27 @@ After registering a consumer in
69
74
70
75
This application is listening on `/auth/callback/`, so, when registering, define the callback endpoint as `https://yourdomain.com/auth/callback/`.
71
76
72
-
After receveing the consumer id and secret, setup`OAUTH_CLIENT_ID` and `OAUTH_CLIENT_SECRET` environment variables.
77
+
After receveing the consumer id and secret, set up the`OAUTH_CLIENT_ID` and `OAUTH_CLIENT_SECRET` environment variables.
73
78
74
79
### Developer access
75
80
76
-
If you want to login with a developer access token, you need to register for yourself an owner-only consumer application for OAuth2. Follow the form and be sure to tick "This consumer is for use only by <YOURUSERNAME>".
81
+
If you want to login with a developer access token, you need to register for yourself an owner-only consumer application for OAuth2.
82
+
Follow the form and be sure to tick "This consumer is for use only by <YOURUSERNAME>".
77
83
78
84
### Integration tests
79
85
80
86
To run Integration tests on https://test.wikidata.org, you'll need a developer access token (owner-only) to edit on `test.wikidata.org`.
81
87
82
-
After obtaining it, define the environment variable `INTEGRATION_TEST_AUTH_TOKEN` in `etc/env` file as your developer access token. Then, run the tests with `make integration`.
88
+
After obtaining it, define the environment variable `INTEGRATION_TEST_AUTH_TOKEN` in `etc/env` file as your developer access token.
89
+
Then, run the tests with `make integration`.
83
90
84
91
Alternatively, define that environment varibale inside the container shell and run the tests directly with `python3 manage.py test integration`.
85
92
86
93
## Toolforge deployment
87
94
88
-
*Login and enter into the tool user
95
+
*Log in and enter into the tool user
89
96
* Clone the repository at `~/www/python/`
90
-
* Update `uwsgi.ini` with the toolname. In this case, its`qs-dev`
97
+
* Update `uwsgi.ini` with the tool name (in this case, it's`qs-dev`)
91
98
* Create the environment variables file at `~/www/python/src/.env` with `install -m 600 /dev/null ~/www/python/src/.env` so that only your user can read it.
0 commit comments