hydra-python 0.18.0__tar.gz → 0.18.1__tar.gz

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.
Files changed (20) hide show
  1. {hydra_python-0.18.0 → hydra_python-0.18.1}/PKG-INFO +19 -19
  2. {hydra_python-0.18.0 → hydra_python-0.18.1}/README.md +17 -17
  3. {hydra_python-0.18.0 → hydra_python-0.18.1}/build/main/digest.json +21 -21
  4. {hydra_python-0.18.0 → hydra_python-0.18.1}/pyproject.toml +2 -2
  5. {hydra_python-0.18.0 → hydra_python-0.18.1}/src/main/python/hydra/python/coder.py +2291 -2261
  6. {hydra_python-0.18.0 → hydra_python-0.18.1}/src/main/python/hydra/python/names.py +48 -48
  7. {hydra_python-0.18.0 → hydra_python-0.18.1}/src/main/python/hydra/python/syntax.py +1 -1
  8. {hydra_python-0.18.0 → hydra_python-0.18.1}/src/main/python/hydra/python/testing.py +6 -6
  9. {hydra_python-0.18.0 → hydra_python-0.18.1}/.gitignore +0 -0
  10. {hydra_python-0.18.0 → hydra_python-0.18.1}/LICENSE +0 -0
  11. {hydra_python-0.18.0 → hydra_python-0.18.1}/NOTICE +0 -0
  12. {hydra_python-0.18.0 → hydra_python-0.18.1}/src/main/python/hydra/python/dsl/environment.py +0 -0
  13. {hydra_python-0.18.0 → hydra_python-0.18.1}/src/main/python/hydra/python/dsl/names.py +0 -0
  14. {hydra_python-0.18.0 → hydra_python-0.18.1}/src/main/python/hydra/python/dsl/syntax.py +0 -0
  15. {hydra_python-0.18.0 → hydra_python-0.18.1}/src/main/python/hydra/python/dsl/utils.py +0 -0
  16. {hydra_python-0.18.0 → hydra_python-0.18.1}/src/main/python/hydra/python/environment.py +0 -0
  17. {hydra_python-0.18.0 → hydra_python-0.18.1}/src/main/python/hydra/python/language.py +0 -0
  18. {hydra_python-0.18.0 → hydra_python-0.18.1}/src/main/python/hydra/python/pyproject.py +0 -0
  19. {hydra_python-0.18.0 → hydra_python-0.18.1}/src/main/python/hydra/python/serde.py +839 -839
  20. {hydra_python-0.18.0 → hydra_python-0.18.1}/src/main/python/hydra/python/utils.py +174 -174
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: hydra-python
3
- Version: 0.18.0
3
+ Version: 0.18.1
4
4
  Summary: Python support for Hydra
5
5
  Project-URL: Homepage, https://github.com/CategoricalData/hydra
6
6
  Project-URL: Repository, https://github.com/CategoricalData/hydra
@@ -9,7 +9,7 @@ License: Apache-2.0
9
9
  License-File: LICENSE
10
10
  License-File: NOTICE
11
11
  Requires-Python: >=3.12
12
- Requires-Dist: hydra-kernel==0.18.0
12
+ Requires-Dist: hydra-kernel==0.18.1
13
13
  Description-Content-Type: text/markdown
14
14
 
15
15
  # Hydra-Python
