pydpm_xl 0.2.7__py3-none-any.whl → 0.2.9__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.
- py_dpm/__init__.py +1 -1
- py_dpm/api/__init__.py +3 -9
- py_dpm/api/dpm_xl/__init__.py +3 -12
- py_dpm/api/dpm_xl/ast_generator.py +9 -9
- py_dpm/api/dpm_xl/complete_ast.py +14 -127
- py_dpm/dpm/utils.py +17 -0
- py_dpm/dpm_xl/utils/serialization.py +15 -0
- {pydpm_xl-0.2.7.dist-info → pydpm_xl-0.2.9.dist-info}/METADATA +12 -13
- {pydpm_xl-0.2.7.dist-info → pydpm_xl-0.2.9.dist-info}/RECORD +13 -13
- {pydpm_xl-0.2.7.dist-info → pydpm_xl-0.2.9.dist-info}/WHEEL +0 -0
- {pydpm_xl-0.2.7.dist-info → pydpm_xl-0.2.9.dist-info}/entry_points.txt +0 -0
- {pydpm_xl-0.2.7.dist-info → pydpm_xl-0.2.9.dist-info}/licenses/LICENSE +0 -0
- {pydpm_xl-0.2.7.dist-info → pydpm_xl-0.2.9.dist-info}/top_level.txt +0 -0
py_dpm/__init__.py
CHANGED
|
@@ -41,7 +41,7 @@ Available packages:
|
|
|
41
41
|
- pydpm.api: Main APIs for migration, syntax, and semantic analysis
|
|
42
42
|
"""
|
|
43
43
|
|
|
44
|
-
__version__ = "0.2.
|
|
44
|
+
__version__ = "0.2.9"
|
|
45
45
|
__author__ = "MeaningfulData S.L."
|
|
46
46
|
__email__ = "info@meaningfuldata.eu"
|
|
47
47
|
__license__ = "GPL-3.0-or-later"
|
py_dpm/api/__init__.py
CHANGED
|
@@ -11,10 +11,7 @@ from py_dpm.api.dpm_xl import (
|
|
|
11
11
|
SemanticAPI,
|
|
12
12
|
ASTGeneratorAPI,
|
|
13
13
|
OperationScopesAPI,
|
|
14
|
-
|
|
15
|
-
generate_enriched_ast,
|
|
16
|
-
enrich_ast_with_metadata,
|
|
17
|
-
parse_with_data_fields,
|
|
14
|
+
generate_validations_script,
|
|
18
15
|
)
|
|
19
16
|
|
|
20
17
|
# Import from general DPM API
|
|
@@ -40,9 +37,6 @@ __all__ = [
|
|
|
40
37
|
"SemanticAPI",
|
|
41
38
|
"ASTGeneratorAPI",
|
|
42
39
|
"OperationScopesAPI",
|
|
43
|
-
#
|
|
44
|
-
"
|
|
45
|
-
"generate_enriched_ast",
|
|
46
|
-
"enrich_ast_with_metadata",
|
|
47
|
-
"parse_with_data_fields",
|
|
40
|
+
# Standalone function
|
|
41
|
+
"generate_validations_script",
|
|
48
42
|
]
|
py_dpm/api/dpm_xl/__init__.py
CHANGED
|
@@ -9,13 +9,7 @@ from py_dpm.api.dpm_xl.semantic import SemanticAPI
|
|
|
9
9
|
from py_dpm.api.dpm_xl.ast_generator import ASTGeneratorAPI
|
|
10
10
|
from py_dpm.api.dpm_xl.operation_scopes import OperationScopesAPI
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
from py_dpm.api.dpm_xl.complete_ast import (
|
|
14
|
-
generate_complete_ast,
|
|
15
|
-
generate_enriched_ast,
|
|
16
|
-
enrich_ast_with_metadata,
|
|
17
|
-
parse_with_data_fields,
|
|
18
|
-
)
|
|
12
|
+
from py_dpm.api.dpm_xl.complete_ast import generate_validations_script
|
|
19
13
|
|
|
20
14
|
__all__ = [
|
|
21
15
|
# Class-based APIs
|
|
@@ -23,9 +17,6 @@ __all__ = [
|
|
|
23
17
|
"SemanticAPI",
|
|
24
18
|
"ASTGeneratorAPI",
|
|
25
19
|
"OperationScopesAPI",
|
|
26
|
-
# Standalone
|
|
27
|
-
"
|
|
28
|
-
"generate_enriched_ast",
|
|
29
|
-
"enrich_ast_with_metadata",
|
|
30
|
-
"parse_with_data_fields",
|
|
20
|
+
# Standalone function
|
|
21
|
+
"generate_validations_script",
|
|
31
22
|
]
|
|
@@ -32,7 +32,7 @@ class ASTGeneratorAPI:
|
|
|
32
32
|
- Returns: AST with data fields populated (datapoint IDs, operand references)
|
|
33
33
|
- Use for: AST analysis with complete metadata, matching json_scripts/*.json format
|
|
34
34
|
|
|
35
|
-
3. **
|
|
35
|
+
3. **Validations Script** (generate_validations_script):
|
|
36
36
|
- Requires database connection
|
|
37
37
|
- Extends complete AST with framework structure for execution engines
|
|
38
38
|
- Returns: Engine-ready AST with operations, variables, tables, preconditions sections
|
|
@@ -90,7 +90,7 @@ class ASTGeneratorAPI:
|
|
|
90
90
|
|
|
91
91
|
**What you DON'T get:**
|
|
92
92
|
- Data fields (datapoint IDs, operand references) - use generate_complete_ast()
|
|
93
|
-
- Framework structure - use
|
|
93
|
+
- Framework structure - use generate_validations_script()
|
|
94
94
|
|
|
95
95
|
Args:
|
|
96
96
|
expression: DPM-XL expression string
|
|
@@ -347,7 +347,7 @@ class ASTGeneratorAPI:
|
|
|
347
347
|
return [(expressions, "default_code", None)]
|
|
348
348
|
return expressions
|
|
349
349
|
|
|
350
|
-
def
|
|
350
|
+
def generate_validations_script(
|
|
351
351
|
self,
|
|
352
352
|
expressions: Union[str, List[Tuple[str, str, Optional[str]]]],
|
|
353
353
|
release_code: Optional[str] = None,
|
|
@@ -360,9 +360,9 @@ class ASTGeneratorAPI:
|
|
|
360
360
|
module_version_number: Optional[str] = None,
|
|
361
361
|
) -> Dict[str, Any]:
|
|
362
362
|
"""
|
|
363
|
-
Generate
|
|
363
|
+
Generate validations script with engine-ready AST and framework structure.
|
|
364
364
|
|
|
365
|
-
This
|
|
365
|
+
This method generates the complete validations script by wrapping ASTs in an engine-ready
|
|
366
366
|
framework structure with operations, variables, tables, and preconditions sections.
|
|
367
367
|
This is the format required by business rule execution engines.
|
|
368
368
|
|
|
@@ -370,7 +370,7 @@ class ASTGeneratorAPI:
|
|
|
370
370
|
expression/operation/precondition tuples for generating scripts with multiple operations.
|
|
371
371
|
|
|
372
372
|
**What you get:**
|
|
373
|
-
-
|
|
373
|
+
- Complete AST with data fields PLUS:
|
|
374
374
|
- Framework structure: operations, variables, tables, preconditions
|
|
375
375
|
- Module metadata: version, release info, dates
|
|
376
376
|
- Dependency information (including cross-module dependencies)
|
|
@@ -428,14 +428,14 @@ class ASTGeneratorAPI:
|
|
|
428
428
|
|
|
429
429
|
Example:
|
|
430
430
|
>>> generator = ASTGeneratorAPI(database_path="data.db")
|
|
431
|
-
>>> # Single expression
|
|
432
|
-
>>> result = generator.
|
|
431
|
+
>>> # Single expression
|
|
432
|
+
>>> result = generator.generate_validations_script(
|
|
433
433
|
... "{tF_01.00, r0010, c0010}",
|
|
434
434
|
... release_code="4.2",
|
|
435
435
|
... )
|
|
436
436
|
>>>
|
|
437
437
|
>>> # Multiple expressions with operations and preconditions
|
|
438
|
-
>>> result = generator.
|
|
438
|
+
>>> result = generator.generate_validations_script(
|
|
439
439
|
... [
|
|
440
440
|
... ("{tF_01.00, r0010, c0010} = 0", "v1234_m", None),
|
|
441
441
|
... ("{tF_01.00, r0020, c0010} > 0", "v1235_m", "{v_F_44_04}"),
|
|
@@ -1,85 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""
|
|
3
|
-
|
|
3
|
+
Validations Script API - Generate engine-ready ASTs for validation frameworks.
|
|
4
4
|
|
|
5
|
-
This module provides
|
|
6
|
-
All AST-related functionality is now consolidated in the ASTGeneratorAPI class.
|
|
5
|
+
This module provides a standalone function that delegates to ASTGeneratorAPI.
|
|
7
6
|
|
|
8
|
-
For
|
|
7
|
+
For direct class usage:
|
|
9
8
|
from py_dpm.api.dpm_xl import ASTGeneratorAPI
|
|
10
9
|
|
|
11
10
|
generator = ASTGeneratorAPI(database_path="data.db")
|
|
12
|
-
result = generator.
|
|
11
|
+
result = generator.generate_validations_script(expressions)
|
|
13
12
|
"""
|
|
14
13
|
|
|
15
14
|
from typing import Dict, Any, Optional, List, Union, Tuple
|
|
16
15
|
from py_dpm.api.dpm_xl.ast_generator import ASTGeneratorAPI
|
|
17
16
|
|
|
18
17
|
|
|
19
|
-
def
|
|
20
|
-
expression: str,
|
|
21
|
-
database_path: str = None,
|
|
22
|
-
connection_url: str = None,
|
|
23
|
-
release_id: Optional[int] = None,
|
|
24
|
-
):
|
|
25
|
-
"""
|
|
26
|
-
Generate complete AST with all data fields, exactly like json_scripts examples.
|
|
27
|
-
|
|
28
|
-
This function delegates to ASTGeneratorAPI for backwards compatibility.
|
|
29
|
-
|
|
30
|
-
Args:
|
|
31
|
-
expression: DPM-XL expression string
|
|
32
|
-
database_path: Path to SQLite database file (e.g., "./database.db")
|
|
33
|
-
connection_url: SQLAlchemy connection URL for PostgreSQL (optional)
|
|
34
|
-
release_id: Optional release ID to filter database lookups by specific release.
|
|
35
|
-
If None, uses all available data (release-agnostic).
|
|
36
|
-
|
|
37
|
-
Returns:
|
|
38
|
-
dict with keys:
|
|
39
|
-
success, ast, context, error, data_populated, semantic_result
|
|
40
|
-
"""
|
|
41
|
-
generator = ASTGeneratorAPI(
|
|
42
|
-
database_path=database_path,
|
|
43
|
-
connection_url=connection_url,
|
|
44
|
-
enable_semantic_validation=True
|
|
45
|
-
)
|
|
46
|
-
return generator.generate_complete_ast(expression, release_id=release_id)
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
# Convenience function with cleaner interface
|
|
50
|
-
def parse_with_data_fields(
|
|
51
|
-
expression: str,
|
|
52
|
-
database_path: str = None,
|
|
53
|
-
connection_url: str = None,
|
|
54
|
-
release_id: Optional[int] = None,
|
|
55
|
-
):
|
|
56
|
-
"""
|
|
57
|
-
Simple function to parse expression and get AST with data fields.
|
|
58
|
-
|
|
59
|
-
This function delegates to ASTGeneratorAPI for backwards compatibility.
|
|
60
|
-
|
|
61
|
-
Args:
|
|
62
|
-
expression: DPM-XL expression string
|
|
63
|
-
database_path: Path to SQLite database file
|
|
64
|
-
connection_url: SQLAlchemy connection URL for PostgreSQL (optional)
|
|
65
|
-
release_id: Optional release ID to filter database lookups by specific release.
|
|
66
|
-
If None, uses all available data (release-agnostic).
|
|
67
|
-
|
|
68
|
-
Returns:
|
|
69
|
-
dict: AST dictionary with data fields, or None if failed
|
|
70
|
-
"""
|
|
71
|
-
result = generate_complete_ast(
|
|
72
|
-
expression, database_path, connection_url, release_id=release_id
|
|
73
|
-
)
|
|
74
|
-
return result["ast"] if result["success"] else None
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
# ============================================================================
|
|
78
|
-
# AST Enrichment Functions - Create engine-ready ASTs
|
|
79
|
-
# ============================================================================
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
def generate_enriched_ast(
|
|
18
|
+
def generate_validations_script(
|
|
83
19
|
expressions: Union[str, List[Tuple[str, str, Optional[str]]]],
|
|
84
20
|
database_path: Optional[str] = None,
|
|
85
21
|
connection_url: Optional[str] = None,
|
|
@@ -91,15 +27,15 @@ def generate_enriched_ast(
|
|
|
91
27
|
preferred_module_dependencies: Optional[List[str]] = None,
|
|
92
28
|
) -> Dict[str, Any]:
|
|
93
29
|
"""
|
|
94
|
-
Generate
|
|
30
|
+
Generate validations script with engine-ready AST from DPM-XL expression(s).
|
|
95
31
|
|
|
96
|
-
This function delegates to ASTGeneratorAPI
|
|
32
|
+
This function delegates to ASTGeneratorAPI.generate_validations_script().
|
|
97
33
|
|
|
98
|
-
Supports both single expressions
|
|
99
|
-
|
|
34
|
+
Supports both single expressions and multiple expression/operation/precondition
|
|
35
|
+
tuples for generating scripts with multiple operations.
|
|
100
36
|
|
|
101
37
|
Args:
|
|
102
|
-
expressions: Either a single DPM-XL expression string
|
|
38
|
+
expressions: Either a single DPM-XL expression string,
|
|
103
39
|
or a list of tuples: [(expression, operation_code, precondition), ...].
|
|
104
40
|
Each tuple contains:
|
|
105
41
|
- expression (str): The DPM-XL expression (required)
|
|
@@ -125,15 +61,15 @@ def generate_enriched_ast(
|
|
|
125
61
|
}
|
|
126
62
|
|
|
127
63
|
Example:
|
|
128
|
-
>>> # Single expression
|
|
129
|
-
>>> result =
|
|
64
|
+
>>> # Single expression
|
|
65
|
+
>>> result = generate_validations_script(
|
|
130
66
|
... "{tF_01.00, r0010, c0010}",
|
|
131
67
|
... database_path="data.db",
|
|
132
68
|
... release_code="4.2",
|
|
133
69
|
... )
|
|
134
70
|
>>>
|
|
135
71
|
>>> # Multiple expressions
|
|
136
|
-
>>> result =
|
|
72
|
+
>>> result = generate_validations_script(
|
|
137
73
|
... [
|
|
138
74
|
... ("{tF_01.00, r0010, c0010} = 0", "v1234_m", None),
|
|
139
75
|
... ("{tF_01.00, r0020, c0010} > 0", "v1235_m", "{v_F_44_04}"),
|
|
@@ -148,7 +84,7 @@ def generate_enriched_ast(
|
|
|
148
84
|
connection_url=connection_url,
|
|
149
85
|
enable_semantic_validation=True
|
|
150
86
|
)
|
|
151
|
-
return generator.
|
|
87
|
+
return generator.generate_validations_script(
|
|
152
88
|
expressions=expressions,
|
|
153
89
|
release_code=release_code,
|
|
154
90
|
table_context=table_context,
|
|
@@ -157,52 +93,3 @@ def generate_enriched_ast(
|
|
|
157
93
|
module_code=module_code,
|
|
158
94
|
preferred_module_dependencies=preferred_module_dependencies,
|
|
159
95
|
)
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
def enrich_ast_with_metadata(
|
|
163
|
-
ast_dict: Dict[str, Any],
|
|
164
|
-
expression: str,
|
|
165
|
-
context: Optional[Dict[str, Any]],
|
|
166
|
-
database_path: Optional[str] = None,
|
|
167
|
-
connection_url: Optional[str] = None,
|
|
168
|
-
release_code: Optional[str] = None,
|
|
169
|
-
operation_code: Optional[str] = None,
|
|
170
|
-
precondition: Optional[str] = None,
|
|
171
|
-
release_id: Optional[int] = None,
|
|
172
|
-
primary_module_vid: Optional[int] = None,
|
|
173
|
-
) -> Dict[str, Any]:
|
|
174
|
-
"""
|
|
175
|
-
Add framework structure (operations, variables, tables, preconditions) to complete AST.
|
|
176
|
-
|
|
177
|
-
This function delegates to ASTGeneratorAPI for backwards compatibility.
|
|
178
|
-
|
|
179
|
-
Args:
|
|
180
|
-
ast_dict: Complete AST dictionary (from generate_complete_ast)
|
|
181
|
-
expression: Original DPM-XL expression
|
|
182
|
-
context: Context dict with table, rows, columns, sheets, default, interval
|
|
183
|
-
database_path: Path to SQLite database
|
|
184
|
-
connection_url: PostgreSQL connection URL (takes precedence)
|
|
185
|
-
release_code: DPM release code (e.g., "4.2")
|
|
186
|
-
operation_code: Operation code (defaults to "default_code")
|
|
187
|
-
precondition: Precondition variable reference (e.g., {v_F_44_04})
|
|
188
|
-
release_id: Optional release ID to filter database lookups
|
|
189
|
-
primary_module_vid: Optional module VID of the module being exported
|
|
190
|
-
|
|
191
|
-
Returns:
|
|
192
|
-
dict: Engine-ready AST with framework structure
|
|
193
|
-
"""
|
|
194
|
-
generator = ASTGeneratorAPI(
|
|
195
|
-
database_path=database_path,
|
|
196
|
-
connection_url=connection_url,
|
|
197
|
-
enable_semantic_validation=True
|
|
198
|
-
)
|
|
199
|
-
return generator._enrich_ast_with_metadata(
|
|
200
|
-
ast_dict=ast_dict,
|
|
201
|
-
expression=expression,
|
|
202
|
-
context=context,
|
|
203
|
-
release_code=release_code,
|
|
204
|
-
operation_code=operation_code,
|
|
205
|
-
precondition=precondition,
|
|
206
|
-
release_id=release_id,
|
|
207
|
-
primary_module_vid=primary_module_vid,
|
|
208
|
-
)
|
py_dpm/dpm/utils.py
CHANGED
|
@@ -117,6 +117,13 @@ def create_engine_from_url(connection_url, pool_config=None):
|
|
|
117
117
|
# Detect database type from URL scheme
|
|
118
118
|
is_sqlite = connection_url.startswith("sqlite://")
|
|
119
119
|
|
|
120
|
+
# For PostgreSQL, ensure ISO datestyle if not already set
|
|
121
|
+
# This prevents date parsing errors when PostgreSQL returns dates in locale format
|
|
122
|
+
is_postgres = connection_url.startswith("postgresql://")
|
|
123
|
+
if is_postgres and "datestyle" not in connection_url.lower():
|
|
124
|
+
separator = "&" if "?" in connection_url else "?"
|
|
125
|
+
connection_url = f"{connection_url}{separator}options=-c%20datestyle%3DISO"
|
|
126
|
+
|
|
120
127
|
# For SQLite URLs, always create a fresh engine to avoid
|
|
121
128
|
# surprising cross-test or cross-call state sharing, especially
|
|
122
129
|
# for in-memory databases. For server-based databases, reuse the
|
|
@@ -167,6 +174,14 @@ def create_engine_object(url):
|
|
|
167
174
|
# Detect database type from URL scheme (not from environment variables)
|
|
168
175
|
is_sqlite = url_str.startswith("sqlite://")
|
|
169
176
|
|
|
177
|
+
# For PostgreSQL, ensure ISO datestyle if not already set
|
|
178
|
+
# This prevents date parsing errors when PostgreSQL returns dates in locale format
|
|
179
|
+
is_postgres = url_str.startswith("postgresql://")
|
|
180
|
+
if is_postgres and "datestyle" not in url_str.lower():
|
|
181
|
+
separator = "&" if "?" in url_str else "?"
|
|
182
|
+
url_str = f"{url_str}{separator}options=-c%20datestyle%3DISO"
|
|
183
|
+
url = url_str # Use modified URL for engine creation
|
|
184
|
+
|
|
170
185
|
# Only reuse engines for non-SQLite URLs. SQLite (especially in-memory)
|
|
171
186
|
# should create independent engines to avoid leaking state between calls.
|
|
172
187
|
if not is_sqlite and engine is not None and _current_engine_url == url_str:
|
|
@@ -230,6 +245,7 @@ def get_engine(owner=None, database_path=None, connection_url=None, pool_config=
|
|
|
230
245
|
port = db_port or "5432"
|
|
231
246
|
connection_url = (
|
|
232
247
|
f"postgresql://{db_user}:{db_password}@{db_host}:{port}/{db_name}"
|
|
248
|
+
"?options=-c%20datestyle%3DISO"
|
|
233
249
|
)
|
|
234
250
|
return create_engine_object(connection_url)
|
|
235
251
|
else:
|
|
@@ -277,6 +293,7 @@ def get_engine(owner=None, database_path=None, connection_url=None, pool_config=
|
|
|
277
293
|
connection_url = (
|
|
278
294
|
f"postgresql://{postgres_user}:{postgres_pass}@"
|
|
279
295
|
f"{postgres_host}:{postgres_port}/{postgres_db}"
|
|
296
|
+
"?options=-c%20datestyle%3DISO"
|
|
280
297
|
)
|
|
281
298
|
return create_engine_object(connection_url)
|
|
282
299
|
|
|
@@ -452,6 +452,21 @@ class ASTToJSONVisitor(NodeVisitor):
|
|
|
452
452
|
'shift_number': node.shift_number
|
|
453
453
|
}
|
|
454
454
|
|
|
455
|
+
def visit_RenameOp(self, node):
|
|
456
|
+
"""Visit RenameOp nodes and serialize as RenameClauseOp."""
|
|
457
|
+
return {
|
|
458
|
+
'class_name': 'RenameClauseOp',
|
|
459
|
+
'operand': self.visit(node.operand),
|
|
460
|
+
'clauses': [self._serialize_rename_node(rn) for rn in node.rename_nodes]
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
def _serialize_rename_node(self, node):
|
|
464
|
+
"""Serialize a RenameNode as a clause dictionary."""
|
|
465
|
+
return {
|
|
466
|
+
'from_component': node.old_name,
|
|
467
|
+
'to_component': node.new_name
|
|
468
|
+
}
|
|
469
|
+
|
|
455
470
|
def visit_PreconditionItem(self, node):
|
|
456
471
|
"""Visit PreconditionItem nodes."""
|
|
457
472
|
result = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pydpm_xl
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.9
|
|
4
4
|
Summary: Python library for DPM-XL data processing and analysis
|
|
5
5
|
Author-email: "MeaningfulData S.L." <info@meaningfuldata.eu>
|
|
6
6
|
License: GPL-3.0-or-later
|
|
@@ -210,22 +210,21 @@ else:
|
|
|
210
210
|
print(f"Error: {result.error}")
|
|
211
211
|
```
|
|
212
212
|
|
|
213
|
-
####
|
|
213
|
+
#### Validations Script Generation
|
|
214
214
|
|
|
215
215
|
```python
|
|
216
|
-
from py_dpm.api import
|
|
216
|
+
from py_dpm.api import generate_validations_script
|
|
217
217
|
|
|
218
|
-
# Generate
|
|
219
|
-
result =
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
218
|
+
# Generate engine-ready validations script
|
|
219
|
+
result = generate_validations_script(
|
|
220
|
+
"{tT_01.00, r0010, c0010}",
|
|
221
|
+
database_path="data.db",
|
|
222
|
+
release_code="4.2"
|
|
223
|
+
)
|
|
224
|
+
if result["success"]:
|
|
225
|
+
print(f"Enriched AST: {result['enriched_ast']}")
|
|
223
226
|
else:
|
|
224
|
-
print(f"
|
|
225
|
-
|
|
226
|
-
# Generate enriched AST (ready for execution engine)
|
|
227
|
-
enriched = generate_enriched_ast("{tT_01.00, r0010, c0010}", release_id=123)
|
|
228
|
-
print(f"Enriched AST: {enriched}")
|
|
227
|
+
print(f"Error: {result['error']}")
|
|
229
228
|
```
|
|
230
229
|
|
|
231
230
|
#### Migration
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
py_dpm/__init__.py,sha256=
|
|
2
|
-
py_dpm/api/__init__.py,sha256=
|
|
1
|
+
py_dpm/__init__.py,sha256=UebIlIJlsFPrSAjcWcWrZjKo17MDQ2MIFWV2pjJMbq8,1858
|
|
2
|
+
py_dpm/api/__init__.py,sha256=bPWo4KWW99GmGkQbq0yQ3_tbTxvidEVVrWmcDXWz-xA,828
|
|
3
3
|
py_dpm/api/dpm/__init__.py,sha256=HQflgiRbs1eDi3KTadNhxS1NoaG6PGQDVMvFnuIEfXo,506
|
|
4
4
|
py_dpm/api/dpm/data_dictionary.py,sha256=q6w_5bFdc6WPd5Z601PpDaCcnIw39CnI4wdby3GJmFU,29893
|
|
5
5
|
py_dpm/api/dpm/explorer.py,sha256=xgrSdh2D83RivypF26WWo20rbQifYBEH7PXvINoi07Y,10861
|
|
6
6
|
py_dpm/api/dpm/hierarchical_queries.py,sha256=X4AbpsWy3iItOTVIdVbtaTmRgOHPf0Y64Ig-_377uns,4054
|
|
7
7
|
py_dpm/api/dpm/instance.py,sha256=v3DWzdaM5gPCecLjwjZ49FGfqZzUR3dPC0U8zGwdttk,3795
|
|
8
8
|
py_dpm/api/dpm/migration.py,sha256=9FT7zzz4QdUIRR6MD01gMODBtfq9HH_RF4hRgZqMcZc,2404
|
|
9
|
-
py_dpm/api/dpm_xl/__init__.py,sha256=
|
|
10
|
-
py_dpm/api/dpm_xl/ast_generator.py,sha256=
|
|
11
|
-
py_dpm/api/dpm_xl/complete_ast.py,sha256=
|
|
9
|
+
py_dpm/api/dpm_xl/__init__.py,sha256=SOsCtwxuCkFQIdYoTcU6tVJdK1j96dPF4ZQpr8okLPc,576
|
|
10
|
+
py_dpm/api/dpm_xl/ast_generator.py,sha256=kBU4GMJNCDaJQ8_9H-xuTpRPuIxA6wFlFh1AvV0saEU,94941
|
|
11
|
+
py_dpm/api/dpm_xl/complete_ast.py,sha256=jjn9tsns4X7EN4RV5mFh5DRxxZfBOuX2b1wic4oB_ls,3967
|
|
12
12
|
py_dpm/api/dpm_xl/operation_scopes.py,sha256=v2t3f2-AiF39hspNtpf_PA94T69JqbymFK9a5hpckRs,48831
|
|
13
13
|
py_dpm/api/dpm_xl/semantic.py,sha256=Ddmh2Wj_iXIpQZ4jCjqOI-6ddFCquaO9RTu6W9i1Rts,13968
|
|
14
14
|
py_dpm/api/dpm_xl/syntax.py,sha256=Ke_kKd9ModoJ6siL3GPT9j9QClmopryCRcdDAT3M5-E,5954
|
|
@@ -18,7 +18,7 @@ py_dpm/cli/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
|
|
|
18
18
|
py_dpm/dpm/__init__.py,sha256=moagUo5Gxf24-Tl9FL_3n2wmVoD_oXtpC-YIGktH_rc,212
|
|
19
19
|
py_dpm/dpm/migration.py,sha256=ivO_ObvKzVomTns6qfo-o5FuciWxkXbMd_gJ4_tu7Xc,14110
|
|
20
20
|
py_dpm/dpm/models.py,sha256=Rt1b8zOSayXd9KhwyfkGJVhCai3YxUakmLYgwaiICWA,135660
|
|
21
|
-
py_dpm/dpm/utils.py,sha256=
|
|
21
|
+
py_dpm/dpm/utils.py,sha256=3w06_kKiFRPqHvRUfN_0nNQIpppfidFybdDge97qzI0,14918
|
|
22
22
|
py_dpm/dpm/queries/base.py,sha256=EddMeJMwtp63DyyIFO7_XxGvdlCtJQWWpeOVImlKp4I,3648
|
|
23
23
|
py_dpm/dpm/queries/basic_objects.py,sha256=JOXC235lMDfVENrFAhZAl7_nqePJ4RrwJhFF0WDyk0M,955
|
|
24
24
|
py_dpm/dpm/queries/explorer_queries.py,sha256=HcLfwpdGWX-q-i1L-7W0nwTxL_0OiDliqPUeoZ9zHZ4,17453
|
|
@@ -69,16 +69,16 @@ py_dpm/dpm_xl/utils/data_handlers.py,sha256=a0E-IaP_-CDKLcj-Gt2ggAziKIOUiwnT2D9I
|
|
|
69
69
|
py_dpm/dpm_xl/utils/operands_mapping.py,sha256=LG0hPlUuTM2X2uWOtiD6HkmNeDEJkWJ8gV-Fxej_8QM,2241
|
|
70
70
|
py_dpm/dpm_xl/utils/operator_mapping.py,sha256=BFgbVbSCSuutFNHJ4gtgm5VuG38pcl8Kmfi-sefg6JU,1913
|
|
71
71
|
py_dpm/dpm_xl/utils/scopes_calculator.py,sha256=do_emsUqD1TbrjguKlOOqFleaVhxzqm-NnlgdrdIb6I,20906
|
|
72
|
-
py_dpm/dpm_xl/utils/serialization.py,sha256=
|
|
72
|
+
py_dpm/dpm_xl/utils/serialization.py,sha256=4ZBHIP-67_19QSxqzkv8GPh3RNJ861if26GKbV9Bxj8,33088
|
|
73
73
|
py_dpm/dpm_xl/utils/tokens.py,sha256=VRIrPDi5ttwgH-on5Qt4-l4ho4bLA755-nfTalponcA,3496
|
|
74
74
|
py_dpm/exceptions/__init__.py,sha256=yDERfUxYW7NUUEiTQChGpuJx6abr7IDe2XUpwVFPtvM,416
|
|
75
75
|
py_dpm/exceptions/exceptions.py,sha256=6S3p-_i5O1oStvSMixt_JQG0xwTeSfBcdzrwL8yBy6Q,2413
|
|
76
76
|
py_dpm/exceptions/messages.py,sha256=UwY6QIK8c-POcDCc9HYbZFGArCIYAanUGNh2LNKPx3U,7534
|
|
77
77
|
py_dpm/instance/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
78
78
|
py_dpm/instance/instance.py,sha256=gRSg2dh1nEa0Srx9yKcN3bxiYidvZyRU_jsTNaKkP5I,10882
|
|
79
|
-
pydpm_xl-0.2.
|
|
80
|
-
pydpm_xl-0.2.
|
|
81
|
-
pydpm_xl-0.2.
|
|
82
|
-
pydpm_xl-0.2.
|
|
83
|
-
pydpm_xl-0.2.
|
|
84
|
-
pydpm_xl-0.2.
|
|
79
|
+
pydpm_xl-0.2.9.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
80
|
+
pydpm_xl-0.2.9.dist-info/METADATA,sha256=_mvGUc4MEE6EeZDgllAD8p4KtB7QSRX9rw-mh0Cj1M4,9153
|
|
81
|
+
pydpm_xl-0.2.9.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
82
|
+
pydpm_xl-0.2.9.dist-info/entry_points.txt,sha256=6DDmBfw-AjtgvMHgq_I730i_LAAs_7-N3C95HD_bRr4,47
|
|
83
|
+
pydpm_xl-0.2.9.dist-info/top_level.txt,sha256=495PvWZRoKl2NvbQU25W7dqWIBHqY-mFMPt83uxPpcM,7
|
|
84
|
+
pydpm_xl-0.2.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|