mdify-cli 3.3.2__tar.gz → 3.3.4__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.
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/PKG-INFO +1 -1
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/mdify/__init__.py +1 -1
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/mdify/cli.py +27 -17
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/mdify/ssh/client.py +2 -2
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/mdify_cli.egg-info/PKG-INFO +1 -1
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/pyproject.toml +1 -1
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/LICENSE +0 -0
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/README.md +0 -0
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/assets/mdify.png +0 -0
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/mdify/__main__.py +0 -0
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/mdify/container.py +0 -0
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/mdify/docling_client.py +0 -0
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/mdify/formatting.py +0 -0
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/mdify/ssh/__init__.py +0 -0
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/mdify/ssh/models.py +0 -0
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/mdify/ssh/remote_container.py +0 -0
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/mdify/ssh/transfer.py +0 -0
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/mdify_cli.egg-info/SOURCES.txt +0 -0
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/mdify_cli.egg-info/dependency_links.txt +0 -0
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/mdify_cli.egg-info/entry_points.txt +0 -0
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/mdify_cli.egg-info/requires.txt +0 -0
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/mdify_cli.egg-info/top_level.txt +0 -0
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/setup.cfg +0 -0
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/tests/test_cli.py +0 -0
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/tests/test_container.py +0 -0
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/tests/test_docling_client.py +0 -0
- {mdify_cli-3.3.2 → mdify_cli-3.3.4}/tests/test_ssh_client.py +0 -0
|
@@ -1060,11 +1060,11 @@ def main_async_remote(args) -> int:
|
|
|
1060
1060
|
color = Colorizer(sys.stderr)
|
|
1061
1061
|
|
|
1062
1062
|
# Resolve timeout value: CLI > env > default 1200
|
|
1063
|
-
timeout = args.timeout
|
|
1063
|
+
timeout = args.timeout if args.timeout is not None else int(os.environ.get("MDIFY_TIMEOUT", 1200))
|
|
1064
1064
|
|
|
1065
1065
|
# For remote operations, extend timeout significantly for large PDF processing
|
|
1066
1066
|
# Remote conversions include network latency, file upload/download, and OCR processing
|
|
1067
|
-
remote_conversion_timeout = max(timeout, 3600) # At least 1 hour for remote conversion
|
|
1067
|
+
remote_conversion_timeout = max(timeout or 1200, 3600) # At least 1 hour for remote conversion
|
|
1068
1068
|
|
|
1069
1069
|
# Build SSH config from CLI arguments and SSH config files
|
|
1070
1070
|
try:
|
|
@@ -1096,19 +1096,29 @@ def main_async_remote(args) -> int:
|
|
|
1096
1096
|
|
|
1097
1097
|
# Start with minimal defaults if no config loaded
|
|
1098
1098
|
if ssh_config is None:
|
|
1099
|
-
ssh_config = SSHConfig(host=args.remote_host, port=22, username=
|
|
1099
|
+
ssh_config = SSHConfig(host=args.remote_host, port=22, username="")
|
|
1100
1100
|
|
|
1101
|
-
# Apply CLI arguments with highest precedence
|
|
1102
|
-
|
|
1103
|
-
host
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1101
|
+
# Apply CLI arguments with highest precedence (only pass non-None values)
|
|
1102
|
+
cli_config_kwargs = {
|
|
1103
|
+
"host": args.remote_host,
|
|
1104
|
+
"source": "cli",
|
|
1105
|
+
}
|
|
1106
|
+
if args.remote_port is not None:
|
|
1107
|
+
cli_config_kwargs["port"] = args.remote_port
|
|
1108
|
+
if args.remote_user:
|
|
1109
|
+
cli_config_kwargs["username"] = args.remote_user
|
|
1110
|
+
if args.remote_key:
|
|
1111
|
+
cli_config_kwargs["key_file"] = args.remote_key
|
|
1112
|
+
if args.remote_key_passphrase:
|
|
1113
|
+
cli_config_kwargs["key_passphrase"] = args.remote_key_passphrase
|
|
1114
|
+
if args.remote_timeout is not None:
|
|
1115
|
+
cli_config_kwargs["timeout"] = args.remote_timeout
|
|
1116
|
+
if args.remote_work_dir:
|
|
1117
|
+
cli_config_kwargs["work_dir"] = args.remote_work_dir
|
|
1118
|
+
if args.remote_runtime:
|
|
1119
|
+
cli_config_kwargs["container_runtime"] = args.remote_runtime
|
|
1120
|
+
|
|
1121
|
+
cli_config = SSHConfig(**cli_config_kwargs)
|
|
1112
1122
|
ssh_config = ssh_config.merge(cli_config)
|
|
1113
1123
|
|
|
1114
1124
|
# Create SSH client
|
|
@@ -1583,9 +1593,9 @@ def main_async_remote(args) -> int:
|
|
|
1583
1593
|
return 1
|
|
1584
1594
|
except Exception as e:
|
|
1585
1595
|
print(f"Error: Unexpected error during remote execution: {e}", file=sys.stderr)
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1596
|
+
# Always print traceback for unexpected errors to help with debugging
|
|
1597
|
+
import traceback
|
|
1598
|
+
traceback.print_exc(file=sys.stderr)
|
|
1589
1599
|
return 1
|
|
1590
1600
|
|
|
1591
1601
|
# Run async main
|
|
@@ -44,7 +44,7 @@ class AsyncSSHClient:
|
|
|
44
44
|
# Prepare connection parameters - only include non-None values
|
|
45
45
|
connect_kwargs = {
|
|
46
46
|
"port": self.config.port,
|
|
47
|
-
"connect_timeout": self.config.timeout,
|
|
47
|
+
"connect_timeout": self.config.timeout or 30,
|
|
48
48
|
"known_hosts": None, # Skip host key verification for now
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -165,7 +165,7 @@ class AsyncSSHClient:
|
|
|
165
165
|
)
|
|
166
166
|
|
|
167
167
|
try:
|
|
168
|
-
timeout_val = timeout or self.config.timeout
|
|
168
|
+
timeout_val = timeout or self.config.timeout or 30
|
|
169
169
|
|
|
170
170
|
result = await asyncio.wait_for(
|
|
171
171
|
self.connection.run(command, check=False),
|
|
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
|