@@ -140,20 +140,20 @@ Hydra's Python code is split across three locations
140
140
  - **Python kernel overlay** ([`overlay/python/hydra-kernel/src/main/python/`](https://github.com/CategoricalData/hydra/tree/main/overlay/python/hydra-kernel/src/main/python))
141
141
  — hand-written Python kernel runtime, overlaid onto `dist/python/hydra-kernel/`
142
142
  by `heads/python/bin/copy-kernel-runtime.sh` so the published `hydra-kernel` wheel is self-contained
143
- - `hydra/overlay/python/lib/` — primitive function implementations
144
- - `hydra/overlay/python/dsl/` — DSL utilities (FrozenDict, Maybe, ...)
145
- - `hydra/overlay/python/util/` — `ConsList`, `Lazy`, `PersistentMap`, `PersistentSet`
146
- - `hydra/overlay/python/sources/libraries.py` — primitive registration
143
+ - `hydra/core/overlay/python/lib/` — primitive function implementations
144
+ - `hydra/core/overlay/python/dsl/` — DSL utilities (FrozenDict, Maybe, ...)
145
+ - `hydra/core/overlay/python/util/` — `ConsList`, `Lazy`, `PersistentMap`, `PersistentSet`
146
+ - `hydra/core/overlay/python/sources/libraries.py` — primitive registration
147
147
  - **Python head** ([`heads/python/src/main/python/`](https://github.com/CategoricalData/hydra/tree/main/heads/python/src/main/python))
148
148
  — bootstrap layer above the kernel (`bootstrap.py`, `generation.py`, the `hydra.python` coder
149
149
  package). `pyproject.toml` lives in `heads/python/`.
150
150
 
151
151
  - **Generated Python kernel** ([`dist/python/hydra-kernel/src/main/python/`](https://github.com/CategoricalData/hydra/tree/main/dist/python/hydra-kernel/src/main/python))
152
- - `hydra/core.py` — core types (Term, Type, Literal, ...)
153
- - `hydra/graph.py`, `hydra/packaging.py` — graph and packaging structures
154
- - `hydra/coders.py` — type adapters and coder framework
155
- - `hydra/reduction.py`, `hydra/rewriting.py`, `hydra/hoisting.py` — term transformations
156
- - `hydra/inference.py`, `hydra/checking.py` — type inference and checking
152
+ - `hydra/core/model.py` — core types (Term, Type, Literal, ...)
153
+ - `hydra/core/graph.py`, `hydra/core/packaging.py` — graph and packaging structures
154
+ - `hydra/core/coders.py` — type adapters and coder framework
155
+ - `hydra/core/reduction.py`, `hydra/core/rewriting.py`, `hydra/core/hoisting.py` — term transformations
156
+ - `hydra/core/inference.py`, `hydra/core/checking.py` — type inference and checking
157
157
  - Generated from the kernel DSL sources using the Python coder
158
158
 
159
159
  - **Generated Python test suite** (`dist/python/hydra-kernel/src/test/python/`)
@@ -295,7 +295,7 @@ mirroring [Hydra-Java](https://github.com/CategoricalData/hydra/blob/main/packag
295
295
  dependency-free; callers can pass any compatible collection.
296
296
  - **At the implementation level**, generated term-level literals construct
297
297
  immutable collection classes from
298
- [`hydra.python.util`](https://github.com/CategoricalData/hydra/tree/main/overlay/python/hydra-kernel/src/main/python/hydra/python/util):
298
+ [`hydra.core.overlay.python.util`](https://github.com/CategoricalData/hydra/tree/main/overlay/python/hydra-kernel/src/main/python/hydra/core/overlay/python/util):
299
299
  `ConsList` (a frozen sequence), `PersistentMap` (a frozen map), and
300
300
  `PersistentSet` (a frozen set). Each implements the corresponding
301
301
  `collections.abc` ABC, so `ConsList` IS a `Sequence`, `PersistentMap` IS
@@ -314,14 +314,14 @@ are sorted at extraction time via a fall-through comparator: natural `<`
314
314
  where it works, structural comparison for Hydra `Term`/`Type` and other
315
315
  complex values that don't define ordering in Python.
316
316
 
317
- The classes live under `hydra.python.util` rather than `hydra.core.util` because the
317
+ The classes live under `hydra.core.overlay.python.util` rather than `hydra.core.util` because the
318
318
  latter is already a kernel-generated module (containing `Comparison`,
319
319
  `CaseConvention`, etc.) shared across all Hydra implementations. Putting the
320
- Python-runtime helpers under `hydra.python.util` keeps the kernel namespace
321
- intact while making the host/kernel separation explicit. `hydra.python` itself
322
- is a `pkgutil`-style namespace package so heads-side helpers and the
323
- kernel-generated `hydra.python.{coder,environment,...}` modules coexist
324
- cleanly.
320
+ Python-runtime helpers under `hydra.core.overlay.python.util` keeps the kernel namespace
321
+ intact while making the host/kernel separation explicit. In the Python head, the top-level
322
+ `hydra` package is a `pkgutil`-style namespace package (`extend_path`), so head-side modules
323
+ (e.g. `hydra.bootstrap`, `hydra.generation`) and the generated `hydra.*` modules from other
324
+ source roots coexist cleanly.
325
325
 
326
326
  ## CPython vs PyPy
327
327
 
@@ -337,7 +337,7 @@ Rough guide:
337
337
  |---|---|
338
338
  | `bin/run-bootstrapping-demo.sh` codegen | CPython by ~5% |
339
339
  | Type inference on large modules (`hydra.core.codegen.infer_modules_given`) | PyPy by ~4× |
340
- | `hydra.lib.*` primitive microbenchmarks | CPython by ~2.5× |
340
+ | `hydra.core.lib.*` primitive microbenchmarks | CPython by ~2.5× |
341
341
 
342
342
  The microbench gap reflects CPython's C-level `dict`/`frozenset`/`tuple`
343
343
  operations beating PyPy's pure-Python equivalents. The inference gap reflects
@@ -126,20 +126,20 @@ Hydra's Python code is split across three locations
126
126
  - **Python kernel overlay** ([`overlay/python/hydra-kernel/src/main/python/`](https://github.com/CategoricalData/hydra/tree/main/overlay/python/hydra-kernel/src/main/python))
127
127
  — hand-written Python kernel runtime, overlaid onto `dist/python/hydra-kernel/`
128
128
  by `heads/python/bin/copy-kernel-runtime.sh` so the published `hydra-kernel` wheel is self-contained
129
- - `hydra/overlay/python/lib/` — primitive function implementations
130
- - `hydra/overlay/python/dsl/` — DSL utilities (FrozenDict, Maybe, ...)
131
- - `hydra/overlay/python/util/` — `ConsList`, `Lazy`, `PersistentMap`, `PersistentSet`
132
- - `hydra/overlay/python/sources/libraries.py` — primitive registration
129
+ - `hydra/core/overlay/python/lib/` — primitive function implementations
130
+ - `hydra/core/overlay/python/dsl/` — DSL utilities (FrozenDict, Maybe, ...)
131
+ - `hydra/core/overlay/python/util/` — `ConsList`, `Lazy`, `PersistentMap`, `PersistentSet`
132
+ - `hydra/core/overlay/python/sources/libraries.py` — primitive registration
133
133
  - **Python head** ([`heads/python/src/main/python/`](https://github.com/CategoricalData/hydra/tree/main/heads/python/src/main/python))
134
134
  — bootstrap layer above the kernel (`bootstrap.py`, `generation.py`, the `hydra.python` coder
135
135
  package). `pyproject.toml` lives in `heads/python/`.
136
136
 
137
137
  - **Generated Python kernel** ([`dist/python/hydra-kernel/src/main/python/`](https://github.com/CategoricalData/hydra/tree/main/dist/python/hydra-kernel/src/main/python))
138
- - `hydra/core.py` — core types (Term, Type, Literal, ...)
139
- - `hydra/graph.py`, `hydra/packaging.py` — graph and packaging structures
140
- - `hydra/coders.py` — type adapters and coder framework
141
- - `hydra/reduction.py`, `hydra/rewriting.py`, `hydra/hoisting.py` — term transformations
142
- - `hydra/inference.py`, `hydra/checking.py` — type inference and checking
138
+ - `hydra/core/model.py` — core types (Term, Type, Literal, ...)
139
+ - `hydra/core/graph.py`, `hydra/core/packaging.py` — graph and packaging structures
140
+ - `hydra/core/coders.py` — type adapters and coder framework
141
+ - `hydra/core/reduction.py`, `hydra/core/rewriting.py`, `hydra/core/hoisting.py` — term transformations
142
+ - `hydra/core/inference.py`, `hydra/core/checking.py` — type inference and checking
143
143
  - Generated from the kernel DSL sources using the Python coder
144
144
 
145
145
  - **Generated Python test suite** (`dist/python/hydra-kernel/src/test/python/`)
@@ -281,7 +281,7 @@ mirroring [Hydra-Java](https://github.com/CategoricalData/hydra/blob/main/packag
281
281
  dependency-free; callers can pass any compatible collection.
282
282
  - **At the implementation level**, generated term-level literals construct
283
283
  immutable collection classes from
284
- [`hydra.python.util`](https://github.com/CategoricalData/hydra/tree/main/overlay/python/hydra-kernel/src/main/python/hydra/python/util):
284
+ [`hydra.core.overlay.python.util`](https://github.com/CategoricalData/hydra/tree/main/overlay/python/hydra-kernel/src/main/python/hydra/core/overlay/python/util):
285
285
  `ConsList` (a frozen sequence), `PersistentMap` (a frozen map), and
286
286
  `PersistentSet` (a frozen set). Each implements the corresponding
287
287
  `collections.abc` ABC, so `ConsList` IS a `Sequence`, `PersistentMap` IS
@@ -300,14 +300,14 @@ are sorted at extraction time via a fall-through comparator: natural `<`
300
300
  where it works, structural comparison for Hydra `Term`/`Type` and other
301
301
  complex values that don't define ordering in Python.
302
302
 
303
- The classes live under `hydra.python.util` rather than `hydra.core.util` because the
303
+ The classes live under `hydra.core.overlay.python.util` rather than `hydra.core.util` because the
304
304
  latter is already a kernel-generated module (containing `Comparison`,
305
305
  `CaseConvention`, etc.) shared across all Hydra implementations. Putting the
306
- Python-runtime helpers under `hydra.python.util` keeps the kernel namespace
307
- intact while making the host/kernel separation explicit. `hydra.python` itself
308
- is a `pkgutil`-style namespace package so heads-side helpers and the
309
- kernel-generated `hydra.python.{coder,environment,...}` modules coexist
310
- cleanly.
306
+ Python-runtime helpers under `hydra.core.overlay.python.util` keeps the kernel namespace
307
+ intact while making the host/kernel separation explicit. In the Python head, the top-level
308
+ `hydra` package is a `pkgutil`-style namespace package (`extend_path`), so head-side modules
309
+ (e.g. `hydra.bootstrap`, `hydra.generation`) and the generated `hydra.*` modules from other
310
+ source roots coexist cleanly.
311
311
 
312
312
  ## CPython vs PyPy
313
313
 
@@ -323,7 +323,7 @@ Rough guide:
323
323
  |---|---|
324
324
  | `bin/run-bootstrapping-demo.sh` codegen | CPython by ~5% |
325
325
  | Type inference on large modules (`hydra.core.codegen.infer_modules_given`) | PyPy by ~4× |
326
- | `hydra.lib.*` primitive microbenchmarks | CPython by ~2.5× |
326
+ | `hydra.core.lib.*` primitive microbenchmarks | CPython by ~2.5× |
327
327
 
328
328
  The microbench gap reflects CPython's C-level `dict`/`frozenset`/`tuple`
329
329
  operations beating PyPy's pure-Python equivalents. The inference gap reflects
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "digestFormatVersion": 2,
3
3
  "moduleFormatVersion": 1,
4
- "generator": "5a50491e0397dc38",
4
+ "generator": "8235bf1743f68f2d",
5
5
  "generation": {
6
- "generatorId": "5a50491e0397dc38",
6
+ "generatorId": "8235bf1743f68f2d",
7
7
  "mode": "published",
8
8
  "host": "python",
9
- "hydraVersion": "0.17.7",
10
- "revision": "7bd6abd085-dirty",
11
- "timestamp": "2026-09-30T13:26:02Z"
9
+ "hydraVersion": "0.18.0",
10
+ "revision": "87b6e592d2",
11
+ "timestamp": "2026-11-20T22:16:07Z"
12
12
  },
13
- "selfHash": "00045be951e61f6fb06f7d91520179e9b22a02ea11c69b0e7f46a15b06ce999b",
13
+ "selfHash": "f12cc1412562b20943407399c2c348e63f33c96c2de97acdd0fd5ca3d4b00dcc",
14
14
  "dependencyHashes": [
15
15
  {
16
16
  "key": "hydra-kernel",
17
- "value": "36d7c3d508263ad06f8c13a2ba4a71cc146a96c869d9cb20b5ea6a5b0ce390e8"
17
+ "value": "2c0777fe1b39cc991d64051db1edcf638add29598a2dbe977e727bdab4c1745d"
18
18
  }
19
19
  ],
20
20
  "inputs": [
@@ -22,28 +22,28 @@
22
22
  "key": "hydra.python.coder",
23
23
  "value": {
24
24
  "kind": "other",
25
- "hash": "28992c1cc791e71a55098f8d33eb1bbb0d956222682a8dbf36281470c5686bf9"
25
+ "hash": "68e0e8ed289b4d1be8982b84182b39334470460cd1f3e40791898f6db1340875"
26
26
  }
27
27
  },
28
28
  {
29
29
  "key": "hydra.python.environment",
30
30
  "value": {
31
31
  "kind": "other",
32
- "hash": "83c1208296eab01cfbffc4fc50f6967f552c470c6e01c12801039f2b3b8c2bc0"
32
+ "hash": "e7a1e6190bf231aac5ab1de6b719df1f2c781f2dc08a95f3e0836891c4c5d563"
33
33
  }
34
34
  },
35
35
  {
36
36
  "key": "hydra.python.language",
37
37
  "value": {
38
38
  "kind": "other",
39
- "hash": "3f88fe2e99d10fcfbb3be22daf109c73834b4b4f5c7eceb45dbd166317e8369c"
39
+ "hash": "8129a8977fc86cd4a3e7ba6eeba1eabdedb12f26a0a69c8ddfdbb7461cd20832"
40
40
  }
41
41
  },
42
42
  {
43
43
  "key": "hydra.python.names",
44
44
  "value": {
45
45
  "kind": "other",
46
- "hash": "77a402cd75674e64c0d81900852eb3e08fcc840fe466c5f082b8e9ea416a9f7b"
46
+ "hash": "dfefb02c54bbeda5399f689d213802394e4d9ffab3c03173fb24d7166b7be8e6"
47
47
  }
48
48
  },
49
49
  {
@@ -57,7 +57,7 @@
57
57
  "key": "hydra.python.serde",
58
58
  "value": {
59
59
  "kind": "other",
60
- "hash": "5c2e847814d45febc8224cd3a9c30514da33891f7a3545a3aacb054c5c889d00"
60
+ "hash": "0b6838a85a469ce41d777359f9ae6b1200afaeea10a68b2ed7322496736059c2"
61
61
  }
62
62
  },
63
63
  {
@@ -71,21 +71,21 @@
71
71
  "key": "hydra.python.testing",
72
72
  "value": {
73
73
  "kind": "other",
74
- "hash": "50f9aebc882e20ed00d107c869c449915ba1daa79e946e2eb879250cc08a42ec"
74
+ "hash": "051f52b1143f12d9bab5b691f445448c06a14ae6851e3e00708f49f1bcca1553"
75
75
  }
76
76
  },
77
77
  {
78
78
  "key": "hydra.python.utils",
79
79
  "value": {
80
80
  "kind": "other",
81
- "hash": "c08cab871295e6e1ab911a06199109e60e454e77db3e53f9e11084ba80459ab0"
81
+ "hash": "a907b0696a6c0419765fd533fa17cb7bd9222a3492915a79fac4077a1884d8f6"
82
82
  }
83
83
  },
84
84
  {
85
85
  "key": "jsonContent:hydra/python/coder.json",
86
86
  "value": {
87
87
  "kind": "other",
88
- "hash": "cefe10af40042a2f6c9e2a493cdc66a86fb7b9127317b90f8a5dc289daf4ae43"
88
+ "hash": "a192fe63da3a2fa84b7f737eb5af256cd5781d582d794da0e0e12ad55c6fef8d"
89
89
  }
90
90
  },
91
91
  {
@@ -185,7 +185,7 @@
185
185
  "key": "hydra/python/coder.py",
186
186
  "value": {
187
187
  "kind": "targetFile",
188
- "hash": "72ae97e3cbc247a4945cfd2d9c2592a8c483958202ab3605a5aaed46370507ae"
188
+ "hash": "3e403e390e0da658097052bd9ec7f8bc9fb37af01395ffd49c6a66dd50ec5db1"
189
189
  }
190
190
  },
191
191
  {
@@ -234,7 +234,7 @@
234
234
  "key": "hydra/python/names.py",
235
235
  "value": {
236
236
  "kind": "targetFile",
237
- "hash": "2511e63995887a029b4085282a5b9cb3c79406d2e4339c97d602266e754268d8"
237
+ "hash": "2d9104e3c67b275d65cbef675945772511eef8fd1ace1a275f5f4bd6790da519"
238
238
  }
239
239
  },
240
240
  {
@@ -248,28 +248,28 @@
248
248
  "key": "hydra/python/serde.py",
249
249
  "value": {
250
250
  "kind": "targetFile",
251
- "hash": "ca25d41d0b868e9bfb562952c1be72a527932b9fb03bc3e7e5a6817e6a9a08c1"
251
+ "hash": "b9044e7a56bc8530a9a9a6ca3a45bbd8cd761fc2b47fd497a8ceb9271821fe68"
252
252
  }
253
253
  },
254
254
  {
255
255
  "key": "hydra/python/syntax.py",
256
256
  "value": {
257
257
  "kind": "targetFile",
258
- "hash": "163e955ebe962f50fae41af93e532c7674969e814db050a81559458a80c5b586"
258
+ "hash": "cf47a96b48d08a37bbfd6aa117b55e2d907513f676e384510c9d6ec02cafb6e9"
259
259
  }
260
260
  },
261
261
  {
262
262
  "key": "hydra/python/testing.py",
263
263
  "value": {
264
264
  "kind": "targetFile",
265
- "hash": "f7556b45313a44573d3b9fc27cc794750c944289713a6c51a7c4aad1ebcc7227"
265
+ "hash": "6fd1c72007337e385a8fe3215975f978710a5a541de9f9169dc3bb73b009af13"
266
266
  }
267
267
  },
268
268
  {
269
269
  "key": "hydra/python/utils.py",
270
270
  "value": {
271
271
  "kind": "targetFile",
272
- "hash": "b0ec106c8f9f6c5483f4e752275367722be6d5cb41f2d4d73a01da4a43b66402"
272
+ "hash": "2535f4d115773a75e03ef4d9360222588a41f0ee6475210d03a78feb9d839bfa"
273
273
  }
274
274
  }
275
275
  ]
@@ -13,7 +13,7 @@
13
13
 
14
14
  [project]
15
15
  name = "hydra-python"
16
- version = "0.18.0"
16
+ version = "0.18.1"
17
17
  description = "Python support for Hydra"
18
18
  readme = "README.md"
19
19
  requires-python = ">=3.12"
@@ -22,7 +22,7 @@ authors = [
22
22
  { name = "Joshua Shinavier", email = "josh@fortytwo.net" },
23
23
  ]
24
24
  dependencies = [
25
- "hydra-kernel == 0.18.0",
25
+ "hydra-kernel == 0.18.1",
26
26
  ]
27
27
 
28
28
  [project.urls]