From 8b41861fc6512bc67b50357b44830f06940a77b5 Mon Sep 17 00:00:00 2001 From: Panos Vagenas <35837085+vagenas@users.noreply.github.com> Date: Mon, 27 Jan 2025 13:08:38 +0100 Subject: [PATCH 1/3] feat: add platform info to CLI version printout Signed-off-by: Panos Vagenas <35837085+vagenas@users.noreply.github.com> --- docling/cli/main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docling/cli/main.py b/docling/cli/main.py index e1ce289e..b60cff17 100644 --- a/docling/cli/main.py +++ b/docling/cli/main.py @@ -1,18 +1,17 @@ import importlib -import json import logging import re import tempfile import time import warnings -from enum import Enum from pathlib import Path from typing import Annotated, Dict, Iterable, List, Optional, Type +import platform import typer from docling_core.types.doc import ImageRefMode from docling_core.utils.file import resolve_source_to_path -from pydantic import TypeAdapter, ValidationError +from pydantic import TypeAdapter from docling.backend.docling_parse_backend import DoclingParseDocumentBackend from docling.backend.docling_parse_v2_backend import DoclingParseV2DocumentBackend @@ -65,10 +64,12 @@ def version_callback(value: bool): docling_core_version = importlib.metadata.version("docling-core") docling_ibm_models_version = importlib.metadata.version("docling-ibm-models") docling_parse_version = importlib.metadata.version("docling-parse") + platform_str = platform.platform() print(f"Docling version: {docling_version}") print(f"Docling Core version: {docling_core_version}") print(f"Docling IBM Models version: {docling_ibm_models_version}") print(f"Docling Parse version: {docling_parse_version}") + print(f"Platform: {platform_str}") raise typer.Exit() From 327e9238c445c360819011b5aad0bb453fc9e57a Mon Sep 17 00:00:00 2001 From: Panos Vagenas <35837085+vagenas@users.noreply.github.com> Date: Mon, 27 Jan 2025 13:13:12 +0100 Subject: [PATCH 2/3] Update main.py Signed-off-by: Panos Vagenas <35837085+vagenas@users.noreply.github.com> --- docling/cli/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docling/cli/main.py b/docling/cli/main.py index b60cff17..debdbaba 100644 --- a/docling/cli/main.py +++ b/docling/cli/main.py @@ -1,12 +1,12 @@ import importlib import logging +import platform import re import tempfile import time import warnings from pathlib import Path from typing import Annotated, Dict, Iterable, List, Optional, Type -import platform import typer from docling_core.types.doc import ImageRefMode From a5c360145c3f7bbda56026b21b42362c1fcbbbd4 Mon Sep 17 00:00:00 2001 From: Panos Vagenas <35837085+vagenas@users.noreply.github.com> Date: Mon, 27 Jan 2025 14:30:53 +0100 Subject: [PATCH 3/3] add Python implementation & language versions Signed-off-by: Panos Vagenas <35837085+vagenas@users.noreply.github.com> --- docling/cli/main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docling/cli/main.py b/docling/cli/main.py index debdbaba..02b22e7f 100644 --- a/docling/cli/main.py +++ b/docling/cli/main.py @@ -2,6 +2,7 @@ import logging import platform import re +import sys import tempfile import time import warnings @@ -65,10 +66,13 @@ def version_callback(value: bool): docling_ibm_models_version = importlib.metadata.version("docling-ibm-models") docling_parse_version = importlib.metadata.version("docling-parse") platform_str = platform.platform() + py_impl_version = sys.implementation.cache_tag + py_lang_version = platform.python_version() print(f"Docling version: {docling_version}") print(f"Docling Core version: {docling_core_version}") print(f"Docling IBM Models version: {docling_ibm_models_version}") print(f"Docling Parse version: {docling_parse_version}") + print(f"Python: {py_impl_version} ({py_lang_version})") print(f"Platform: {platform_str}") raise typer.Exit()