dycw-utilities 0.174.0__py3-none-any.whl → 0.174.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.
- {dycw_utilities-0.174.0.dist-info → dycw_utilities-0.174.1.dist-info}/METADATA +1 -1
- {dycw_utilities-0.174.0.dist-info → dycw_utilities-0.174.1.dist-info}/RECORD +6 -6
- utilities/__init__.py +1 -1
- utilities/subprocess.py +16 -0
- {dycw_utilities-0.174.0.dist-info → dycw_utilities-0.174.1.dist-info}/WHEEL +0 -0
- {dycw_utilities-0.174.0.dist-info → dycw_utilities-0.174.1.dist-info}/entry_points.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
utilities/__init__.py,sha256=
|
|
1
|
+
utilities/__init__.py,sha256=tLO7x-PFRNnbxnNKusLHsRm5KouG5gC6-6CMhoP9aSQ,60
|
|
2
2
|
utilities/aeventkit.py,sha256=OmDBhYGgbsKrB7cdC5FFpJHUatX9O76eTeKVVTksp2Y,12673
|
|
3
3
|
utilities/altair.py,sha256=rUK99g9x6CYDDfiZrf-aTx5fSRbL1Q8ctgKORowzXHg,9060
|
|
4
4
|
utilities/asyncio.py,sha256=aJySVxBY0gqsIYnoNmH7-1r8djKuf4vSsU69VCD08t8,16772
|
|
@@ -80,7 +80,7 @@ utilities/sqlalchemy.py,sha256=HQYpd7LFxdTF5WYVWYtCJeEBI71EJm7ytvCGyAH9B-U,37163
|
|
|
80
80
|
utilities/sqlalchemy_polars.py,sha256=JCGhB37raSR7fqeWV5dTsciRTMVzIdVT9YSqKT0piT0,13370
|
|
81
81
|
utilities/statsmodels.py,sha256=koyiBHvpMcSiBfh99wFUfSggLNx7cuAw3rwyfAhoKpQ,3410
|
|
82
82
|
utilities/string.py,sha256=shmBK87zZwzGyixuNuXCiUbqzfeZ9xlrFwz6JTaRvDk,582
|
|
83
|
-
utilities/subprocess.py,sha256=
|
|
83
|
+
utilities/subprocess.py,sha256=8kGrQLnPnlbdXeWE7OPk9Pih2KBNyjBKbntdiloQVrY,13066
|
|
84
84
|
utilities/tempfile.py,sha256=Lx6qa16lL1XVH6WdmD_G9vlN6gLI8nrIurxmsFkPKvg,3022
|
|
85
85
|
utilities/testbook.py,sha256=j1KmaVbrX9VrbeMgtPh5gk55myAsn3dyRUn7jGbPbRk,1294
|
|
86
86
|
utilities/text.py,sha256=7SvwcSR2l_5cOrm1samGnR4C-ZI6qyFLHLzSpO1zeHQ,13958
|
|
@@ -97,7 +97,7 @@ utilities/warnings.py,sha256=un1LvHv70PU-LLv8RxPVmugTzDJkkGXRMZTE2-fTQHw,1771
|
|
|
97
97
|
utilities/whenever.py,sha256=F4ek0-OBWxHYrZdmoZt76N2RnNyKY5KrEHt7rqO4AQE,60183
|
|
98
98
|
utilities/zipfile.py,sha256=24lQc9ATcJxHXBPc_tBDiJk48pWyRrlxO2fIsFxU0A8,699
|
|
99
99
|
utilities/zoneinfo.py,sha256=tdIScrTB2-B-LH0ukb1HUXKooLknOfJNwHk10MuMYvA,3619
|
|
100
|
-
dycw_utilities-0.174.
|
|
101
|
-
dycw_utilities-0.174.
|
|
102
|
-
dycw_utilities-0.174.
|
|
103
|
-
dycw_utilities-0.174.
|
|
100
|
+
dycw_utilities-0.174.1.dist-info/WHEEL,sha256=ZyFSCYkV2BrxH6-HRVRg3R9Fo7MALzer9KiPYqNxSbo,79
|
|
101
|
+
dycw_utilities-0.174.1.dist-info/entry_points.txt,sha256=ykGI1ArwOPHqm2g5Cqh3ENdMxEej_a_FcOUov5EM5Oc,155
|
|
102
|
+
dycw_utilities-0.174.1.dist-info/METADATA,sha256=olH83qMZVFRCSDboBVmfiiCV1d4hKdtVyvCFi6s1Gp0,1709
|
|
103
|
+
dycw_utilities-0.174.1.dist-info/RECORD,,
|
utilities/__init__.py
CHANGED
utilities/subprocess.py
CHANGED
|
@@ -419,6 +419,21 @@ def touch_cmd(path: PathLike, /) -> list[str]:
|
|
|
419
419
|
return ["touch", str(path)]
|
|
420
420
|
|
|
421
421
|
|
|
422
|
+
@contextmanager
|
|
423
|
+
def yield_ssh_temp_dir(
|
|
424
|
+
user: str, hostname: str, /, *, keep: bool = False, logger: LoggerLike | None = None
|
|
425
|
+
) -> Iterator[Path]:
|
|
426
|
+
path = Path(ssh(user, hostname, *MKTEMP_DIR_CMD, return_=True))
|
|
427
|
+
try:
|
|
428
|
+
yield path
|
|
429
|
+
finally:
|
|
430
|
+
if keep:
|
|
431
|
+
if logger is not None:
|
|
432
|
+
to_logger(logger).info("Keeping temporary directory '%s'...", path)
|
|
433
|
+
else:
|
|
434
|
+
ssh(user, hostname, *rm_cmd(path))
|
|
435
|
+
|
|
436
|
+
|
|
422
437
|
__all__ = [
|
|
423
438
|
"BASH_LC",
|
|
424
439
|
"BASH_LS",
|
|
@@ -434,4 +449,5 @@ __all__ = [
|
|
|
434
449
|
"ssh_cmd",
|
|
435
450
|
"sudo_cmd",
|
|
436
451
|
"touch_cmd",
|
|
452
|
+
"yield_ssh_temp_dir",
|
|
437
453
|
]
|
|
File without changes
|
|
File without changes
|