diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index ad739eae9..9cb1a26f5 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -65,7 +65,7 @@ jobs: if: steps.cached-node_modules.outputs.cache-hit != 'true' run: yarn --frozen-lockfile - - name: Set up Python 3.11 + - name: Set up Python 3.12 uses: actions/setup-python@v5 with: python-version: '3.12' @@ -87,6 +87,9 @@ jobs: python -m pip install --upgrade pip wheel --progress-bar off pip install -r requirements.txt --progress-bar off + - name: Download NLTK dependencies + run: python scripts/nltk-downloads.py + - name: Run Lints run: ruff check . diff --git a/requirements.in b/requirements.in index 7fe14d25f..c2771bec9 100644 --- a/requirements.in +++ b/requirements.in @@ -42,7 +42,7 @@ django-querycount==0.8.3 profanity==1.1 py-avataaars==1.1.2 mozilla-django-oidc==4.0.1 -nltk==3.8.1 +nltk==3.9.1 sql_metadata==2.12.0 gunicorn==23.0.0 diff --git a/requirements.txt b/requirements.txt index 0bf5405e0..6c203bc8e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -836,9 +836,9 @@ multidict==6.0.5 \ # -r requirements.in # aiohttp # yarl -nltk==3.8.1 \ - --hash=sha256:1834da3d0682cba4f2cede2f9aad6b0fafb6461ba451db0efb6f9c39798d64d3 \ - --hash=sha256:fd5c9109f976fa86bcadba8f91e47f5e9293bd034474752e92a520f81c93dda5 +nltk==3.9.1 \ + --hash=sha256:4fa26829c5b00715afe3061398a8989dc643b92ce7dd93fb4585a70930d168a1 \ + --hash=sha256:87d127bd3de4bd89a4f81265e5fa59cb1b199b27440175370f7417d2bc7ae868 # via -r requirements.in optisorl==0.2.1 \ --hash=sha256:4b18d8a270075aa0fe9588790162c03a80e822237e3346a2817d6e82236f1a49 \ diff --git a/scripts/nltk-downloads.py b/scripts/nltk-downloads.py new file mode 100644 index 000000000..a59cec6d3 --- /dev/null +++ b/scripts/nltk-downloads.py @@ -0,0 +1,4 @@ +# Run this script to download the necessary NLTK data files +import nltk + +nltk.download("wordnet")