aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2023-02-04 22:28:53 +1100
committerTerry Truong <terry06890@gmail.com>2023-02-04 22:28:53 +1100
commit7bd6631e33b38fca6229ec950d3d902f9e15d003 (patch)
treef873319b44df1ce8e088efcb6a27679baffe0a00
parent629b9208503369c3f20ceb59685ef49766344093 (diff)
Use requirements.txt for backend dependenciesHEADmain
-rw-r--r--README.md6
-rw-r--r--backend/requirements.txt15
-rw-r--r--backend/tol_data/README.md7
-rw-r--r--src/components/HelpModal.vue2
4 files changed, 18 insertions, 12 deletions
diff --git a/README.md b/README.md
index e63ce01..0caaa92 100644
--- a/README.md
+++ b/README.md
@@ -51,10 +51,8 @@ in `backend/tol_data/README.md`.
1. If you don't have Python 3 installed, see <https://www.python.org/downloads>.
The package manager Pip is included.
1. The database used by the server is generated using scripts in `backend/tol_data/`.
- See it's README for instructions. You'll likely need to install a few
- packages using Pip.
-1. To run the data server via `backend/server.py`, you'll need to install jsonpickle.
- This can be done using `python -m pip install jsonpickle`.
+ See it's README for instructions. Package dependencies are listed in `backend/requirements.txt`.
+ They can be installed using `pip install -r requirements.txt`.
If you want to keep the installed package separate from your system's packages,
it's common practice to use [venv](https://docs.python.org/3/tutorial/venv.html).
diff --git a/backend/requirements.txt b/backend/requirements.txt
new file mode 100644
index 0000000..b269027
--- /dev/null
+++ b/backend/requirements.txt
@@ -0,0 +1,15 @@
+# For encoding data to send from server
+jsonpickle==3.0.1
+
+# For parsing Wikipedia dumps
+mwxml==0.3.3
+mwparserfromhell==0.6.4
+
+# For parallelised bzip2 processing
+indexed-bzip2==1.4.0
+
+# For downloading data
+requests==2.28.2
+
+# For image processing
+Pillow==9.4.0
diff --git a/backend/tol_data/README.md b/backend/tol_data/README.md
index f1bbf6b..3830b19 100644
--- a/backend/tol_data/README.md
+++ b/backend/tol_data/README.md
@@ -56,13 +56,6 @@ As a warning, the whole process takes a lot of time and file space. The
tree will probably have about 2.6 million nodes. Downloading the images
takes several days, and occupies over 200 GB.
-## Environment
-Some of the scripts use third-party packages:
-- `indexed_bzip2`: For parallelised bzip2 processing.
-- `requests`: For downloading data.
-- `Pillow`: For image processing.
-- `mwxml`, `mwparserfromhell`: For parsing Wikipedia dumps.
-
## Generate Tree Structure Data
1. Obtain 'tree data files' in otol/, as specified in it's README.
2. Run `gen_otol_data.py`, which creates data.db, and adds the `nodes` and `edges` tables,
diff --git a/src/components/HelpModal.vue b/src/components/HelpModal.vue
index b6fb4a9..ac2773c 100644
--- a/src/components/HelpModal.vue
+++ b/src/components/HelpModal.vue
@@ -309,7 +309,7 @@
</li>
<li>
Thanks to
- <a href="https://twitter.com/JosephusPaye" :style="aStyles">Josephus Paye II</a>
+ <a href="https://github.com/JosephusPaye/" :style="aStyles">Josephus Paye II</a>
for helpful suggestions and clarifications
</li>
</ul>