From 7034e2735787cad0d7a5ab6b0290fc197ca85468 Mon Sep 17 00:00:00 2001 From: Juliettejns Date: Thu, 21 Mar 2024 15:19:58 +0100 Subject: [PATCH 01/43] Revert "Add more details about the lemmatizer at the new corpus phase. (#317)" This reverts commit f41d822052b7231aaeb7605d811ee3485c6ae8d7. --- .github/workflows/test.yml | 2 +- app/__init__.py | 2 +- app/lemmatizers.py | 12 - app/templates/main/corpus_new.html | 40 +- config.py | 22 +- dummy_lemmatizer_service.py | 22 - tests/test_selenium/base.py | 1 + tests/test_selenium/test_bookmark.py | 1 + tests/test_selenium/test_control_lists.py | 2 + tests/test_selenium/test_corpus_init.py | 103 +-- tests/test_selenium/test_export.py | 2 + translations/bo_CN/LC_MESSAGES/messages.po | 879 ++++++--------------- 12 files changed, 256 insertions(+), 832 deletions(-) delete mode 100644 app/lemmatizers.py delete mode 100644 dummy_lemmatizer_service.py diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a5a64446..6845d1a3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,7 +36,7 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt - pip install pytest pytest-cov coveralls flake8 pytest-sugar + pip install pytest pytest-cov coveralls flake8 - name: Set up TEST_DATABASE_URL run: | echo "TEST_DATABASE_URL=postgresql://pyrrha:pyrrha@localhost:5432/data-test" >> $GITHUB_ENV diff --git a/app/__init__.py b/app/__init__.py index bf8a8516..ac3a4548 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -1,6 +1,7 @@ import os from flask import Flask, g +from config import config from flask_compress import Compress from flask_login import LoginManager from flask_mail import Mail @@ -28,7 +29,6 @@ def create_app(config_name="dev"): """ Create the application """ - from config import config app = Flask( __name__, diff --git a/app/lemmatizers.py b/app/lemmatizers.py deleted file mode 100644 index 169ef566..00000000 --- a/app/lemmatizers.py +++ /dev/null @@ -1,12 +0,0 @@ -from typing import Optional -from dataclasses import dataclass - - -@dataclass -class LemmatizerService: - title: str # e.g. "Old French" - uri: str # Current address - provider: str # e.g. Deucalion at Ecole nationale des Chartes - bibtex: str # Citation Scheme - apa: str # APA equivalent - ui: Optional[str] = None diff --git a/app/templates/main/corpus_new.html b/app/templates/main/corpus_new.html index 51ea0143..c70a4543 100644 --- a/app/templates/main/corpus_new.html +++ b/app/templates/main/corpus_new.html @@ -72,28 +72,10 @@

{{ _('Create a new corpus') }}

- {%- for service in lemmatizers %} - - {% endfor %} -
@@ -218,14 +200,7 @@

{{ _('Create a new corpus') }}