hydra-python 0.17.3__tar.gz → 0.17.5__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.3 → hydra_python-0.17.5}/PKG-INFO +3 -3
- hydra_python-0.17.5/build/main/digest.json +123 -0
- {hydra_python-0.17.3 → hydra_python-0.17.5}/pyproject.toml +2 -2
- {hydra_python-0.17.3 → hydra_python-0.17.5}/src/main/python/hydra/dsl/python/environment.py +90 -3
- {hydra_python-0.17.3 → hydra_python-0.17.5}/src/main/python/hydra/dsl/python/names.py +10 -6
- {hydra_python-0.17.3 → hydra_python-0.17.5}/src/main/python/hydra/dsl/python/utils.py +8 -5
- {hydra_python-0.17.3 → hydra_python-0.17.5}/src/main/python/hydra/python/coder.py +113 -72
- {hydra_python-0.17.3 → hydra_python-0.17.5}/src/main/python/hydra/python/environment.py +9 -1
- {hydra_python-0.17.3 → hydra_python-0.17.5}/src/main/python/hydra/python/names.py +25 -15
- {hydra_python-0.17.3 → hydra_python-0.17.5}/src/main/python/hydra/python/serde.py +26 -13
- {hydra_python-0.17.3 → hydra_python-0.17.5}/src/main/python/hydra/python/testing.py +5 -2
- {hydra_python-0.17.3 → hydra_python-0.17.5}/src/main/python/hydra/python/utils.py +14 -12
- hydra_python-0.17.3/build/main/digest.json +0 -55
- {hydra_python-0.17.3 → hydra_python-0.17.5}/.gitignore +0 -0
- {hydra_python-0.17.3 → hydra_python-0.17.5}/LICENSE +0 -0
- {hydra_python-0.17.3 → hydra_python-0.17.5}/NOTICE +0 -0
- {hydra_python-0.17.3 → hydra_python-0.17.5}/README.md +0 -0
- {hydra_python-0.17.3 → hydra_python-0.17.5}/src/main/python/hydra/dsl/python/syntax.py +0 -0
- {hydra_python-0.17.3 → hydra_python-0.17.5}/src/main/python/hydra/python/language.py +0 -0
- {hydra_python-0.17.3 → hydra_python-0.17.5}/src/main/python/hydra/python/pyproject.py +0 -0
- {hydra_python-0.17.3 → hydra_python-0.17.5}/src/main/python/hydra/python/syntax.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: hydra-python
|
|
3
|
-
Version: 0.17.
|
|
3
|
+
Version: 0.17.5
|
|
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.17.
|
|
12
|
+
Requires-Dist: hydra-kernel==0.17.5
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
|
|
15
15
|
# Hydra-Python
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
{
|
|
2
|
+
"digestFormatVersion": 2,
|
|
3
|
+
"moduleFormatVersion": 1,
|
|
4
|
+
"generator": "9de7bd43d8cafa93",
|
|
5
|
+
"generation": {
|
|
6
|
+
"generatorId": "9de7bd43d8cafa93",
|
|
7
|
+
"mode": "published",
|
|
8
|
+
"host": "python",
|
|
9
|
+
"hydraVersion": "0.17.4",
|
|
10
|
+
"revision": "9571823830-dirty",
|
|
11
|
+
"timestamp": "2026-08-19T17:44:59Z"},
|
|
12
|
+
"selfHash": "f628802be436ebb317632a9429323b63f0ae5045bda0ba24aa263ccf2092e014",
|
|
13
|
+
"dependencyHashes": [{"key": "hydra-kernel", "value": "5b5813a6dabbc89ed0e4ddd918744636da84f3542d7961284c423aea53629b02"}],
|
|
14
|
+
"inputs": [
|
|
15
|
+
{
|
|
16
|
+
"key": "hydra.python.coder",
|
|
17
|
+
"value": {"kind": "other", "hash": "0b1e385015be90731b3a461486eec1c2ab2448e1643f3a9e4f1f7427ec0e085a"}},
|
|
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": "5bc2e53c63d41de79877fbe331aada2c7f43175b09d4245b7ac61cf8261b0ca3"}},
|
|
27
|
+
{
|
|
28
|
+
"key": "hydra.python.pyproject",
|
|
29
|
+
"value": {"kind": "other", "hash": "249512648b2b008db234ee348a72056d4d625cfeb0a80d8caacbda95002569a2"}},
|
|
30
|
+
{
|
|
31
|
+
"key": "hydra.python.serde",
|
|
32
|
+
"value": {"kind": "other", "hash": "83e48906bdec70d3d0d427c0e1b02b5e4d08bb172d3f85be13992ef4c1120859"}},
|
|
33
|
+
{
|
|
34
|
+
"key": "hydra.python.syntax",
|
|
35
|
+
"value": {"kind": "other", "hash": "88a9154b48fd429f06efa0ba8981bdf12af3fed4de5a057b3304fadc623dbc19"}},
|
|
36
|
+
{
|
|
37
|
+
"key": "hydra.python.testing",
|
|
38
|
+
"value": {"kind": "other", "hash": "113853c870177388fbcc53800768d872fae34fdbfd1a0e2f30d2b2aefb966451"}},
|
|
39
|
+
{
|
|
40
|
+
"key": "hydra.python.utils",
|
|
41
|
+
"value": {"kind": "other", "hash": "f480bc8a4c39e62ea073357517964a2175e582fd220de0fbc1bc27b9b108d327"}},
|
|
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": "e2f66b5c16393d8050923aab1f832f430334e4bddfc101f4cebc1f158daee01d"}},
|
|
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": "afaa99c99874efa5e02a10973651a7a74ab1089feedb9de0f8a74904a8ec4eb7"}},
|
|
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": "e987b94392abfc72cedc08d2e6b8a4528479a9023c9eff636f8980e9af6e6cfb"}},
|
|
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": "0ef54f39243803add5f5634d67bf8c949d89159b3fc1c4ff82d9cb0bf829f4b9"}},
|
|
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": "eb662817f2e3390220a06eb6eda9cc7adce67d3e22b47f3e2823ab273d688af6"}},
|
|
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": "3e8498f205a99ebfaa570a44ccac515b69ced9d7f3669a32f74d4d05d48204b6"}},
|
|
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": "a783457c64ea85769cd2ab757bd429be4d0c7333ab5765b0c04f3b0bf86b1e80"}},
|
|
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": "b53dbe52de14f67d6a3c74d8f6bd7051fbaa65dbf686362565bb5cda61f15075"}}]}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
[project]
|
|
15
15
|
name = "hydra-python"
|
|
16
|
-
version = "0.17.
|
|
16
|
+
version = "0.17.5"
|
|
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.5",
|
|
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]:
|