thds.core 1.32.20250227213248__py3-none-any.whl → 1.32.20250228005722__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.core might be problematic. Click here for more details.

thds/core/hashing.py CHANGED
@@ -74,7 +74,7 @@ def hash_anything(data: SomehowReadable, hasher: T) -> ty.Optional[T]:
74
74
  return None
75
75
 
76
76
 
77
- def b64(digest: ty.ByteString) -> str:
77
+ def b64(digest: bytes) -> str:
78
78
  """The string representation commonly used by Azure utilities.
79
79
 
80
80
  We use it in cases where we want to represent the same hash that
@@ -88,7 +88,7 @@ def db64(s: str) -> bytes:
88
88
  return base64.b64decode(s)
89
89
 
90
90
 
91
- def _repr_bytes(bs: ty.ByteString) -> str:
91
+ def _repr_bytes(bs: bytes) -> str:
92
92
  return f"db64('{b64(bs)}')"
93
93
 
94
94
 
thds/core/meta.py CHANGED
@@ -30,11 +30,14 @@ HIVE_SUB_CHARACTER = "_"
30
30
  VERSION_EXCLUSION_REGEX = r"[^\d.]+"
31
31
  VERSION_SUB_CHARACTER = ""
32
32
 
33
+ CI_TIMESTAMP = "CI_TIMESTAMP"
34
+ CI_USER = "runner"
33
35
  DEPLOYING = "DEPLOYING"
34
36
  GIT_COMMIT = "GIT_COMMIT"
35
37
  GIT_IS_CLEAN = "GIT_IS_CLEAN"
36
38
  GIT_IS_DIRTY = "GIT_IS_DIRTY"
37
39
  GIT_BRANCH = "GIT_BRANCH"
40
+ MAIN = "main"
38
41
  THDS_USER = "THDS_USER"
39
42
 
40
43
  META_FILE = "meta.json"
@@ -142,6 +145,13 @@ def extract_timestamp(version: str, as_datetime: bool = False):
142
145
  )
143
146
 
144
147
 
148
+ def norm_name(pkg: str) -> str:
149
+ """Apparently poetry creates slightly different dist-info
150
+ directories and METADATA files than p-i-p-e-n-v did.
151
+ """
152
+ return pkg.replace(".", "_")
153
+
154
+
145
155
  def _get_pkg_root_filename(pkg: Package) -> str:
146
156
  if not isinstance(pkg, str):
147
157
  return pkg.__file__ or ""
@@ -162,7 +172,7 @@ def get_version(pkg: Package, orig: str = "") -> str:
162
172
  if version_:
163
173
  return version_
164
174
  try:
165
- version_ = version(str(pkg))
175
+ version_ = version(norm_name(str(pkg)))
166
176
  except PackageNotFoundError:
167
177
  try:
168
178
  version_ = version(str(pkg))
@@ -207,7 +217,7 @@ def get_base_package(pkg: Package) -> str:
207
217
  str_pkg = str(pkg)
208
218
  if str_pkg == "__main__":
209
219
  raise NoBasePackageFromMain(NoBasePackageFromMain.__doc__)
210
- _ = version(str_pkg)
220
+ _ = version(norm_name(str_pkg))
211
221
  except PackageNotFoundError:
212
222
  try:
213
223
  _ = version(str(pkg))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: thds.core
3
- Version: 1.32.20250227213248
3
+ Version: 1.32.20250228005722
4
4
  Summary: Core utilities.
5
5
  Author-email: Trilliant Health <info@trillianthealth.com>
6
6
  License: MIT
@@ -14,7 +14,7 @@ thds/core/fretry.py,sha256=Tui2q6vXV6c7mjTa1czLrXiugHUEwQp-sZdiwXfxvmM,3829
14
14
  thds/core/generators.py,sha256=rcdFpPj0NMJWSaSZTnBfTeZxTTORNB633Lng-BW1284,1939
15
15
  thds/core/git.py,sha256=I6kaEvwcvVxCLYHhTTfnHle-GkmgOR9_fHs03QxgBfI,2792
16
16
  thds/core/hash_cache.py,sha256=bkdV8HZOl66zNffnIjRvMQH1A0_xNqowMDLBtRXGFl8,3723
17
- thds/core/hashing.py,sha256=OqaV65vGKpT3l78jm-Uh7xG4DtAczGjk9-Q60OGmhY0,3521
17
+ thds/core/hashing.py,sha256=5I4vLBjgkn9yOXMjBduLGdXsywBob-35qJTk_lks6aw,3505
18
18
  thds/core/home.py,sha256=tTClL_AarIKeri1aNCpuIC6evD7qr83ESGD173B81hU,470
19
19
  thds/core/hostname.py,sha256=canFGr-JaaG7nUfsQlyL0JT-2tnZoT1BvXzyaOMK1vA,208
20
20
  thds/core/imports.py,sha256=0LVegY8I8_XKZPcqiIp2OVVzEDtyqYA3JETf9OAKNKs,568
@@ -24,7 +24,7 @@ thds/core/lazy.py,sha256=e1WvG4LsbEydV0igEr_Vl1cq05zlQNIE8MFYT90yglE,3289
24
24
  thds/core/link.py,sha256=kmFJIFvEZc16-7S7IGvtTpzwl3VuvFl3yPlE6WJJ03w,5404
25
25
  thds/core/logical_root.py,sha256=gWkIYRv9kNQfzbpxJaYiwNXVz1neZ2NvnvProtOn9d8,1399
26
26
  thds/core/merge_args.py,sha256=7oj7dtO1-XVkfTM3aBlq3QlZbo8tb6X7E3EVIR-60t8,5781
27
- thds/core/meta.py,sha256=5um8Gvl00JFrYdpYfK2qD3pyQEoq-_3T2LXAhFOcTNo,16617
27
+ thds/core/meta.py,sha256=IPLAKrH06HooPMNf5FeqJvUcM-JljTGXddrAQ5oAX8E,16896
28
28
  thds/core/parallel.py,sha256=HXAn9aIYqNE5rnRN5ypxR6CUucdfzE5T5rJ_MUv-pFk,7590
29
29
  thds/core/pickle_visit.py,sha256=QNMWIi5buvk2zsvx1-D-FKL7tkrFUFDs387vxgGebgU,833
30
30
  thds/core/prof.py,sha256=5ViolfPsAPwUTHuhAe-bon7IArPGXydpGoB5uZmObDk,8264
@@ -66,8 +66,8 @@ thds/core/sqlite/structured.py,sha256=swCbDoyVT6cE7Kl79Wh_rg5Z1-yrUDJbiVJF4bjset
66
66
  thds/core/sqlite/types.py,sha256=oUkfoKRYNGDPZRk29s09rc9ha3SCk2SKr_K6WKebBFs,1308
67
67
  thds/core/sqlite/upsert.py,sha256=BmKK6fsGVedt43iY-Lp7dnAu8aJ1e9CYlPVEQR2pMj4,5827
68
68
  thds/core/sqlite/write.py,sha256=z0219vDkQDCnsV0WLvsj94keItr7H4j7Y_evbcoBrWU,3458
69
- thds_core-1.32.20250227213248.dist-info/METADATA,sha256=QCwyNOPqBZ6moVWE37amntjVEgahhzncnU9KCuWZwB0,2275
70
- thds_core-1.32.20250227213248.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
71
- thds_core-1.32.20250227213248.dist-info/entry_points.txt,sha256=bOCOVhKZv7azF3FvaWX6uxE6yrjK6FcjqhtxXvLiFY8,161
72
- thds_core-1.32.20250227213248.dist-info/top_level.txt,sha256=LTZaE5SkWJwv9bwOlMbIhiS-JWQEEIcjVYnJrt-CriY,5
73
- thds_core-1.32.20250227213248.dist-info/RECORD,,
69
+ thds_core-1.32.20250228005722.dist-info/METADATA,sha256=d3Y1XboRoWpNVvKHLzdLezdzWAIRODxrfwY0Zo-3t-s,2275
70
+ thds_core-1.32.20250228005722.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
71
+ thds_core-1.32.20250228005722.dist-info/entry_points.txt,sha256=bOCOVhKZv7azF3FvaWX6uxE6yrjK6FcjqhtxXvLiFY8,161
72
+ thds_core-1.32.20250228005722.dist-info/top_level.txt,sha256=LTZaE5SkWJwv9bwOlMbIhiS-JWQEEIcjVYnJrt-CriY,5
73
+ thds_core-1.32.20250228005722.dist-info/RECORD,,