thds.mops 3.9.20250806175503__py3-none-any.whl → 3.9.20250811205724__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.

Potentially problematic release.


This version of thds.mops might be problematic. Click here for more details.

thds/mops/k8s/auth.py CHANGED
@@ -47,3 +47,9 @@ def upsert_namespace(namespace: str, created_cache: ty.Set[str] = set()) -> None
47
47
  logger.info(f"Creating namespace {namespace}")
48
48
  kubeapi.create_namespace(ns_obj)
49
49
  created_cache.add(namespace)
50
+
51
+
52
+ def core_client() -> client.CoreV1Api:
53
+ """Returns a CoreV1Api client, ensuring that the Kubernetes config is loaded."""
54
+ load_config()
55
+ return client.CoreV1Api()
@@ -280,12 +280,19 @@ def source_from_source_result(remote_uri: str, hash: ty.Optional[hashing.Hash],
280
280
  return source.from_uri(remote_uri, hash=hash)
281
281
 
282
282
  local_path = source.path_from_uri(file_uri)
283
- if local_path.exists():
283
+
284
+ try:
285
+ file_exists = local_path.exists()
286
+ except PermissionError:
287
+ file_exists = False # this will happen if one of the intermediate directories is not readable
288
+
289
+ if file_exists:
284
290
  try:
285
291
  # since there's a remote URI, it's possible a specific consumer might want to
286
292
  # get access to that directly, even though the default data access would still
287
293
  # be to use the local file.
288
294
  return source.from_file(local_path, hash=hash, uri=remote_uri)
295
+
289
296
  except Exception as e:
290
297
  logger.warning(
291
298
  f"Unable to reuse destination local path {local_path} when constructing Source {remote_uri}: {e}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: thds.mops
3
- Version: 3.9.20250806175503
3
+ Version: 3.9.20250811205724
4
4
  Summary: ML Ops tools for Trilliant Health
5
5
  Author-email: Trilliant Health <info@trillianthealth.com>
6
6
  Project-URL: Repository, https://github.com/TrilliantHealth/ds-monorepo
@@ -19,7 +19,7 @@ thds/mops/k8s/__init__.py,sha256=zl4GVcCFRvPscyo6gvv5Lx0OKB7d3QjtVFjYurnxMuE,764
19
19
  thds/mops/k8s/_launch.py,sha256=n4a3v6JNjcShFlBgRyL6JdS9My0ApggsjurtZFuKOnk,10893
20
20
  thds/mops/k8s/_shared.py,sha256=MR-s6ijWUHZGjxK_fsOpHuRDB6kuofjo5xiIb7ul2VM,86
21
21
  thds/mops/k8s/apply_yaml.py,sha256=hVW6dIVbNdzHdbGlc2VAPGkdByv_rH2oPybyIm7tKIM,820
22
- thds/mops/k8s/auth.py,sha256=mXFPZvyJYEPASsBatv1r8syB9AoayuHGptHHnNUg8LE,1517
22
+ thds/mops/k8s/auth.py,sha256=0zs4TQgkD6VPrhDD43xt7JGwP6uWf3ctySGLcPKN7iw,1691
23
23
  thds/mops/k8s/batching.py,sha256=VJw6DhdhklOSu-iUW6r_BpAP7Jx62uoKV2Bpy0V9U_Q,8266
24
24
  thds/mops/k8s/config.py,sha256=_znocX5BW8kfG_Cbq6f3apx5FqSihD7Tmic-SBkVjMQ,2992
25
25
  thds/mops/k8s/container_registry.py,sha256=qOiGCE4t_tLYgJDGrhKV9KNv48lF_AlwCDHyFgucd2s,539
@@ -58,7 +58,7 @@ thds/mops/pure/core/pipeline_id_mask.py,sha256=Ll2yyQM5nSgzihx8i7fCrrSNlUUnIsbAO
58
58
  thds/mops/pure/core/script_support.py,sha256=3j9Z1O5ynSSPmWSghtJgAj-Lt4GwYcA8cWcpUIRM7q0,952
59
59
  thds/mops/pure/core/serialize_big_objs.py,sha256=YcOS1ccs82ZWO7nTbeumErMzYVe4hgXCTsfvMggYmd8,2332
60
60
  thds/mops/pure/core/serialize_paths.py,sha256=bWI-AKNP_Tf29JGO7DKqshOh7b7gu51lfGryDXo3aMI,5787
61
- thds/mops/pure/core/source.py,sha256=b0i58gE13e25lIV6ls1yPKH67SQ7aCuZmKDEHNr9Ux4,14682
61
+ thds/mops/pure/core/source.py,sha256=mubbxj3s2tsYHfG-m4R1DDJT63zDaw9COrRzQqbwDRs,14859
62
62
  thds/mops/pure/core/types.py,sha256=w2g83miGhnjaWr2_4TW2Fc3BdIgoIHFbIr_wX1HC7A0,5452
63
63
  thds/mops/pure/core/uris.py,sha256=qO9_f-ro7kax6haNOPTPe81-_aUSRFELeeZH4PMTTU4,2694
64
64
  thds/mops/pure/core/use_runner.py,sha256=m1Mu1XDr3xRf_u_VSiHfTG4TH6fnSg0IqwmtbLKG_oc,2103
@@ -109,8 +109,8 @@ thds/mops/pure/tools/summarize/cli.py,sha256=7kDtn24ok8oBO3jFjlMmOK3jnZYpMoE_5Y8
109
109
  thds/mops/pure/tools/summarize/run_summary.py,sha256=w45qiQr7elrHDiK9Hgs85gtU3gwLuXa447ih1Y23BBY,5776
110
110
  thds/mops/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
111
111
  thds/mops/testing/deferred_imports.py,sha256=f0ezCgQAtzTqW1yAOb0OWgsB9ZrlztLB894LtpWDaVw,3780
112
- thds_mops-3.9.20250806175503.dist-info/METADATA,sha256=b9Z1ViZyZxlnUlTfGQ7VLPqfz_Q2jMNPbFqudSqmauQ,2225
113
- thds_mops-3.9.20250806175503.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
114
- thds_mops-3.9.20250806175503.dist-info/entry_points.txt,sha256=qKvCAaB80syXfxVR3xx6x9J0YJdaQWkIbVSw-NwFgMw,322
115
- thds_mops-3.9.20250806175503.dist-info/top_level.txt,sha256=LTZaE5SkWJwv9bwOlMbIhiS-JWQEEIcjVYnJrt-CriY,5
116
- thds_mops-3.9.20250806175503.dist-info/RECORD,,
112
+ thds_mops-3.9.20250811205724.dist-info/METADATA,sha256=jbydFNpFHDBQJgr7NSXuMayvYkkiA8mwDBkKOnEoto0,2225
113
+ thds_mops-3.9.20250811205724.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
114
+ thds_mops-3.9.20250811205724.dist-info/entry_points.txt,sha256=qKvCAaB80syXfxVR3xx6x9J0YJdaQWkIbVSw-NwFgMw,322
115
+ thds_mops-3.9.20250811205724.dist-info/top_level.txt,sha256=LTZaE5SkWJwv9bwOlMbIhiS-JWQEEIcjVYnJrt-CriY,5
116
+ thds_mops-3.9.20250811205724.dist-info/RECORD,,