hydra-python 0.17.2__tar.gz → 0.17.4__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.
- {hydra_python-0.17.2 → hydra_python-0.17.4}/.gitignore +3 -0
- hydra_python-0.17.2/README.md → hydra_python-0.17.4/PKG-INFO +24 -4
- hydra_python-0.17.2/PKG-INFO → hydra_python-0.17.4/README.md +10 -18
- hydra_python-0.17.4/build/main/digest.json +123 -0
- {hydra_python-0.17.2 → hydra_python-0.17.4}/pyproject.toml +2 -2
- {hydra_python-0.17.2 → hydra_python-0.17.4}/src/main/python/hydra/dsl/python/environment.py +90 -3
- {hydra_python-0.17.2 → hydra_python-0.17.4}/src/main/python/hydra/dsl/python/names.py +10 -6
- {hydra_python-0.17.2 → hydra_python-0.17.4}/src/main/python/hydra/dsl/python/utils.py +8 -5
- {hydra_python-0.17.2 → hydra_python-0.17.4}/src/main/python/hydra/python/coder.py +107 -65
- {hydra_python-0.17.2 → hydra_python-0.17.4}/src/main/python/hydra/python/environment.py +9 -1
- {hydra_python-0.17.2 → hydra_python-0.17.4}/src/main/python/hydra/python/names.py +24 -14
- {hydra_python-0.17.2 → hydra_python-0.17.4}/src/main/python/hydra/python/serde.py +58 -46
- {hydra_python-0.17.2 → hydra_python-0.17.4}/src/main/python/hydra/python/testing.py +19 -16
- {hydra_python-0.17.2 → hydra_python-0.17.4}/src/main/python/hydra/python/utils.py +13 -11
- hydra_python-0.17.2/build/main/digest.json +0 -55
- {hydra_python-0.17.2 → hydra_python-0.17.4}/LICENSE +0 -0
- {hydra_python-0.17.2 → hydra_python-0.17.4}/NOTICE +0 -0
- {hydra_python-0.17.2 → hydra_python-0.17.4}/src/main/python/hydra/dsl/python/syntax.py +0 -0
- {hydra_python-0.17.2 → hydra_python-0.17.4}/src/main/python/hydra/python/language.py +0 -0
- {hydra_python-0.17.2 → hydra_python-0.17.4}/src/main/python/hydra/python/pyproject.py +0 -0
- {hydra_python-0.17.2 → hydra_python-0.17.4}/src/main/python/hydra/python/syntax.py +0 -0
|
@@ -147,3 +147,6 @@ claude-hydra-messages/
|
|
|
147
147
|
# survey/ff/bootstrap watchers). These are dot-prefixed .sh under claude/;
|
|
148
148
|
# the tracked claude/ content is the .md protocol docs, never dot-.sh scripts.
|
|
149
149
|
claude/.*.sh
|
|
150
|
+
|
|
151
|
+
# Backed-up branch plan documents (not release content)
|
|
152
|
+
finalized-task-plans/
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: hydra-python
|
|
3
|
+
Version: 0.17.4
|
|
4
|
+
Summary: Python support for Hydra
|
|
5
|
+
Project-URL: Homepage, https://github.com/CategoricalData/hydra
|
|
6
|
+
Project-URL: Repository, https://github.com/CategoricalData/hydra
|
|
7
|
+
Author-email: Joshua Shinavier <josh@fortytwo.net>
|
|
8
|
+
License: Apache-2.0
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
License-File: NOTICE
|
|
11
|
+
Requires-Python: >=3.12
|
|
12
|
+
Requires-Dist: hydra-kernel==0.17.4
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
|
|
1
15
|
# Hydra-Python
|
|
2
16
|
|
|
3
17
|
This package contains the **Python coder DSL sources**: Python modules that describe
|
|
@@ -11,6 +25,12 @@ Hydra is a type-aware data transformation toolkit which aims to be highly flexib
|
|
|
11
25
|
It has its roots in graph databases and type theory, and provides APIs in Haskell, Java, Python, Scala, TypeScript, and Lisp.
|
|
12
26
|
See the main Hydra [README](https://github.com/CategoricalData/hydra) for more details.
|
|
13
27
|
|
|
28
|
+
📖 **API documentation:** Sphinx-generated API docs for the Python packages are published at the
|
|
29
|
+
[Hydra Python API index](https://categoricaldata.net/hydra/python/sphinx/)
|
|
30
|
+
(individual packages: [hydra-kernel](https://categoricaldata.net/hydra/python/sphinx/hydra-kernel/),
|
|
31
|
+
[hydra-rdf](https://categoricaldata.net/hydra/python/sphinx/hydra-rdf/),
|
|
32
|
+
[hydra-pg](https://categoricaldata.net/hydra/python/sphinx/hydra-pg/)).
|
|
33
|
+
|
|
14
34
|
## Getting started
|
|
15
35
|
|
|
16
36
|
Hydra-Python requires Python 3.12 or later.
|
|
@@ -120,10 +140,10 @@ Hydra's Python code is split across three locations
|
|
|
120
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))
|
|
121
141
|
— hand-written Python kernel runtime, overlaid onto `dist/python/hydra-kernel/`
|
|
122
142
|
by `heads/python/bin/copy-kernel-runtime.sh` so the published `hydra-kernel` wheel is self-contained
|
|
123
|
-
- `hydra/lib/` — primitive function implementations
|
|
124
|
-
- `hydra/dsl/` — DSL utilities (FrozenDict, Maybe, ...)
|
|
125
|
-
- `hydra/python/util/` — `ConsList`, `Lazy`, `PersistentMap`, `PersistentSet`
|
|
126
|
-
- `hydra/sources/libraries.py` — primitive registration
|
|
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
|
|
127
147
|
- **Python head** ([`heads/python/src/main/python/`](https://github.com/CategoricalData/hydra/tree/main/heads/python/src/main/python))
|
|
128
148
|
— bootstrap layer above the kernel (`bootstrap.py`, `generation.py`, the `hydra.python` coder
|
|
129
149
|
package). `pyproject.toml` lives in `heads/python/`.
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: hydra-python
|
|
3
|
-
Version: 0.17.2
|
|
4
|
-
Summary: Python support for Hydra
|
|
5
|
-
Project-URL: Homepage, https://github.com/CategoricalData/hydra
|
|
6
|
-
Project-URL: Repository, https://github.com/CategoricalData/hydra
|
|
7
|
-
Author-email: Joshua Shinavier <josh@fortytwo.net>
|
|
8
|
-
License: Apache-2.0
|
|
9
|
-
License-File: LICENSE
|
|
10
|
-
License-File: NOTICE
|
|
11
|
-
Requires-Python: >=3.12
|
|
12
|
-
Requires-Dist: hydra-kernel==0.17.2
|
|
13
|
-
Description-Content-Type: text/markdown
|
|
14
|
-
|
|
15
1
|
# Hydra-Python
|
|
16
2
|
|
|
17
3
|
This package contains the **Python coder DSL sources**: Python modules that describe
|
|
@@ -25,6 +11,12 @@ Hydra is a type-aware data transformation toolkit which aims to be highly flexib
|
|
|
25
11
|
It has its roots in graph databases and type theory, and provides APIs in Haskell, Java, Python, Scala, TypeScript, and Lisp.
|
|
26
12
|
See the main Hydra [README](https://github.com/CategoricalData/hydra) for more details.
|
|
27
13
|
|
|
14
|
+
📖 **API documentation:** Sphinx-generated API docs for the Python packages are published at the
|
|
15
|
+
[Hydra Python API index](https://categoricaldata.net/hydra/python/sphinx/)
|
|
16
|
+
(individual packages: [hydra-kernel](https://categoricaldata.net/hydra/python/sphinx/hydra-kernel/),
|
|
17
|
+
[hydra-rdf](https://categoricaldata.net/hydra/python/sphinx/hydra-rdf/),
|
|
18
|
+
[hydra-pg](https://categoricaldata.net/hydra/python/sphinx/hydra-pg/)).
|
|
19
|
+
|
|
28
20
|
## Getting started
|
|
29
21
|
|
|
30
22
|
Hydra-Python requires Python 3.12 or later.
|
|
@@ -134,10 +126,10 @@ Hydra's Python code is split across three locations
|
|
|
134
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))
|
|
135
127
|
— hand-written Python kernel runtime, overlaid onto `dist/python/hydra-kernel/`
|
|
136
128
|
by `heads/python/bin/copy-kernel-runtime.sh` so the published `hydra-kernel` wheel is self-contained
|
|
137
|
-
- `hydra/lib/` — primitive function implementations
|
|
138
|
-
- `hydra/dsl/` — DSL utilities (FrozenDict, Maybe, ...)
|
|
139
|
-
- `hydra/python/util/` — `ConsList`, `Lazy`, `PersistentMap`, `PersistentSet`
|
|
140
|
-
- `hydra/sources/libraries.py` — primitive registration
|
|
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
|
|
141
133
|
- **Python head** ([`heads/python/src/main/python/`](https://github.com/CategoricalData/hydra/tree/main/heads/python/src/main/python))
|
|
142
134
|
— bootstrap layer above the kernel (`bootstrap.py`, `generation.py`, the `hydra.python` coder
|
|
143
135
|
package). `pyproject.toml` lives in `heads/python/`.
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
{
|
|
2
|
+
"digestFormatVersion": 2,
|
|
3
|
+
"moduleFormatVersion": 1,
|
|
4
|
+
"generator": "2c0ecf5e44272577",
|
|
5
|
+
"generation": {
|
|
6
|
+
"generatorId": "2c0ecf5e44272577",
|
|
7
|
+
"mode": "published",
|
|
8
|
+
"host": "python",
|
|
9
|
+
"hydraVersion": "0.17.3",
|
|
10
|
+
"revision": "39f38e98ce",
|
|
11
|
+
"timestamp": "2026-08-10T00:06:14Z"},
|
|
12
|
+
"selfHash": "979ad9fa2784665ae8639c0a37ac80ed296d12c8524c0766c21cd7a8802e2965",
|
|
13
|
+
"dependencyHashes": [{"key": "hydra-kernel", "value": "2af6a4dff2fbf02f4859ca5f0c222c44c9ab9ce5345d26abcf7c6e39f90b5bcb"}],
|
|
14
|
+
"inputs": [
|
|
15
|
+
{
|
|
16
|
+
"key": "hydra.python.coder",
|
|
17
|
+
"value": {"kind": "other", "hash": "33c5deb31968c9c0d41834301852b38d617cdcf7453d0115b75e693c8683401a"}},
|
|
18
|
+
{
|
|
19
|
+
"key": "hydra.python.environment",
|
|
20
|
+
"value": {"kind": "other", "hash": "663b02271ddd4a6ad9ab8a2bdc152a64802a675a59280909f605d6dedcc4017e"}},
|
|
21
|
+
{
|
|
22
|
+
"key": "hydra.python.language",
|
|
23
|
+
"value": {"kind": "other", "hash": "78fb867a1d0fa6654f46f5d9fd72c2c5607d2934b7c7fbd5f5d830786b4ad91e"}},
|
|
24
|
+
{
|
|
25
|
+
"key": "hydra.python.names",
|
|
26
|
+
"value": {"kind": "other", "hash": "87bfa00de69547fcb4a14b69a56be98d3f612dcd52b76063153365c375ce91e4"}},
|
|
27
|
+
{
|
|
28
|
+
"key": "hydra.python.pyproject",
|
|
29
|
+
"value": {"kind": "other", "hash": "249512648b2b008db234ee348a72056d4d625cfeb0a80d8caacbda95002569a2"}},
|
|
30
|
+
{
|
|
31
|
+
"key": "hydra.python.serde",
|
|
32
|
+
"value": {"kind": "other", "hash": "9285fa0296e940da1de51a53465598455c46404851aefc2ce15220fc6ee7efc6"}},
|
|
33
|
+
{
|
|
34
|
+
"key": "hydra.python.syntax",
|
|
35
|
+
"value": {"kind": "other", "hash": "88a9154b48fd429f06efa0ba8981bdf12af3fed4de5a057b3304fadc623dbc19"}},
|
|
36
|
+
{
|
|
37
|
+
"key": "hydra.python.testing",
|
|
38
|
+
"value": {"kind": "other", "hash": "a40b949c594c81f8925ba423a89e46964b2b1475d44a486aa07c792c2c7f807b"}},
|
|
39
|
+
{
|
|
40
|
+
"key": "hydra.python.utils",
|
|
41
|
+
"value": {"kind": "other", "hash": "b026355e1174d4573e14ee1a932a17e1d28cef3559f2f85a330d279b543598a3"}},
|
|
42
|
+
{
|
|
43
|
+
"key": "jsonContent:hydra/dsl/python/environment.json",
|
|
44
|
+
"value": {"kind": "other", "hash": "684965cea67ad57d492b50f408c6575f679b073c5de5e76826fb0941da86ec21"}},
|
|
45
|
+
{
|
|
46
|
+
"key": "jsonContent:hydra/dsl/python/names.json",
|
|
47
|
+
"value": {"kind": "other", "hash": "2118b0194fde923feeda9877728e6a50813601ad5892dc122f3cf577e35bff6f"}},
|
|
48
|
+
{
|
|
49
|
+
"key": "jsonContent:hydra/dsl/python/syntax.json",
|
|
50
|
+
"value": {"kind": "other", "hash": "a99b94b1f3e542d606da15fd6dafa32d858ce7d71ba02f7b21d8bb4881daa4e3"}},
|
|
51
|
+
{
|
|
52
|
+
"key": "jsonContent:hydra/dsl/python/utils.json",
|
|
53
|
+
"value": {"kind": "other", "hash": "7a3b84d522c420db0db03a77f9e54635b33544f73eb49ed67cdc3a4d5dac04ae"}},
|
|
54
|
+
{
|
|
55
|
+
"key": "jsonContent:hydra/python/coder.json",
|
|
56
|
+
"value": {"kind": "other", "hash": "ec4263eccf7a8dd826d44cea6aa4fc112cf7a6eda6c4d1ffd54cda0387e60729"}},
|
|
57
|
+
{
|
|
58
|
+
"key": "jsonContent:hydra/python/environment.json",
|
|
59
|
+
"value": {"kind": "other", "hash": "889380dd3664c763437475b2e5146b38f865f4a20a308332633a33a4d038fce1"}},
|
|
60
|
+
{
|
|
61
|
+
"key": "jsonContent:hydra/python/language.json",
|
|
62
|
+
"value": {"kind": "other", "hash": "221e68d68030945db181fdd079be4ff619cb4cd1ad5d4b72b4e70f2aa1bd5230"}},
|
|
63
|
+
{
|
|
64
|
+
"key": "jsonContent:hydra/python/names.json",
|
|
65
|
+
"value": {"kind": "other", "hash": "7af58464067c990f8acdeb9399a217ee8b345e712927619b163eb18a1fd18a4a"}},
|
|
66
|
+
{
|
|
67
|
+
"key": "jsonContent:hydra/python/pyproject.json",
|
|
68
|
+
"value": {"kind": "other", "hash": "c94de46f1615e6e82d2f706d01ef04293373f6241a9a42882bb394d51b4f7f53"}},
|
|
69
|
+
{
|
|
70
|
+
"key": "jsonContent:hydra/python/serde.json",
|
|
71
|
+
"value": {"kind": "other", "hash": "648d34f63d2336972d5e0a59d4871332a07bd35c88eb38c28236e16a7fd48601"}},
|
|
72
|
+
{
|
|
73
|
+
"key": "jsonContent:hydra/python/syntax.json",
|
|
74
|
+
"value": {"kind": "other", "hash": "8dc3a26ac927fa338b273c9deee6317906977a2deec4c2df1e44ff0bbe0a64cd"}},
|
|
75
|
+
{
|
|
76
|
+
"key": "jsonContent:hydra/python/testing.json",
|
|
77
|
+
"value": {"kind": "other", "hash": "9c75b534004194396935b1dd3331bae4d8d5cbb31c3959fa3794dda00960c09a"}},
|
|
78
|
+
{
|
|
79
|
+
"key": "jsonContent:hydra/python/utils.json",
|
|
80
|
+
"value": {"kind": "other", "hash": "9fe5863fa3b3fb7b87b97041336ac5ff947f69e9bc7a8c2667f0bfc217bed724"}},
|
|
81
|
+
{
|
|
82
|
+
"key": "jsonContent:manifest.json",
|
|
83
|
+
"value": {"kind": "other", "hash": "3f94b521766d042381d7bee84596308ea4e35c7e8fb45f8fd8338a8dbe27a0ac"}}],
|
|
84
|
+
"outputs": [
|
|
85
|
+
{
|
|
86
|
+
"key": "hydra/dsl/python/environment.py",
|
|
87
|
+
"value": {"kind": "targetFile", "hash": "17b22fcaf759f776c959d41a749f506ff3c302815791e189a506c3f1af344f2c"}},
|
|
88
|
+
{
|
|
89
|
+
"key": "hydra/dsl/python/names.py",
|
|
90
|
+
"value": {"kind": "targetFile", "hash": "c571b01c5d149d3e6f587ef4524c5b065dae0ffba1b44617197f68fc1a6122fb"}},
|
|
91
|
+
{
|
|
92
|
+
"key": "hydra/dsl/python/syntax.py",
|
|
93
|
+
"value": {"kind": "targetFile", "hash": "5fe1c0c739cdac68d1b90d768153e23ebe7c805bafb96ac698a95425e2d7d7b5"}},
|
|
94
|
+
{
|
|
95
|
+
"key": "hydra/dsl/python/utils.py",
|
|
96
|
+
"value": {"kind": "targetFile", "hash": "3fed9996a3f875a53675b6c8620884949adf7d155b0e68cacfba9007d5d07b29"}},
|
|
97
|
+
{
|
|
98
|
+
"key": "hydra/python/coder.py",
|
|
99
|
+
"value": {"kind": "targetFile", "hash": "5dc0e92942be490ab049f187918a038b39c40ded8975445966c626eae6f32753"}},
|
|
100
|
+
{
|
|
101
|
+
"key": "hydra/python/environment.py",
|
|
102
|
+
"value": {"kind": "targetFile", "hash": "1036eb9d285ba3e98c85095820f2e77900334340c9f0223fd4dfd6b3e847f4df"}},
|
|
103
|
+
{
|
|
104
|
+
"key": "hydra/python/language.py",
|
|
105
|
+
"value": {"kind": "targetFile", "hash": "7ea0c3a6015ec1de92aebeed0963c1af9f3b70c8d57815e477c528c795383604"}},
|
|
106
|
+
{
|
|
107
|
+
"key": "hydra/python/names.py",
|
|
108
|
+
"value": {"kind": "targetFile", "hash": "13c7f477a13848ed7636bf773aac098599466964c2db5c35472f53b1152b05a2"}},
|
|
109
|
+
{
|
|
110
|
+
"key": "hydra/python/pyproject.py",
|
|
111
|
+
"value": {"kind": "targetFile", "hash": "1f9001d8d2273d4783105e099b874c273ce520b58456f9b447cb8d5e9a6a37d7"}},
|
|
112
|
+
{
|
|
113
|
+
"key": "hydra/python/serde.py",
|
|
114
|
+
"value": {"kind": "targetFile", "hash": "43864d35b843e14c2ee78fc5ee22e88f61d049ace6d9e951d34dbdfa242662f9"}},
|
|
115
|
+
{
|
|
116
|
+
"key": "hydra/python/syntax.py",
|
|
117
|
+
"value": {"kind": "targetFile", "hash": "24a72af882b47d80cc930f16f51a3e9c1a71c9d8da47a921829f40e847459fca"}},
|
|
118
|
+
{
|
|
119
|
+
"key": "hydra/python/testing.py",
|
|
120
|
+
"value": {"kind": "targetFile", "hash": "069c706253e0c41695c8becd42c27c84b7f6ac54b14be14975757ff09416ba92"}},
|
|
121
|
+
{
|
|
122
|
+
"key": "hydra/python/utils.py",
|
|
123
|
+
"value": {"kind": "targetFile", "hash": "7264b5ca536314e0523ccf46f069ab06dea099d68b2c3459d58ab2c989dc51c6"}}]}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
[project]
|
|
15
15
|
name = "hydra-python"
|
|
16
|
-
version = "0.17.
|
|
16
|
+
version = "0.17.4"
|
|
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.17.
|
|
25
|
+
"hydra-kernel == 0.17.4",
|
|
26
26
|
]
|
|
27
27
|
|
|
28
28
|
[project.urls]
|
|
@@ -68,7 +68,8 @@ graph: hydra.typed.TypedTerm[hydra.graph.Graph],
|
|
|
68
68
|
nullary_bindings: hydra.typed.TypedTerm[Set[hydra.core.Name]],
|
|
69
69
|
version: hydra.typed.TypedTerm[hydra.python.environment.PythonVersion],
|
|
70
70
|
skip_casts: hydra.typed.TypedTerm[bool],
|
|
71
|
-
inline_variables: hydra.typed.TypedTerm[Set[hydra.core.Name]]
|
|
71
|
+
inline_variables: hydra.typed.TypedTerm[Set[hydra.core.Name]],
|
|
72
|
+
overlay_subs: hydra.typed.TypedTerm[Set[str]]) -> hydra.typed.TypedTerm[hydra.python.environment.PythonEnvironment]:
|
|
72
73
|
r"""DSL constructor for hydra.python.environment.PythonEnvironment."""
|
|
73
74
|
|
|
74
75
|
return hydra.typed.TypedTerm(cast(hydra.core.Term,
|
|
@@ -79,7 +80,8 @@ inline_variables: hydra.typed.TypedTerm[Set[hydra.core.Name]]) -> hydra.typed.Ty
|
|
|
79
80
|
hydra.core.Field(hydra.core.Name("nullaryBindings"), nullary_bindings.value),
|
|
80
81
|
hydra.core.Field(hydra.core.Name("version"), version.value),
|
|
81
82
|
hydra.core.Field(hydra.core.Name("skipCasts"), skip_casts.value),
|
|
82
|
-
hydra.core.Field(hydra.core.Name("inlineVariables"), inline_variables.value)
|
|
83
|
+
hydra.core.Field(hydra.core.Name("inlineVariables"), inline_variables.value),
|
|
84
|
+
hydra.core.Field(hydra.core.Name("overlaySubs"), overlay_subs.value))))))
|
|
83
85
|
|
|
84
86
|
def python_environment_bound_type_variables(x: hydra.typed.TypedTerm[hydra.python.environment.PythonEnvironment]) -> hydra.typed.TypedTerm[tuple[Sequence[hydra.core.Name], Mapping[hydra.core.Name, hydra.python.syntax.Name]]]:
|
|
85
87
|
r"""DSL accessor for the boundTypeVariables field of hydra.python.environment.PythonEnvironment."""
|
|
@@ -121,6 +123,14 @@ def python_environment_nullary_bindings(x: hydra.typed.TypedTerm[hydra.python.en
|
|
|
121
123
|
hydra.core.TermProject(hydra.core.Projection(hydra.core.Name("hydra.python.environment.PythonEnvironment"), hydra.core.Name("nullaryBindings")))),
|
|
122
124
|
x.value))))
|
|
123
125
|
|
|
126
|
+
def python_environment_overlay_subs(x: hydra.typed.TypedTerm[hydra.python.environment.PythonEnvironment]) -> hydra.typed.TypedTerm[Set[str]]:
|
|
127
|
+
r"""DSL accessor for the overlaySubs field of hydra.python.environment.PythonEnvironment."""
|
|
128
|
+
|
|
129
|
+
return hydra.typed.TypedTerm(cast(hydra.core.Term,
|
|
130
|
+
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term,
|
|
131
|
+
hydra.core.TermProject(hydra.core.Projection(hydra.core.Name("hydra.python.environment.PythonEnvironment"), hydra.core.Name("overlaySubs")))),
|
|
132
|
+
x.value))))
|
|
133
|
+
|
|
124
134
|
# DSL name token for hydra.python.environment.PythonEnvironment.
|
|
125
135
|
python_environment_python_environment = hydra.typed.TypedName(hydra.core.Name("hydra.python.environment.PythonEnvironment"))
|
|
126
136
|
|
|
@@ -176,6 +186,11 @@ new_val: hydra.typed.TypedTerm[tuple[Sequence[hydra.core.Name], Mapping[hydra.co
|
|
|
176
186
|
cast(hydra.core.Term,
|
|
177
187
|
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term,
|
|
178
188
|
hydra.core.TermProject(hydra.core.Projection(hydra.core.Name("hydra.python.environment.PythonEnvironment"), hydra.core.Name("inlineVariables")))),
|
|
189
|
+
original.value)))),
|
|
190
|
+
hydra.core.Field(hydra.core.Name("overlaySubs"),
|
|
191
|
+
cast(hydra.core.Term,
|
|
192
|
+
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term,
|
|
193
|
+
hydra.core.TermProject(hydra.core.Projection(hydra.core.Name("hydra.python.environment.PythonEnvironment"), hydra.core.Name("overlaySubs")))),
|
|
179
194
|
original.value)))))))))
|
|
180
195
|
|
|
181
196
|
def python_environment_with_graph(original: hydra.typed.TypedTerm[hydra.python.environment.PythonEnvironment],
|
|
@@ -214,6 +229,11 @@ new_val: hydra.typed.TypedTerm[hydra.graph.Graph]) -> hydra.typed.TypedTerm[hydr
|
|
|
214
229
|
cast(hydra.core.Term,
|
|
215
230
|
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term,
|
|
216
231
|
hydra.core.TermProject(hydra.core.Projection(hydra.core.Name("hydra.python.environment.PythonEnvironment"), hydra.core.Name("inlineVariables")))),
|
|
232
|
+
original.value)))),
|
|
233
|
+
hydra.core.Field(hydra.core.Name("overlaySubs"),
|
|
234
|
+
cast(hydra.core.Term,
|
|
235
|
+
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term,
|
|
236
|
+
hydra.core.TermProject(hydra.core.Projection(hydra.core.Name("hydra.python.environment.PythonEnvironment"), hydra.core.Name("overlaySubs")))),
|
|
217
237
|
original.value)))))))))
|
|
218
238
|
|
|
219
239
|
def python_environment_with_inline_variables(original: hydra.typed.TypedTerm[hydra.python.environment.PythonEnvironment],
|
|
@@ -252,7 +272,12 @@ new_val: hydra.typed.TypedTerm[Set[hydra.core.Name]]) -> hydra.typed.TypedTerm[h
|
|
|
252
272
|
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term,
|
|
253
273
|
hydra.core.TermProject(hydra.core.Projection(hydra.core.Name("hydra.python.environment.PythonEnvironment"), hydra.core.Name("skipCasts")))),
|
|
254
274
|
original.value)))),
|
|
255
|
-
hydra.core.Field(hydra.core.Name("inlineVariables"), new_val.value)
|
|
275
|
+
hydra.core.Field(hydra.core.Name("inlineVariables"), new_val.value),
|
|
276
|
+
hydra.core.Field(hydra.core.Name("overlaySubs"),
|
|
277
|
+
cast(hydra.core.Term,
|
|
278
|
+
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term,
|
|
279
|
+
hydra.core.TermProject(hydra.core.Projection(hydra.core.Name("hydra.python.environment.PythonEnvironment"), hydra.core.Name("overlaySubs")))),
|
|
280
|
+
original.value)))))))))
|
|
256
281
|
|
|
257
282
|
def python_environment_with_namespaces(original: hydra.typed.TypedTerm[hydra.python.environment.PythonEnvironment],
|
|
258
283
|
new_val: hydra.typed.TypedTerm[hydra.util.ModuleNames[hydra.python.syntax.DottedName]]) -> hydra.typed.TypedTerm[hydra.python.environment.PythonEnvironment]:
|
|
@@ -290,6 +315,11 @@ new_val: hydra.typed.TypedTerm[hydra.util.ModuleNames[hydra.python.syntax.Dotted
|
|
|
290
315
|
cast(hydra.core.Term,
|
|
291
316
|
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term,
|
|
292
317
|
hydra.core.TermProject(hydra.core.Projection(hydra.core.Name("hydra.python.environment.PythonEnvironment"), hydra.core.Name("inlineVariables")))),
|
|
318
|
+
original.value)))),
|
|
319
|
+
hydra.core.Field(hydra.core.Name("overlaySubs"),
|
|
320
|
+
cast(hydra.core.Term,
|
|
321
|
+
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term,
|
|
322
|
+
hydra.core.TermProject(hydra.core.Projection(hydra.core.Name("hydra.python.environment.PythonEnvironment"), hydra.core.Name("overlaySubs")))),
|
|
293
323
|
original.value)))))))))
|
|
294
324
|
|
|
295
325
|
def python_environment_with_nullary_bindings(original: hydra.typed.TypedTerm[hydra.python.environment.PythonEnvironment],
|
|
@@ -328,8 +358,55 @@ new_val: hydra.typed.TypedTerm[Set[hydra.core.Name]]) -> hydra.typed.TypedTerm[h
|
|
|
328
358
|
cast(hydra.core.Term,
|
|
329
359
|
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term,
|
|
330
360
|
hydra.core.TermProject(hydra.core.Projection(hydra.core.Name("hydra.python.environment.PythonEnvironment"), hydra.core.Name("inlineVariables")))),
|
|
361
|
+
original.value)))),
|
|
362
|
+
hydra.core.Field(hydra.core.Name("overlaySubs"),
|
|
363
|
+
cast(hydra.core.Term,
|
|
364
|
+
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term,
|
|
365
|
+
hydra.core.TermProject(hydra.core.Projection(hydra.core.Name("hydra.python.environment.PythonEnvironment"), hydra.core.Name("overlaySubs")))),
|
|
331
366
|
original.value)))))))))
|
|
332
367
|
|
|
368
|
+
def python_environment_with_overlay_subs(original: hydra.typed.TypedTerm[hydra.python.environment.PythonEnvironment], new_val: hydra.typed.TypedTerm[Set[str]]) -> hydra.typed.TypedTerm[hydra.python.environment.PythonEnvironment]:
|
|
369
|
+
r"""DSL updater for the overlaySubs field of hydra.python.environment.PythonEnvironment."""
|
|
370
|
+
|
|
371
|
+
return hydra.typed.TypedTerm(cast(hydra.core.Term,
|
|
372
|
+
hydra.core.TermRecord(hydra.core.Record(hydra.core.Name("hydra.python.environment.PythonEnvironment"),
|
|
373
|
+
ConsList.of(hydra.core.Field(hydra.core.Name("namespaces"),
|
|
374
|
+
cast(hydra.core.Term,
|
|
375
|
+
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term,
|
|
376
|
+
hydra.core.TermProject(hydra.core.Projection(hydra.core.Name("hydra.python.environment.PythonEnvironment"), hydra.core.Name("namespaces")))),
|
|
377
|
+
original.value)))),
|
|
378
|
+
hydra.core.Field(hydra.core.Name("boundTypeVariables"),
|
|
379
|
+
cast(hydra.core.Term,
|
|
380
|
+
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term,
|
|
381
|
+
hydra.core.TermProject(hydra.core.Projection(hydra.core.Name("hydra.python.environment.PythonEnvironment"), hydra.core.Name("boundTypeVariables")))),
|
|
382
|
+
original.value)))),
|
|
383
|
+
hydra.core.Field(hydra.core.Name("graph"),
|
|
384
|
+
cast(hydra.core.Term,
|
|
385
|
+
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term,
|
|
386
|
+
hydra.core.TermProject(hydra.core.Projection(hydra.core.Name("hydra.python.environment.PythonEnvironment"), hydra.core.Name("graph")))),
|
|
387
|
+
original.value)))),
|
|
388
|
+
hydra.core.Field(hydra.core.Name("nullaryBindings"),
|
|
389
|
+
cast(hydra.core.Term,
|
|
390
|
+
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term,
|
|
391
|
+
hydra.core.TermProject(hydra.core.Projection(hydra.core.Name("hydra.python.environment.PythonEnvironment"), hydra.core.Name("nullaryBindings")))),
|
|
392
|
+
original.value)))),
|
|
393
|
+
hydra.core.Field(hydra.core.Name("version"),
|
|
394
|
+
cast(hydra.core.Term,
|
|
395
|
+
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term,
|
|
396
|
+
hydra.core.TermProject(hydra.core.Projection(hydra.core.Name("hydra.python.environment.PythonEnvironment"), hydra.core.Name("version")))),
|
|
397
|
+
original.value)))),
|
|
398
|
+
hydra.core.Field(hydra.core.Name("skipCasts"),
|
|
399
|
+
cast(hydra.core.Term,
|
|
400
|
+
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term,
|
|
401
|
+
hydra.core.TermProject(hydra.core.Projection(hydra.core.Name("hydra.python.environment.PythonEnvironment"), hydra.core.Name("skipCasts")))),
|
|
402
|
+
original.value)))),
|
|
403
|
+
hydra.core.Field(hydra.core.Name("inlineVariables"),
|
|
404
|
+
cast(hydra.core.Term,
|
|
405
|
+
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term,
|
|
406
|
+
hydra.core.TermProject(hydra.core.Projection(hydra.core.Name("hydra.python.environment.PythonEnvironment"), hydra.core.Name("inlineVariables")))),
|
|
407
|
+
original.value)))),
|
|
408
|
+
hydra.core.Field(hydra.core.Name("overlaySubs"), new_val.value))))))
|
|
409
|
+
|
|
333
410
|
def python_environment_with_skip_casts(original: hydra.typed.TypedTerm[hydra.python.environment.PythonEnvironment], new_val: hydra.typed.TypedTerm[bool]) -> hydra.typed.TypedTerm[hydra.python.environment.PythonEnvironment]:
|
|
334
411
|
r"""DSL updater for the skipCasts field of hydra.python.environment.PythonEnvironment."""
|
|
335
412
|
|
|
@@ -365,6 +442,11 @@ def python_environment_with_skip_casts(original: hydra.typed.TypedTerm[hydra.pyt
|
|
|
365
442
|
cast(hydra.core.Term,
|
|
366
443
|
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term,
|
|
367
444
|
hydra.core.TermProject(hydra.core.Projection(hydra.core.Name("hydra.python.environment.PythonEnvironment"), hydra.core.Name("inlineVariables")))),
|
|
445
|
+
original.value)))),
|
|
446
|
+
hydra.core.Field(hydra.core.Name("overlaySubs"),
|
|
447
|
+
cast(hydra.core.Term,
|
|
448
|
+
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term,
|
|
449
|
+
hydra.core.TermProject(hydra.core.Projection(hydra.core.Name("hydra.python.environment.PythonEnvironment"), hydra.core.Name("overlaySubs")))),
|
|
368
450
|
original.value)))))))))
|
|
369
451
|
|
|
370
452
|
def python_environment_with_version(original: hydra.typed.TypedTerm[hydra.python.environment.PythonEnvironment],
|
|
@@ -403,6 +485,11 @@ new_val: hydra.typed.TypedTerm[hydra.python.environment.PythonVersion]) -> hydra
|
|
|
403
485
|
cast(hydra.core.Term,
|
|
404
486
|
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term,
|
|
405
487
|
hydra.core.TermProject(hydra.core.Projection(hydra.core.Name("hydra.python.environment.PythonEnvironment"), hydra.core.Name("inlineVariables")))),
|
|
488
|
+
original.value)))),
|
|
489
|
+
hydra.core.Field(hydra.core.Name("overlaySubs"),
|
|
490
|
+
cast(hydra.core.Term,
|
|
491
|
+
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term,
|
|
492
|
+
hydra.core.TermProject(hydra.core.Projection(hydra.core.Name("hydra.python.environment.PythonEnvironment"), hydra.core.Name("overlaySubs")))),
|
|
406
493
|
original.value)))))))))
|
|
407
494
|
|
|
408
495
|
def python_module_metadata(namespaces: hydra.typed.TypedTerm[hydra.util.ModuleNames[hydra.python.syntax.DottedName]],
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
r"""DSL functions for hydra.python.names."""
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
|
-
from collections.abc import Callable, Mapping
|
|
6
|
+
from collections.abc import Callable, Mapping, Set
|
|
7
7
|
from functools import lru_cache
|
|
8
|
-
from hydra.overlay.python.util import Lazy, PersistentMap
|
|
8
|
+
from hydra.overlay.python.util import Lazy, PersistentMap, PersistentSet
|
|
9
9
|
from typing import TypeVar, cast
|
|
10
10
|
import hydra.core
|
|
11
11
|
import hydra.typed
|
|
@@ -78,19 +78,23 @@ def encode_namespace(arg0: hydra.typed.TypedTerm[hydra.packaging.ModuleName]) ->
|
|
|
78
78
|
return hydra.typed.TypedTerm(cast(hydra.core.Term,
|
|
79
79
|
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term, hydra.core.TermVariable(hydra.core.Name("hydra.python.names.encodeNamespace"))), arg0.value))))
|
|
80
80
|
|
|
81
|
-
def encode_namespace_string_with_overrides(arg0: hydra.typed.TypedTerm[hydra.packaging.ModuleName]) -> hydra.typed.TypedTerm[str]:
|
|
81
|
+
def encode_namespace_string_with_overrides(arg0: hydra.typed.TypedTerm[Set[str]], arg1: hydra.typed.TypedTerm[hydra.packaging.ModuleName]) -> hydra.typed.TypedTerm[str]:
|
|
82
82
|
r"""DSL reference to hydra.python.names.encodeNamespaceStringWithOverrides."""
|
|
83
83
|
|
|
84
84
|
return hydra.typed.TypedTerm(cast(hydra.core.Term,
|
|
85
|
+
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term,
|
|
85
86
|
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term, hydra.core.TermVariable(hydra.core.Name("hydra.python.names.encodeNamespaceStringWithOverrides"))),
|
|
86
|
-
arg0.value)))
|
|
87
|
+
arg0.value))),
|
|
88
|
+
arg1.value))))
|
|
87
89
|
|
|
88
|
-
def encode_namespace_with_overrides(arg0: hydra.typed.TypedTerm[hydra.packaging.ModuleName]) -> hydra.typed.TypedTerm[hydra.python.syntax.DottedName]:
|
|
90
|
+
def encode_namespace_with_overrides(arg0: hydra.typed.TypedTerm[Set[str]], arg1: hydra.typed.TypedTerm[hydra.packaging.ModuleName]) -> hydra.typed.TypedTerm[hydra.python.syntax.DottedName]:
|
|
89
91
|
r"""DSL reference to hydra.python.names.encodeNamespaceWithOverrides."""
|
|
90
92
|
|
|
91
93
|
return hydra.typed.TypedTerm(cast(hydra.core.Term,
|
|
94
|
+
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term,
|
|
92
95
|
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term, hydra.core.TermVariable(hydra.core.Name("hydra.python.names.encodeNamespaceWithOverrides"))),
|
|
93
|
-
arg0.value)))
|
|
96
|
+
arg0.value))),
|
|
97
|
+
arg1.value))))
|
|
94
98
|
|
|
95
99
|
def encode_type_variable(arg0: hydra.typed.TypedTerm[hydra.core.Name]) -> hydra.typed.TypedTerm[hydra.python.syntax.Name]:
|
|
96
100
|
r"""DSL reference to hydra.python.names.encodeTypeVariable."""
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
r"""DSL functions for hydra.python.utils."""
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
|
-
from collections.abc import Callable, Sequence
|
|
6
|
+
from collections.abc import Callable, Sequence, Set
|
|
7
7
|
from functools import lru_cache
|
|
8
8
|
from hydra.overlay.python.dsl.python import Optional
|
|
9
|
-
from hydra.overlay.python.util import ConsList, Lazy
|
|
9
|
+
from hydra.overlay.python.util import ConsList, Lazy, PersistentSet
|
|
10
10
|
from typing import TypeVar, cast
|
|
11
11
|
import hydra.core
|
|
12
12
|
import hydra.typed
|
|
@@ -113,14 +113,17 @@ def double_quoted_string(arg0: hydra.typed.TypedTerm[str]) -> hydra.typed.TypedT
|
|
|
113
113
|
return hydra.typed.TypedTerm(cast(hydra.core.Term,
|
|
114
114
|
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term, hydra.core.TermVariable(hydra.core.Name("hydra.python.utils.doubleQuotedString"))), arg0.value))))
|
|
115
115
|
|
|
116
|
-
def find_namespaces(arg0: hydra.typed.TypedTerm[
|
|
117
|
-
arg1: hydra.typed.TypedTerm[
|
|
116
|
+
def find_namespaces(arg0: hydra.typed.TypedTerm[Set[str]],
|
|
117
|
+
arg1: hydra.typed.TypedTerm[hydra.packaging.ModuleName],
|
|
118
|
+
arg2: hydra.typed.TypedTerm[Sequence[hydra.packaging.Definition]]) -> hydra.typed.TypedTerm[hydra.util.ModuleNames[hydra.python.syntax.DottedName]]:
|
|
118
119
|
r"""DSL reference to hydra.python.utils.findNamespaces."""
|
|
119
120
|
|
|
120
121
|
return hydra.typed.TypedTerm(cast(hydra.core.Term,
|
|
121
122
|
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term,
|
|
123
|
+
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term,
|
|
122
124
|
hydra.core.TermApplication(hydra.core.Application(cast(hydra.core.Term, hydra.core.TermVariable(hydra.core.Name("hydra.python.utils.findNamespaces"))), arg0.value))),
|
|
123
|
-
arg1.value)))
|
|
125
|
+
arg1.value))),
|
|
126
|
+
arg2.value))))
|
|
124
127
|
|
|
125
128
|
def function_call(arg0: hydra.typed.TypedTerm[hydra.python.syntax.Primary],
|
|
126
129
|
arg1: hydra.typed.TypedTerm[Sequence[hydra.python.syntax.Expression]]) -> hydra.typed.TypedTerm[hydra.python.syntax.Expression]:
|