compair-core 0.3.2__tar.gz → 0.3.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of compair-core might be problematic. Click here for more details.
- {compair_core-0.3.2/compair_core.egg-info → compair_core-0.3.3}/PKG-INFO +1 -1
- {compair_core-0.3.2 → compair_core-0.3.3}/compair/tasks.py +11 -7
- {compair_core-0.3.2 → compair_core-0.3.3/compair_core.egg-info}/PKG-INFO +1 -1
- {compair_core-0.3.2 → compair_core-0.3.3}/pyproject.toml +1 -1
- {compair_core-0.3.2 → compair_core-0.3.3}/LICENSE +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/README.md +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/compair/__init__.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/compair/celery_app.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/compair/default_groups.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/compair/embeddings.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/compair/feedback.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/compair/logger.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/compair/main.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/compair/models.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/compair/schema.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/compair/utils.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/compair_core.egg-info/SOURCES.txt +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/compair_core.egg-info/dependency_links.txt +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/compair_core.egg-info/requires.txt +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/compair_core.egg-info/top_level.txt +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/compair_email/__init__.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/compair_email/email.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/compair_email/email_core.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/compair_email/templates.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/compair_email/templates_core.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/server/__init__.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/server/app.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/server/deps.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/server/local_model/__init__.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/server/local_model/app.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/server/providers/__init__.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/server/providers/console_mailer.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/server/providers/contracts.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/server/providers/local_storage.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/server/providers/noop_analytics.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/server/providers/noop_billing.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/server/providers/noop_ocr.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/server/routers/__init__.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/server/routers/capabilities.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/server/settings.py +0 -0
- {compair_core-0.3.2 → compair_core-0.3.3}/setup.cfg +0 -0
|
@@ -18,12 +18,15 @@ try:
|
|
|
18
18
|
except (ImportError, ModuleNotFoundError):
|
|
19
19
|
from sqlalchemy.orm import joinedload
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
def _lazy_components():
|
|
22
|
+
from . import Session as SessionMaker
|
|
23
|
+
from .embeddings import Embedder
|
|
24
|
+
from .feedback import Reviewer
|
|
25
|
+
from .logger import log_event
|
|
26
|
+
from .main import process_document
|
|
27
|
+
from .models import Document, User
|
|
28
|
+
|
|
29
|
+
return SessionMaker, Embedder, Reviewer, log_event, process_document, Document, User
|
|
27
30
|
|
|
28
31
|
logger = logging.getLogger(__name__)
|
|
29
32
|
|
|
@@ -33,7 +36,8 @@ except (ImportError, ModuleNotFoundError):
|
|
|
33
36
|
doc_text: str,
|
|
34
37
|
generate_feedback: bool = True,
|
|
35
38
|
) -> Mapping[str, list[str]]:
|
|
36
|
-
|
|
39
|
+
SessionMaker, Embedder, Reviewer, log_event, process_document, Document, User = _lazy_components()
|
|
40
|
+
with SessionMaker() as session:
|
|
37
41
|
user = session.query(User).filter(User.user_id == user_id).first()
|
|
38
42
|
if not user:
|
|
39
43
|
logger.warning("User not found for document processing", extra={"user_id": user_id})
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|