dycw-utilities 0.174.14__py3-none-any.whl → 0.174.16__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.14.dist-info → dycw_utilities-0.174.16.dist-info}/METADATA +1 -1
- {dycw_utilities-0.174.14.dist-info → dycw_utilities-0.174.16.dist-info}/RECORD +12 -12
- utilities/__init__.py +1 -1
- utilities/click.py +1 -2
- utilities/docker.py +1 -1
- utilities/functions.py +1 -1
- utilities/hypothesis.py +1 -1
- utilities/pathlib.py +1 -1
- utilities/platform.py +1 -1
- utilities/subprocess.py +16 -4
- {dycw_utilities-0.174.14.dist-info → dycw_utilities-0.174.16.dist-info}/WHEEL +0 -0
- {dycw_utilities-0.174.14.dist-info → dycw_utilities-0.174.16.dist-info}/entry_points.txt +0 -0
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
utilities/__init__.py,sha256=
|
|
1
|
+
utilities/__init__.py,sha256=vtFT93z2VkUoI-200aWbVdTniPgIRP-XjQ6slYwfpHo,61
|
|
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
|
|
5
5
|
utilities/atomicwrites.py,sha256=tPo6r-Rypd9u99u66B9z86YBPpnLrlHtwox_8Z7T34Y,5790
|
|
6
6
|
utilities/atools.py,sha256=6neeCcgXxK2dlsc0xp15Za7nSucbCgFtAJepGI_-WXU,2549
|
|
7
7
|
utilities/cachetools.py,sha256=2S9LMHIunDYMIu8JGI7OLN04sQ7-xZGdEdP1Li0vksA,2775
|
|
8
|
-
utilities/click.py,sha256
|
|
8
|
+
utilities/click.py,sha256=ScLzBLoBp8Si5YjgB18A0IVMAR-r4sGUnVfJbAaru98,19191
|
|
9
9
|
utilities/concurrent.py,sha256=fHeW2SZ_TEMfFY0C8pyQI6aPlnecvx9x6SuUwBWj_JY,2853
|
|
10
10
|
utilities/contextlib.py,sha256=iP7R2tIm6ZsbfLD5ks6UKBYwj50e9gBI8AkpLN-chro,7476
|
|
11
11
|
utilities/contextvars.py,sha256=J8OhC7jqozAGYOCe2KUWysbPXNGe5JYz3HfaY_mIs08,883
|
|
12
12
|
utilities/cryptography.py,sha256=5PFrzsNUGHay91dFgYnDKwYprXxahrBqztmUqViRzBk,956
|
|
13
13
|
utilities/cvxpy.py,sha256=Rv1-fD-XYerosCavRF8Pohop2DBkU3AlFaGTfD8AEAA,13776
|
|
14
14
|
utilities/dataclasses.py,sha256=xbU3QN1GFy7RC6hIJRZIeUZm7YRlodrgEWmahWG6k2g,32465
|
|
15
|
-
utilities/docker.py,sha256=
|
|
15
|
+
utilities/docker.py,sha256=l_R9Eyhc-_JbkkaYXYKGZ0PZ_oukrSj8aKtD1NyAhMM,7879
|
|
16
16
|
utilities/enum.py,sha256=5l6pwZD1cjSlVW4ss-zBPspWvrbrYrdtJWcg6f5_J5w,5781
|
|
17
17
|
utilities/errors.py,sha256=mFlDGSM0LI1jZ1pbqwLAH3ttLZ2JVIxyZLojw8tGVZU,1479
|
|
18
18
|
utilities/fastapi.py,sha256=TqyKvBjiMS594sXPjrz-KRTLMb3l3D3rZ1zAYV7GfOk,1454
|
|
19
19
|
utilities/fpdf2.py,sha256=dSiYz0FJTD2sQuxpxqFWwwIe2-p6Y7oTB9Tv0Jajit0,1866
|
|
20
|
-
utilities/functions.py,sha256=
|
|
20
|
+
utilities/functions.py,sha256=18Zda7nTloARdcEudH8YJ4e13xAdWShAGhPNN4w2Gyc,21498
|
|
21
21
|
utilities/functools.py,sha256=I00ru2gQPakZw2SHVeKIKXfTv741655s6HI0lUoE0D4,1552
|
|
22
22
|
utilities/getpass.py,sha256=DfN5UgMAtFCqS3dSfFHUfqIMZX2shXvwphOz_6J6f6A,103
|
|
23
23
|
utilities/git.py,sha256=U1RFvCTANGENgx9wVBDvllioqBQZM2ns12ivKhOsaO4,414
|
|
@@ -25,7 +25,7 @@ utilities/grp.py,sha256=1vV3gNR9dQsl1vtUtvC_2qgVdQzm7O8lLMSh56cTbeg,694
|
|
|
25
25
|
utilities/gzip.py,sha256=fkGP3KdsBfXlstodT4wtlp-PwNyUsogpbDCVVVGdsm4,781
|
|
26
26
|
utilities/hashlib.py,sha256=SVTgtguur0P4elppvzOBbLEjVM3Pea0eWB61yg2ilxo,309
|
|
27
27
|
utilities/http.py,sha256=TsavEfHlRtlLaeV21Z6KZh0qbPw-kvD1zsQdZ7Kep5Q,977
|
|
28
|
-
utilities/hypothesis.py,sha256=
|
|
28
|
+
utilities/hypothesis.py,sha256=NUu30pl5kjL3tzo-m8SMRwTqLAmTWK-_Sau2NemJcQo,46773
|
|
29
29
|
utilities/importlib.py,sha256=mV1xT_O_zt_GnZZ36tl3xOmMaN_3jErDWY54fX39F6Y,429
|
|
30
30
|
utilities/inflect.py,sha256=v7YkOWSu8NAmVghPcf4F3YBZQoJCS47_DLf9jbfWIs0,581
|
|
31
31
|
utilities/ipython.py,sha256=V2oMYHvEKvlNBzxDXdLvKi48oUq2SclRg5xasjaXStw,763
|
|
@@ -46,10 +46,10 @@ utilities/optuna.py,sha256=C-fhWYiXHVPo1l8QctYkFJ4DyhbSrGorzP1dJb_qvd8,1933
|
|
|
46
46
|
utilities/orjson.py,sha256=T_0SlK811ysg46d3orvIPY3JpBa4FRMpP2wlPQo7-gU,41854
|
|
47
47
|
utilities/os.py,sha256=kjKKSQfnRqFTTZ315iavaaGd3gGuYNoSWlxVLCJjyQs,4852
|
|
48
48
|
utilities/parse.py,sha256=g7Qm9eBOIeDId2tGA021CIaeF6jp1TI8rx4srdvlyoo,17937
|
|
49
|
-
utilities/pathlib.py,sha256=
|
|
49
|
+
utilities/pathlib.py,sha256=N4Ip8R9eCM-6GfvxUJ3T9oQIle2C2P52F-13BCFRdTg,9345
|
|
50
50
|
utilities/permissions.py,sha256=vLXlWztSVYffbrxptne7ksj6dU1HLekm4fEvS4ny_4Q,8944
|
|
51
51
|
utilities/pickle.py,sha256=MBT2xZCsv0pH868IXLGKnlcqNx2IRVKYNpRcqiQQqxw,653
|
|
52
|
-
utilities/platform.py,sha256=
|
|
52
|
+
utilities/platform.py,sha256=Grov52WxNOViJEZyRcm-b2m_Dp1T0waPjDCusR_9oqs,2791
|
|
53
53
|
utilities/polars.py,sha256=cNFBLWgOMUAp_Sz4xtlto17uZswZRrcfQYC95QKyaY4,87483
|
|
54
54
|
utilities/polars_ols.py,sha256=LNTFNLPuYW7fcAHymlbnams_DhitToblYvib3mhKbwI,5615
|
|
55
55
|
utilities/postgres.py,sha256=g3tEwTI8TdmiCbRME61ffQ0xaibdpXPu8mJOOHvjPKc,12532
|
|
@@ -81,7 +81,7 @@ utilities/sqlalchemy.py,sha256=HQYpd7LFxdTF5WYVWYtCJeEBI71EJm7ytvCGyAH9B-U,37163
|
|
|
81
81
|
utilities/sqlalchemy_polars.py,sha256=JCGhB37raSR7fqeWV5dTsciRTMVzIdVT9YSqKT0piT0,13370
|
|
82
82
|
utilities/statsmodels.py,sha256=koyiBHvpMcSiBfh99wFUfSggLNx7cuAw3rwyfAhoKpQ,3410
|
|
83
83
|
utilities/string.py,sha256=shmBK87zZwzGyixuNuXCiUbqzfeZ9xlrFwz6JTaRvDk,582
|
|
84
|
-
utilities/subprocess.py,sha256=
|
|
84
|
+
utilities/subprocess.py,sha256=c9f3-HCXVOAMBkfcs4ytmtGUKRH24UlV1D_NdvPqfVA,28937
|
|
85
85
|
utilities/tempfile.py,sha256=Lx6qa16lL1XVH6WdmD_G9vlN6gLI8nrIurxmsFkPKvg,3022
|
|
86
86
|
utilities/testbook.py,sha256=j1KmaVbrX9VrbeMgtPh5gk55myAsn3dyRUn7jGbPbRk,1294
|
|
87
87
|
utilities/text.py,sha256=7SvwcSR2l_5cOrm1samGnR4C-ZI6qyFLHLzSpO1zeHQ,13958
|
|
@@ -98,7 +98,7 @@ utilities/warnings.py,sha256=un1LvHv70PU-LLv8RxPVmugTzDJkkGXRMZTE2-fTQHw,1771
|
|
|
98
98
|
utilities/whenever.py,sha256=F4ek0-OBWxHYrZdmoZt76N2RnNyKY5KrEHt7rqO4AQE,60183
|
|
99
99
|
utilities/zipfile.py,sha256=24lQc9ATcJxHXBPc_tBDiJk48pWyRrlxO2fIsFxU0A8,699
|
|
100
100
|
utilities/zoneinfo.py,sha256=tdIScrTB2-B-LH0ukb1HUXKooLknOfJNwHk10MuMYvA,3619
|
|
101
|
-
dycw_utilities-0.174.
|
|
102
|
-
dycw_utilities-0.174.
|
|
103
|
-
dycw_utilities-0.174.
|
|
104
|
-
dycw_utilities-0.174.
|
|
101
|
+
dycw_utilities-0.174.16.dist-info/WHEEL,sha256=ZyFSCYkV2BrxH6-HRVRg3R9Fo7MALzer9KiPYqNxSbo,79
|
|
102
|
+
dycw_utilities-0.174.16.dist-info/entry_points.txt,sha256=ykGI1ArwOPHqm2g5Cqh3ENdMxEej_a_FcOUov5EM5Oc,155
|
|
103
|
+
dycw_utilities-0.174.16.dist-info/METADATA,sha256=aNMnbDY3Lh5LGRBgi6ySNdZ3PR2zd3cxGHv28VNPX44,1710
|
|
104
|
+
dycw_utilities-0.174.16.dist-info/RECORD,,
|
utilities/__init__.py
CHANGED
utilities/click.py
CHANGED
|
@@ -210,8 +210,7 @@ class EnumPartial[E: enum.Enum](ParamType):
|
|
|
210
210
|
self.fail(str(error), param, ctx)
|
|
211
211
|
if enum in self._members:
|
|
212
212
|
return enum
|
|
213
|
-
self.fail(f"{enum.value!r} is not a selected member")
|
|
214
|
-
return None
|
|
213
|
+
return self.fail(f"{enum.value!r} is not a selected member")
|
|
215
214
|
|
|
216
215
|
@override
|
|
217
216
|
def get_metavar(self, param: Parameter, ctx: Context) -> str | None:
|
utilities/docker.py
CHANGED
|
@@ -47,7 +47,7 @@ def docker_cp(
|
|
|
47
47
|
sudo: bool = False,
|
|
48
48
|
logger: LoggerLike | None = None,
|
|
49
49
|
) -> None:
|
|
50
|
-
match src, dest:
|
|
50
|
+
match src, dest: # skipif-ci
|
|
51
51
|
case Path() | str(), (str() as cont, Path() | str() as dest_path):
|
|
52
52
|
docker_exec(
|
|
53
53
|
cont, *maybe_sudo_cmd(*mkdir_cmd(dest_path, parent=True), sudo=sudo)
|
utilities/functions.py
CHANGED
|
@@ -693,7 +693,7 @@ def second[U](pair: tuple[Any, U], /) -> U:
|
|
|
693
693
|
|
|
694
694
|
def skip_if_optimize[**P](func: Callable[P, None], /) -> Callable[P, None]:
|
|
695
695
|
"""Skip a function if we are in the optimized mode."""
|
|
696
|
-
if __debug__:
|
|
696
|
+
if __debug__: # pragma: no cover
|
|
697
697
|
return func
|
|
698
698
|
|
|
699
699
|
@wraps(func)
|
utilities/hypothesis.py
CHANGED
|
@@ -1040,7 +1040,7 @@ def setup_hypothesis_profiles(
|
|
|
1040
1040
|
assert_never(never)
|
|
1041
1041
|
|
|
1042
1042
|
phases = {Phase.explicit, Phase.reuse, Phase.generate, Phase.target}
|
|
1043
|
-
if "HYPOTHESIS_NO_SHRINK" not in environ:
|
|
1043
|
+
if "HYPOTHESIS_NO_SHRINK" not in environ: # pragma: no cover
|
|
1044
1044
|
phases.add(Phase.shrink)
|
|
1045
1045
|
for profile in Profile:
|
|
1046
1046
|
try:
|
utilities/pathlib.py
CHANGED
|
@@ -127,7 +127,7 @@ class GetRepoRootError(Exception): ...
|
|
|
127
127
|
class _GetRepoRootGitNotFoundError(GetRepoRootError):
|
|
128
128
|
@override
|
|
129
129
|
def __str__(self) -> str:
|
|
130
|
-
return "'git' not found"
|
|
130
|
+
return "'git' not found" # pragma: no cover
|
|
131
131
|
|
|
132
132
|
|
|
133
133
|
@dataclass(kw_only=True, slots=True)
|
utilities/platform.py
CHANGED
|
@@ -16,7 +16,7 @@ System = Literal["windows", "mac", "linux"]
|
|
|
16
16
|
def get_system() -> System:
|
|
17
17
|
"""Get the system/OS name."""
|
|
18
18
|
sys = system()
|
|
19
|
-
if sys == "Windows":
|
|
19
|
+
if sys == "Windows": # skipif-ci
|
|
20
20
|
return "windows"
|
|
21
21
|
if sys == "Darwin": # skipif-not-macos
|
|
22
22
|
return "mac"
|
utilities/subprocess.py
CHANGED
|
@@ -164,7 +164,7 @@ def cp(
|
|
|
164
164
|
) -> None:
|
|
165
165
|
"""Copy a file/directory."""
|
|
166
166
|
mkdir(dest, sudo=sudo, parent=True)
|
|
167
|
-
if sudo:
|
|
167
|
+
if sudo: # pragma: no cover
|
|
168
168
|
run(*sudo_cmd(*cp_cmd(src, dest)))
|
|
169
169
|
else:
|
|
170
170
|
src, dest = map(Path, [src, dest])
|
|
@@ -277,7 +277,7 @@ def mv(
|
|
|
277
277
|
) -> None:
|
|
278
278
|
"""Move a file/directory."""
|
|
279
279
|
mkdir(dest, sudo=sudo, parent=True)
|
|
280
|
-
if sudo:
|
|
280
|
+
if sudo: # pragma: no cover
|
|
281
281
|
run(*sudo_cmd(*cp_cmd(src, dest)))
|
|
282
282
|
else:
|
|
283
283
|
src, dest = map(Path, [src, dest])
|
|
@@ -938,12 +938,24 @@ def symlink_cmd(target: PathLike, link: PathLike, /) -> list[str]:
|
|
|
938
938
|
##
|
|
939
939
|
|
|
940
940
|
|
|
941
|
-
def
|
|
941
|
+
def tee(
|
|
942
|
+
path: PathLike, text: str, /, *, sudo: bool = False, append: bool = False
|
|
943
|
+
) -> None:
|
|
944
|
+
"""Use 'tee' to duplicate standard input."""
|
|
945
|
+
if sudo: # pragma: no cover
|
|
946
|
+
run(*sudo_cmd(*tee_cmd(path, append=append)), input=text)
|
|
947
|
+
else:
|
|
948
|
+
path = Path(path)
|
|
949
|
+
with path.open(mode="a" if append else "w") as fh:
|
|
950
|
+
_ = fh.write(text)
|
|
951
|
+
|
|
952
|
+
|
|
953
|
+
def tee_cmd(path: PathLike, /, *, append: bool = False) -> list[str]:
|
|
942
954
|
"""Command to use 'tee' to duplicate standard input."""
|
|
943
955
|
args: list[str] = ["tee"]
|
|
944
956
|
if append:
|
|
945
957
|
args.append("-a")
|
|
946
|
-
return args
|
|
958
|
+
return [*args, str(path)]
|
|
947
959
|
|
|
948
960
|
|
|
949
961
|
##
|
|
File without changes
|
|
File without changes
|