diff options
| author | Terry Truong <terry06890@gmail.com> | 2023-02-05 13:55:00 +1100 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2023-02-05 13:55:00 +1100 |
| commit | ff638e269d439c853b5182b68ff10777f12597f1 (patch) | |
| tree | 2cc62068a501884821969b6ebeba3686df8f4044 /backend/hist_data/README.md | |
| parent | cc79c17fbc05bddc8b08f2734e721bc241123a4e (diff) | |
Use relative imports between data generation scriptspackage-imports
Avoids the need for code that modifies sys.path, but requires
running of the scripts using 'python -m' with backend/ as cwd.
Also expects constants like DB_FILE to be non-relative, due to
running from backend/.
Diffstat (limited to 'backend/hist_data/README.md')
| -rw-r--r-- | backend/hist_data/README.md | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/backend/hist_data/README.md b/backend/hist_data/README.md index 73b7a36..4baf0b1 100644 --- a/backend/hist_data/README.md +++ b/backend/hist_data/README.md @@ -47,7 +47,8 @@ This directory holds files used to generate the history database data.db. ## Generate Event Data 1. Obtain a Wikidata JSON dump in wikidata/, as specified in it's README. 1. Run `gen_events_data.py`, which creates `data.db`, and adds the `events` table. - You might want to set WIKIDATA_FILE in the script to the dump file's name. + It needs to be run as a module, by using `python -m hist_data.gen_events_data` in hist_data/. + Also, you might want to check that WIKIDATA_FILE in the script matches the dump file's name. ## Generate Popularity Data 1. Obtain an enwiki dump and 'page view files' in enwiki/, as specified in the README. |
