From 057dfc7d800e2cd65f0ff5030d356b95b0ea2a58 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 7 Sep 2022 07:51:05 +0200 Subject: [PATCH] upgrade to ubuntu 22.04 --- .github/workflows/test.yml | 2 +- Dockerfile | 4 ++-- files/routes/comments.py | 5 +---- requirements.txt | 1 - ubuntu_setup.sh | 2 +- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b4eacda94..80f67dc37 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,7 @@ on: [push, pull_request] jobs: analyze: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout repository diff --git a/Dockerfile b/Dockerfile index 6f003c391..04531253d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive -RUN apt update && apt -y upgrade && apt install -y supervisor python3-pip libenchant1c2a ffmpeg postgresql libpq-dev +RUN apt update && apt -y upgrade && apt install -y supervisor python3-pip ffmpeg postgresql libpq-dev COPY supervisord.conf /etc/supervisord.conf diff --git a/files/routes/comments.py b/files/routes/comments.py index c8f0d2afe..21966504e 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -20,12 +20,9 @@ import requests from shutil import copyfile from json import loads from collections import Counter -from enchant import Dict import gevent import os -d = Dict("en_US") - WORDLE_COLOR_MAPPINGS = {-1: "🟥", 0: "🟨", 1: "🟩"} @app.get("/comment/") @@ -1017,7 +1014,7 @@ def handle_wordle_action(cid, v): try: guess = request.values.get("thing").strip().lower() except: abort(400) - if len(guess) != 5 or not d.check(guess) and guess not in WORDLE_LIST: + if len(guess) != 5: return {"error": "Not a valid guess!"}, 400 if status == "active": diff --git a/requirements.txt b/requirements.txt index 984d9b21e..141069f0f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,7 +26,6 @@ tldextract user-agents psycopg2-binary pusher_push_notifications -pyenchant pytest youtube-dl yattag diff --git a/ubuntu_setup.sh b/ubuntu_setup.sh index fc4e0f54c..e17851f4f 100644 --- a/ubuntu_setup.sh +++ b/ubuntu_setup.sh @@ -4,7 +4,7 @@ # reboot apt -y update apt -y upgrade -apt -y install git redis-server python3-pip libenchant1c2a ffmpeg tmux nginx snapd ufw gpg-agent htop +apt -y install git redis-server python3-pip ffmpeg tmux nginx snapd ufw gpg-agent htop git config --global credential.helper store cd /rDrama