data-science-document-ai 1.42.0__py3-none-any.whl → 1.42.1__py3-none-any.whl
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.
- {data_science_document_ai-1.42.0.dist-info → data_science_document_ai-1.42.1.dist-info}/METADATA +1 -1
- {data_science_document_ai-1.42.0.dist-info → data_science_document_ai-1.42.1.dist-info}/RECORD +4 -4
- src/io.py +24 -4
- {data_science_document_ai-1.42.0.dist-info → data_science_document_ai-1.42.1.dist-info}/WHEEL +0 -0
{data_science_document_ai-1.42.0.dist-info → data_science_document_ai-1.42.1.dist-info}/RECORD
RENAMED
|
@@ -3,7 +3,7 @@ src/constants_sandbox.py,sha256=Iu6HdjCoNSmOX0AwoL9qUQkhq_ZnIN5U9e-Q2UfNuGc,547
|
|
|
3
3
|
src/docai.py,sha256=dHuR0ehVjUi1CnoNvdp_yxJtpU_HFXqAZ61ywdz7BEo,5655
|
|
4
4
|
src/docai_processor_config.yaml,sha256=qOMmCIORpLQ_D-ytvejXxFvER0e0uGYuzPVdZBGv4Pc,2105
|
|
5
5
|
src/excel_processing.py,sha256=jBL6h5T3fJ4uM_rFiV8c0yWAy8Tt3V3RFtBBqb8ztfo,2744
|
|
6
|
-
src/io.py,sha256=
|
|
6
|
+
src/io.py,sha256=tOJpMyI-mP1AaXKG4UFudH47MHWzjWBgVahFJUcjGfs,4749
|
|
7
7
|
src/llm.py,sha256=OE4IEIqcM-hYK9U7e0x1rAfcqdpeo4iXPHBp64L5Qz0,8199
|
|
8
8
|
src/log_setup.py,sha256=RhHnpXqcl-ii4EJzRt47CF2R-Q3YPF68tepg_Kg7tkw,2895
|
|
9
9
|
src/pdf_processing.py,sha256=dxsYvNnONAjzS-T7K5aSo89rz7QcdW3ZDfeuFyeCeII,16294
|
|
@@ -52,6 +52,6 @@ src/prompts/prompt_library.py,sha256=jPxybNPPGH7mzonqtAOqmw5WcT-RtbGP0pvMqqP22hg
|
|
|
52
52
|
src/setup.py,sha256=M-p5c8M9ejKcSZ9N86VtmtPc4TYLxe1_4_dxf6jpfVc,7262
|
|
53
53
|
src/tms.py,sha256=UXbIo1QE--hIX6NZi5Qyp2R_CP338syrY9pCTPrfgnE,1741
|
|
54
54
|
src/utils.py,sha256=nU69zR3TB7IZmCc19DD8H27Riek8GJAldmhJjCSwNEE,16090
|
|
55
|
-
data_science_document_ai-1.42.
|
|
56
|
-
data_science_document_ai-1.42.
|
|
57
|
-
data_science_document_ai-1.42.
|
|
55
|
+
data_science_document_ai-1.42.1.dist-info/METADATA,sha256=nsGhuml2YNlNF7s7aRUJPpY8psKss8wiLcIavpVInjs,2153
|
|
56
|
+
data_science_document_ai-1.42.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
57
|
+
data_science_document_ai-1.42.1.dist-info/RECORD,,
|
src/io.py
CHANGED
|
@@ -11,8 +11,6 @@ from pathlib import Path
|
|
|
11
11
|
|
|
12
12
|
from google.cloud import bigquery, storage
|
|
13
13
|
|
|
14
|
-
from src.constants import project_parameters
|
|
15
|
-
|
|
16
14
|
|
|
17
15
|
def get_gcp_labels(**extra_labels):
|
|
18
16
|
"""Generate standardized GCP labels for cost tracking.
|
|
@@ -23,12 +21,34 @@ def get_gcp_labels(**extra_labels):
|
|
|
23
21
|
Returns:
|
|
24
22
|
dict: Labels dictionary with keys normalized (lowercase, hyphens, max 63 chars)
|
|
25
23
|
"""
|
|
24
|
+
project_name = os.getenv("PROJECT_NAME")
|
|
25
|
+
|
|
26
|
+
# If not set, detect once and cache it
|
|
27
|
+
if not project_name:
|
|
28
|
+
# Try pyproject.toml first
|
|
29
|
+
try:
|
|
30
|
+
import toml
|
|
31
|
+
|
|
32
|
+
pyproject_path = Path(__file__).parent.parent / "pyproject.toml"
|
|
33
|
+
if pyproject_path.exists():
|
|
34
|
+
config = toml.load(pyproject_path)
|
|
35
|
+
project_name = config.get("tool", {}).get("poetry", {}).get("name")
|
|
36
|
+
except Exception:
|
|
37
|
+
pass
|
|
38
|
+
|
|
39
|
+
# Fallback to unknown
|
|
40
|
+
if not project_name:
|
|
41
|
+
project_name = "unknown"
|
|
42
|
+
|
|
43
|
+
# Cache it
|
|
44
|
+
os.environ["PROJECT_NAME"] = project_name
|
|
45
|
+
|
|
26
46
|
labels = {
|
|
27
|
-
"ds-project-name":
|
|
47
|
+
"ds-project-name": project_name.lower(),
|
|
28
48
|
"ds-env": os.getenv("CLUSTER", "local").lower(),
|
|
29
49
|
}
|
|
30
50
|
|
|
31
|
-
# Add any extra labels
|
|
51
|
+
# Add any extra labels
|
|
32
52
|
labels.update({k.lower(): str(v).lower() for k, v in extra_labels.items()})
|
|
33
53
|
|
|
34
54
|
return labels
|
{data_science_document_ai-1.42.0.dist-info → data_science_document_ai-1.42.1.dist-info}/WHEEL
RENAMED
|
File without changes
|