pytrilogy 0.0.3.78__py3-none-any.whl → 0.0.3.80__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 pytrilogy might be problematic. Click here for more details.
- {pytrilogy-0.0.3.78.dist-info → pytrilogy-0.0.3.80.dist-info}/METADATA +1 -1
- {pytrilogy-0.0.3.78.dist-info → pytrilogy-0.0.3.80.dist-info}/RECORD +11 -11
- trilogy/__init__.py +1 -1
- trilogy/core/functions.py +1 -0
- trilogy/core/models/environment.py +2 -3
- trilogy/core/processing/node_generators/basic_node.py +9 -2
- trilogy/parsing/parse_engine.py +5 -5
- {pytrilogy-0.0.3.78.dist-info → pytrilogy-0.0.3.80.dist-info}/WHEEL +0 -0
- {pytrilogy-0.0.3.78.dist-info → pytrilogy-0.0.3.80.dist-info}/entry_points.txt +0 -0
- {pytrilogy-0.0.3.78.dist-info → pytrilogy-0.0.3.80.dist-info}/licenses/LICENSE.md +0 -0
- {pytrilogy-0.0.3.78.dist-info → pytrilogy-0.0.3.80.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
pytrilogy-0.0.3.
|
|
2
|
-
trilogy/__init__.py,sha256=
|
|
1
|
+
pytrilogy-0.0.3.80.dist-info/licenses/LICENSE.md,sha256=5ZRvtTyCCFwz1THxDTjAu3Lidds9WjPvvzgVwPSYNDo,1042
|
|
2
|
+
trilogy/__init__.py,sha256=huHsvMxTqEsRG3KLL_gETa2EIT-un4_yasKk03J5Mgs,303
|
|
3
3
|
trilogy/compiler.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
trilogy/constants.py,sha256=eKb_EJvSqjN9tGbdVEViwdtwwh8fZ3-jpOEDqL71y70,1691
|
|
5
5
|
trilogy/engine.py,sha256=OK2RuqCIUId6yZ5hfF8J1nxGP0AJqHRZiafcowmW0xc,1728
|
|
@@ -16,7 +16,7 @@ trilogy/core/env_processor.py,sha256=pFsxnluKIusGKx1z7tTnfsd_xZcPy9pZDungkjkyvI0
|
|
|
16
16
|
trilogy/core/environment_helpers.py,sha256=VvPIiFemqaLLpIpLIqprfu63K7muZ1YzNg7UZIUph8w,8267
|
|
17
17
|
trilogy/core/ergonomics.py,sha256=e-7gE29vPLFdg0_A1smQ7eOrUwKl5VYdxRSTddHweRA,1631
|
|
18
18
|
trilogy/core/exceptions.py,sha256=jYEduuMehcMkmCpf-OC_taELPZm7qNfeSNzIWkDYScs,707
|
|
19
|
-
trilogy/core/functions.py,sha256=
|
|
19
|
+
trilogy/core/functions.py,sha256=IMMq2xE-HjD9gaez6-otgnHZkLSjnlROzfdgZyUxkpo,30960
|
|
20
20
|
trilogy/core/graph_models.py,sha256=BYhJzHKSgnZHVLJs1CfsgrxTPHqKqPNeA64RlozGY0A,3498
|
|
21
21
|
trilogy/core/internal.py,sha256=wFx4e1I0mtx159YFShSXeUBSQ82NINtAbOI-92RX4i8,2151
|
|
22
22
|
trilogy/core/optimization.py,sha256=ojpn-p79lr03SSVQbbw74iPCyoYpDYBmj1dbZ3oXCjI,8860
|
|
@@ -28,7 +28,7 @@ trilogy/core/models/build.py,sha256=0TRcL__hvajLcpFwYeLjCV35cow5oVPbJHXA3oO09XA,
|
|
|
28
28
|
trilogy/core/models/build_environment.py,sha256=s_C9xAHuD3yZ26T15pWVBvoqvlp2LdZ8yjsv2_HdXLk,5363
|
|
29
29
|
trilogy/core/models/core.py,sha256=q-8ExAaSB3PoSDX2XOqfZ01HBBvT1pZFs7jGg1vZizc,11096
|
|
30
30
|
trilogy/core/models/datasource.py,sha256=wogTevZ-9CyUW2a8gjzqMCieircxi-J5lkI7EOAZnck,9596
|
|
31
|
-
trilogy/core/models/environment.py,sha256=
|
|
31
|
+
trilogy/core/models/environment.py,sha256=0IHSCFf5e5b4LPQN3vmjumtfM1iD1tN4WMoUr0UqxZI,27855
|
|
32
32
|
trilogy/core/models/execute.py,sha256=Erufst3yroU3PgNJMWF5lICm14AkH02laYeesSB01UU,41705
|
|
33
33
|
trilogy/core/optimizations/__init__.py,sha256=YH2-mGXZnVDnBcWVi8vTbrdw7Qs5TivG4h38rH3js_I,290
|
|
34
34
|
trilogy/core/optimizations/base_optimization.py,sha256=gzDOKImoFn36k7XBD3ysEYDnbnb6vdVIztUfFQZsGnM,513
|
|
@@ -43,7 +43,7 @@ trilogy/core/processing/discovery_validation.py,sha256=fGWJmKpgEd1f4RkK-fYOBUT1c
|
|
|
43
43
|
trilogy/core/processing/graph_utils.py,sha256=8QUVrkE9j-9C1AyrCb1nQEh8daCe0u1HuXl-Te85lag,1205
|
|
44
44
|
trilogy/core/processing/utility.py,sha256=xsuVMRFi2nY2So0yohhweI2D92wZVsTpHezS0giM4ck,22583
|
|
45
45
|
trilogy/core/processing/node_generators/__init__.py,sha256=w8TQQgNhyAra6JQHdg1_Ags4BGyxjXYruu6UeC5yOkI,873
|
|
46
|
-
trilogy/core/processing/node_generators/basic_node.py,sha256=
|
|
46
|
+
trilogy/core/processing/node_generators/basic_node.py,sha256=n65myXmg6iOrv1LFvDEfBIcBBIhTBFZ7fOmkzxrR-gs,5462
|
|
47
47
|
trilogy/core/processing/node_generators/common.py,sha256=PdysdroW9DUADP7f5Wv_GKPUyCTROZV1g3L45fawxi8,9443
|
|
48
48
|
trilogy/core/processing/node_generators/filter_node.py,sha256=oRRq2-T3ufgn4D23uQsc58f20eFk-djs4QI3WKA75K8,10908
|
|
49
49
|
trilogy/core/processing/node_generators/group_node.py,sha256=1QJhRxsTklJ5xq8wHlAURZaN9gL9FPpeCa1OJ7IwXnY,6769
|
|
@@ -97,7 +97,7 @@ trilogy/parsing/common.py,sha256=yV1AckK0h8u1OFeGQBTMu-wuW5m63c5CcZuPicsTH_w,306
|
|
|
97
97
|
trilogy/parsing/config.py,sha256=Z-DaefdKhPDmSXLgg5V4pebhSB0h590vI0_VtHnlukI,111
|
|
98
98
|
trilogy/parsing/exceptions.py,sha256=Xwwsv2C9kSNv2q-HrrKC1f60JNHShXcCMzstTSEbiCw,154
|
|
99
99
|
trilogy/parsing/helpers.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
100
|
-
trilogy/parsing/parse_engine.py,sha256=
|
|
100
|
+
trilogy/parsing/parse_engine.py,sha256=xtwWwe7EfYcmt9_lwJ0JH0AhKVcPHty97VJCpyM5beA,78068
|
|
101
101
|
trilogy/parsing/render.py,sha256=HSNntD82GiiwHT-TWPLXAaIMWLYVV5B5zQEsgwrHIBE,19605
|
|
102
102
|
trilogy/parsing/trilogy.lark,sha256=wiGXJdKfPTG7E_XdkN1rf9g9Yy1-UMVAXyTxtrBPm9w,15037
|
|
103
103
|
trilogy/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -110,8 +110,8 @@ trilogy/std/money.preql,sha256=XWwvAV3WxBsHX9zfptoYRnBigcfYwrYtBHXTME0xJuQ,2082
|
|
|
110
110
|
trilogy/std/net.preql,sha256=7l7MqIjs6TDCpO6dBAoNJU81Ex255jZRK36kBgE1GDs,158
|
|
111
111
|
trilogy/std/ranking.preql,sha256=LDoZrYyz4g3xsII9XwXfmstZD-_92i1Eox1UqkBIfi8,83
|
|
112
112
|
trilogy/std/report.preql,sha256=LbV-XlHdfw0jgnQ8pV7acG95xrd1-p65fVpiIc-S7W4,202
|
|
113
|
-
pytrilogy-0.0.3.
|
|
114
|
-
pytrilogy-0.0.3.
|
|
115
|
-
pytrilogy-0.0.3.
|
|
116
|
-
pytrilogy-0.0.3.
|
|
117
|
-
pytrilogy-0.0.3.
|
|
113
|
+
pytrilogy-0.0.3.80.dist-info/METADATA,sha256=7b0Krod3hNbcoOugGJ5MnklYMzmEU3Q7sViBVPxsK3I,9589
|
|
114
|
+
pytrilogy-0.0.3.80.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
115
|
+
pytrilogy-0.0.3.80.dist-info/entry_points.txt,sha256=ewBPU2vLnVexZVnB-NrVj-p3E-4vukg83Zk8A55Wp2w,56
|
|
116
|
+
pytrilogy-0.0.3.80.dist-info/top_level.txt,sha256=cAy__NW_eMAa_yT9UnUNlZLFfxcg6eimUAZ184cdNiE,8
|
|
117
|
+
pytrilogy-0.0.3.80.dist-info/RECORD,,
|
trilogy/__init__.py
CHANGED
trilogy/core/functions.py
CHANGED
|
@@ -227,7 +227,7 @@ class Environment(BaseModel):
|
|
|
227
227
|
alias_origin_lookup: Dict[str, Concept] = Field(default_factory=dict)
|
|
228
228
|
# TODO: support freezing environments to avoid mutation
|
|
229
229
|
frozen: bool = False
|
|
230
|
-
env_file_path: Path | None = None
|
|
230
|
+
env_file_path: Path | str | None = None
|
|
231
231
|
|
|
232
232
|
def freeze(self):
|
|
233
233
|
self.frozen = True
|
|
@@ -281,8 +281,7 @@ class Environment(BaseModel):
|
|
|
281
281
|
)
|
|
282
282
|
self.add_concept(concept)
|
|
283
283
|
|
|
284
|
-
def
|
|
285
|
-
super().__init__(**data)
|
|
284
|
+
def model_post_init(self, context: Any) -> None:
|
|
286
285
|
self._add_path_concepts()
|
|
287
286
|
|
|
288
287
|
@classmethod
|
|
@@ -122,10 +122,11 @@ def gen_basic_node(
|
|
|
122
122
|
parent_node.add_output_concept(concept)
|
|
123
123
|
for x in equivalent_optional:
|
|
124
124
|
parent_node.add_output_concept(x)
|
|
125
|
-
|
|
125
|
+
|
|
126
126
|
logger.info(
|
|
127
127
|
f"{depth_prefix}{LOGGER_PREFIX} Returning basic select for {concept}: output {[x.address for x in parent_node.output_concepts]}"
|
|
128
128
|
)
|
|
129
|
+
targets = [concept] + local_optional + equivalent_optional
|
|
129
130
|
should_hide = [
|
|
130
131
|
x
|
|
131
132
|
for x in parent_node.output_concepts
|
|
@@ -135,8 +136,14 @@ def gen_basic_node(
|
|
|
135
136
|
)
|
|
136
137
|
]
|
|
137
138
|
parent_node.hide_output_concepts(should_hide)
|
|
139
|
+
should_not_hide = [
|
|
140
|
+
x
|
|
141
|
+
for x in parent_node.output_concepts
|
|
142
|
+
if x.address in targets or any(x.address in y.pseudonyms for y in targets)
|
|
143
|
+
]
|
|
144
|
+
parent_node.unhide_output_concepts(should_not_hide)
|
|
138
145
|
|
|
139
146
|
logger.info(
|
|
140
|
-
f"{depth_prefix}{LOGGER_PREFIX} Returning basic select for {concept}: output {[x.address for x in parent_node.output_concepts]}"
|
|
147
|
+
f"{depth_prefix}{LOGGER_PREFIX} Returning basic select for {concept}: output {[x.address for x in parent_node.output_concepts]} hidden {[x for x in parent_node.hidden_concepts]}"
|
|
141
148
|
)
|
|
142
149
|
return parent_node
|
trilogy/parsing/parse_engine.py
CHANGED
|
@@ -2117,14 +2117,14 @@ def inject_context_maker(pos: int, text: str, span: int = 40) -> str:
|
|
|
2117
2117
|
|
|
2118
2118
|
before = text[start:pos].rsplit("\n", 1)[-1]
|
|
2119
2119
|
after = text[pos:end].split("\n", 1)[0]
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2120
|
+
rcap = ""
|
|
2121
|
+
# if it goes beyond the end of text, no ...
|
|
2122
|
+
# if it terminates on a space, no need for ...
|
|
2123
|
+
if not after[-1].isspace() and not (end > len(text)):
|
|
2123
2124
|
rcap = "..."
|
|
2125
|
+
lcap = ""
|
|
2124
2126
|
if start > 0 and not before[0].isspace():
|
|
2125
2127
|
lcap = "..."
|
|
2126
|
-
else:
|
|
2127
|
-
lcap = ""
|
|
2128
2128
|
lpad = " "
|
|
2129
2129
|
rpad = " "
|
|
2130
2130
|
if before.endswith(" "):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|