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

@@ -155,13 +155,27 @@ class ConfigTree(ty.Generic[V]):
155
155
  self.setv(value, pathable=key)
156
156
 
157
157
  def load_config(self, config: ty.Mapping[str, ty.Any]) -> None:
158
- """Loads things with an inner key matching this name into the config."""
158
+ """Loads things with an inner key matching this name into the config.
159
+
160
+ The config looks something like this:
161
+
162
+ thds.modulea.foobar.funcname.(?__mask).mops.pure.magic.pipeline_id = 'force-rerun'
163
+
164
+ The end part must correspond to the 'name' of this ConfigTree, e.g. mops.pure.magic.pipeline_id,
165
+ so that we can identify which part of this config is relevant to us.
166
+
167
+ We then split off that part, plus any __mask prefix that might or might not be present.
168
+ The remaining part (from the beginning) is then the 'pathable' - the part of the tree
169
+ that this config value applies to. The value is, of course, the value for that tree.
170
+ """
159
171
  mask_name = f".__mask.{self.registry.name}"
160
- conf_name = f".{self.registry.name}"
172
+ conf_name = f".{self.registry.name}" # e.g. .mops.pure.magic.pipeline_id
161
173
  logger.debug("Loading config for %s", self.registry.name)
162
174
  for key, value in core.config.flatten_config(config).items():
163
- if key.endswith(conf_name):
164
- self.setv(value, key[: -len(conf_name)], mask=key.endswith(mask_name))
175
+ if key.endswith(conf_name): # then this is for us.
176
+ mask = key.endswith(mask_name) # then this is a mask
177
+ pathable = key[: -len(mask_name if mask else conf_name)]
178
+ self.setv(value, pathable, mask=mask)
165
179
 
166
180
  def __repr__(self) -> str:
167
181
  return f"ConfigTree('{self.registry.name}', {list(self.registry.items())})"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: thds.mops
3
- Version: 3.6.20250328151412
3
+ Version: 3.6.20250331151033
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
@@ -6,7 +6,7 @@ thds/mops/parallel.py,sha256=FIWm53NJF1X910sTUGhqYj_XJWaSzgEDdsZq9siDvhk,926
6
6
  thds/mops/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  thds/mops/_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  thds/mops/_utils/colorize.py,sha256=RmygwyL7L_Ue218AQOBp57p4r97PWqTiA1-M5AFvV6Y,2506
9
- thds/mops/_utils/config_tree.py,sha256=qwRGC8DMR-FAcQaBJsJWKiv-ONVnxxk8InI0zLkyAxw,6365
9
+ thds/mops/_utils/config_tree.py,sha256=wMwkw81FDOo2Ld9rEmtobZMW2ZCUmxWSI2Bp_p0pwa8,7151
10
10
  thds/mops/_utils/exception.py,sha256=Itj6ceieCdGrKZ2JdW_DIM88Wgvvw104cfbH1RNn6Go,394
11
11
  thds/mops/_utils/locked_cache.py,sha256=ROIkwu-_FcXlNyCreWQeE5cyL9XrNW7drWsolTgeajM,2523
12
12
  thds/mops/_utils/names.py,sha256=tPPaXCyduUXqmbdvIg3ygevERnKM3YIs868BeaKX5XY,824
@@ -103,8 +103,8 @@ thds/mops/pure/tools/summarize/cli.py,sha256=gaechsJhRZsOxGJGG1dQsW5dMBlgSv2sUmE
103
103
  thds/mops/pure/tools/summarize/run_summary.py,sha256=HCfAJhgAa9u6kXbzJlHa2n-9vVTaTHYSxrN_DP-Sjo4,4892
104
104
  thds/mops/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
105
105
  thds/mops/testing/deferred_imports.py,sha256=f0ezCgQAtzTqW1yAOb0OWgsB9ZrlztLB894LtpWDaVw,3780
106
- thds_mops-3.6.20250328151412.dist-info/METADATA,sha256=o_N1qhQKkKY2Ey4jj3Z-IgingdbLHWdgLRAoPmHZ3eE,2152
107
- thds_mops-3.6.20250328151412.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
108
- thds_mops-3.6.20250328151412.dist-info/entry_points.txt,sha256=GShNqjcjbq0TAJuwpyeCI5XCltiwdZxnNHkBpmYbNkU,329
109
- thds_mops-3.6.20250328151412.dist-info/top_level.txt,sha256=LTZaE5SkWJwv9bwOlMbIhiS-JWQEEIcjVYnJrt-CriY,5
110
- thds_mops-3.6.20250328151412.dist-info/RECORD,,
106
+ thds_mops-3.6.20250331151033.dist-info/METADATA,sha256=gpOVXrE1sJZ6f0VX_NyVmi1F-4bx0qjj0ZPMypofte0,2152
107
+ thds_mops-3.6.20250331151033.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
108
+ thds_mops-3.6.20250331151033.dist-info/entry_points.txt,sha256=GShNqjcjbq0TAJuwpyeCI5XCltiwdZxnNHkBpmYbNkU,329
109
+ thds_mops-3.6.20250331151033.dist-info/top_level.txt,sha256=LTZaE5SkWJwv9bwOlMbIhiS-JWQEEIcjVYnJrt-CriY,5
110
+ thds_mops-3.6.20250331151033.dist-info/RECORD,,