pytrilogy 0.0.3.92__py3-none-any.whl → 0.0.3.93__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.

@@ -90,9 +90,7 @@ def validate_concepts(v) -> BuildEnvironmentConceptDict:
90
90
  if isinstance(v, BuildEnvironmentConceptDict):
91
91
  return v
92
92
  elif isinstance(v, dict):
93
- return BuildEnvironmentConceptDict(
94
- **{x: BuildConcept.model_validate(y) for x, y in v.items()}
95
- )
93
+ return BuildEnvironmentConceptDict(**{x: y for x, y in v.items()})
96
94
  raise ValueError
97
95
 
98
96
 
@@ -100,9 +98,7 @@ def validate_datasources(v) -> BuildEnvironmentDatasourceDict:
100
98
  if isinstance(v, BuildEnvironmentDatasourceDict):
101
99
  return v
102
100
  elif isinstance(v, dict):
103
- return BuildEnvironmentDatasourceDict(
104
- **{x: BuildDatasource.model_validate(y) for x, y in v.items()}
105
- )
101
+ return BuildEnvironmentDatasourceDict(**{x: y for x, y in v.items()})
106
102
  raise ValueError
107
103
 
108
104
 
@@ -859,7 +859,7 @@ class RecursiveCTE(CTE):
859
859
  ),
860
860
  BuildCaseElse(expr=False),
861
861
  ],
862
- output_datatype=DataType.BOOL,
862
+ output_data_type=DataType.BOOL,
863
863
  output_purpose=Purpose.KEY,
864
864
  ),
865
865
  )
@@ -884,7 +884,7 @@ class RecursiveCTE(CTE):
884
884
  ),
885
885
  BuildCaseElse(expr=False),
886
886
  ],
887
- output_datatype=DataType.BOOL,
887
+ output_data_type=DataType.BOOL,
888
888
  output_purpose=Purpose.KEY,
889
889
  ),
890
890
  )
@@ -909,7 +909,7 @@ class RecursiveCTE(CTE):
909
909
  ),
910
910
  BuildCaseElse(expr=right_recurse_concept),
911
911
  ],
912
- output_datatype=recursive_derived.datatype,
912
+ output_data_type=recursive_derived.datatype,
913
913
  output_purpose=recursive_derived.purpose,
914
914
  ),
915
915
  )
@@ -61,13 +61,13 @@ def gen_group_node(
61
61
 
62
62
  # if the aggregation has a grain, we need to ensure these are the ONLY optional in the output of the select
63
63
  output_concepts = [concept]
64
-
64
+ grain_components = [environment.concepts[c] for c in concept.grain.components]
65
65
  if (
66
66
  concept.grain
67
67
  and len(concept.grain.components) > 0
68
68
  and not concept.grain.abstract
69
69
  ):
70
- grain_components = [environment.concepts[c] for c in concept.grain.components]
70
+
71
71
  parent_concepts += grain_components
72
72
  build_grain_parents = get_aggregate_grain(concept, environment)
73
73
  output_concepts += grain_components
@@ -131,10 +131,6 @@ def gen_group_node(
131
131
  else:
132
132
  parents = []
133
133
 
134
- # the keys we group by
135
- # are what we can use for enrichment
136
- group_key_parents = [environment.concepts[c] for c in concept.grain.components]
137
-
138
134
  group_node = GroupNode(
139
135
  output_concepts=output_concepts,
140
136
  input_concepts=parent_concepts,
@@ -164,7 +160,7 @@ def gen_group_node(
164
160
  )
165
161
  return gen_enrichment_node(
166
162
  group_node,
167
- join_keys=group_key_parents,
163
+ join_keys=grain_components,
168
164
  local_optional=local_optional,
169
165
  environment=environment,
170
166
  g=g,