From 191d7813a78293303678f6b91626289cec29c1fd Mon Sep 17 00:00:00 2001 From: Patrick Jentsch Date: Thu, 7 Nov 2024 08:35:02 +0100 Subject: [PATCH] prefix extension name with "nopaque_" --- .../__init__.py | 0 .../{sqlalchemy_extras => nopaque_sqlalchemy_extras}/types.py | 0 app/models/corpus.py | 2 +- app/models/job.py | 2 +- app/models/spacy_nlp_pipeline_model.py | 4 ++-- app/models/tesseract_ocr_pipeline_model.py | 2 +- 6 files changed, 5 insertions(+), 5 deletions(-) rename app/extensions/{sqlalchemy_extras => nopaque_sqlalchemy_extras}/__init__.py (100%) rename app/extensions/{sqlalchemy_extras => nopaque_sqlalchemy_extras}/types.py (100%) diff --git a/app/extensions/sqlalchemy_extras/__init__.py b/app/extensions/nopaque_sqlalchemy_extras/__init__.py similarity index 100% rename from app/extensions/sqlalchemy_extras/__init__.py rename to app/extensions/nopaque_sqlalchemy_extras/__init__.py diff --git a/app/extensions/sqlalchemy_extras/types.py b/app/extensions/nopaque_sqlalchemy_extras/types.py similarity index 100% rename from app/extensions/sqlalchemy_extras/types.py rename to app/extensions/nopaque_sqlalchemy_extras/types.py diff --git a/app/models/corpus.py b/app/models/corpus.py index 6da4de62..54894c67 100644 --- a/app/models/corpus.py +++ b/app/models/corpus.py @@ -8,7 +8,7 @@ import shutil import xml.etree.ElementTree as ET from app import db from app.converters.vrt import normalize_vrt_file -from app.extensions.sqlalchemy_extras import IntEnumColumn +from app.extensions.nopaque_sqlalchemy_extras import IntEnumColumn from .corpus_follower_association import CorpusFollowerAssociation diff --git a/app/models/job.py b/app/models/job.py index cd2e8f87..e35cdc83 100644 --- a/app/models/job.py +++ b/app/models/job.py @@ -6,7 +6,7 @@ from time import sleep from pathlib import Path import shutil from app import db -from app.extensions.sqlalchemy_extras import ContainerColumn, IntEnumColumn +from app.extensions.nopaque_sqlalchemy_extras import ContainerColumn, IntEnumColumn class JobStatus(IntEnum): diff --git a/app/models/spacy_nlp_pipeline_model.py b/app/models/spacy_nlp_pipeline_model.py index 89fabba1..ee23e06d 100644 --- a/app/models/spacy_nlp_pipeline_model.py +++ b/app/models/spacy_nlp_pipeline_model.py @@ -5,7 +5,7 @@ from pathlib import Path import requests import yaml from app import db -from app.extensions.sqlalchemy_extras import ContainerColumn +from app.extensions.nopaque_sqlalchemy_extras import ContainerColumn from .file_mixin import FileMixin from .user import User @@ -104,7 +104,7 @@ class SpaCyNLPPipelineModel(FileMixin, HashidMixin, db.Model): f.write(chunk) pbar.close() db.session.commit() - + def delete(self): try: self.path.unlink(missing_ok=True) diff --git a/app/models/tesseract_ocr_pipeline_model.py b/app/models/tesseract_ocr_pipeline_model.py index 145173ec..b23e7efb 100644 --- a/app/models/tesseract_ocr_pipeline_model.py +++ b/app/models/tesseract_ocr_pipeline_model.py @@ -5,7 +5,7 @@ from pathlib import Path import requests import yaml from app import db -from app.extensions.sqlalchemy_extras import ContainerColumn +from app.extensions.nopaque_sqlalchemy_extras import ContainerColumn from .file_mixin import FileMixin from .user import User