Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"python-envs.defaultEnvManager": "ms-python.python:poetry",
"python-envs.defaultPackageManager": "ms-python.python:poetry",
"python.analysis.extraPaths": [
"./src"
"./src",
"./kogwistar"
],
"files.watcherExclude": {
"**/node_modules": true,
Expand Down
14 changes: 12 additions & 2 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
from pathlib import Path
import sys

_VENDORED_KOGWISTAR = Path(__file__).resolve().parent / "kogwistar"
if str(_VENDORED_KOGWISTAR) not in sys.path:
sys.path.insert(0, str(_VENDORED_KOGWISTAR))

import pytest


@pytest.fixture
def gemini_key():
import dotenv
dotenv.load_dotenv()
import os
return os.environ.get('GOOGLE_API_KEY')

dotenv.load_dotenv()
return os.environ.get("GOOGLE_API_KEY")
225 changes: 225 additions & 0 deletions kg_doc_parser/semantic_document_splitting_layerwise_edits.py

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion kg_doc_parser/workflow_ingest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,15 @@
run_page_index_source_workflow,
)
from .smoke_assets import generate_ocr_smoke_assets
from .page_index import PageIndexBlockSpec, PageIndexParseResult, build_page_index_workflow_input
from .page_index import (
BlockAssignment,
BlockAssignmentBatch,
CandidateBlock,
PageIndexBlockSpec,
PageIndexParseResult,
PageIndexValidationResult,
build_page_index_workflow_input,
)
from .models import (
BoundingBox,
CanonicalGraphWriteResult,
Expand Down Expand Up @@ -128,6 +136,7 @@
"PageIndexParseRequest",
"PageIndexBlockSpec",
"PageIndexParseResult",
"PageIndexValidationResult",
"ParseMode",
"TreeParseRequest",
"SemanticNode",
Expand All @@ -144,6 +153,9 @@
"OcrWorkflowCommandResult",
"PageIndexWorkflowCommandResult",
"LayerwiseWorkflowCommandResult",
"CandidateBlock",
"BlockAssignment",
"BlockAssignmentBatch",
"DEFAULT_WORKFLOW_ID",
"build_chat_model",
"build_chat_model_for_role",
Expand Down
Loading