pydpm_xl 0.1.39rc24__tar.gz → 0.1.39rc26__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.
Files changed (102) hide show
  1. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/PKG-INFO +1 -1
  2. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/Utils/ast_serialization.py +40 -44
  3. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/__init__.py +1 -1
  4. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/pydpm_xl.egg-info/PKG-INFO +1 -1
  5. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/pyproject.toml +2 -2
  6. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/LICENSE +0 -0
  7. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/README.md +0 -0
  8. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/AST/ASTConstructor.py +0 -0
  9. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/AST/ASTObjects.py +0 -0
  10. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/AST/ASTTemplate.py +0 -0
  11. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/AST/ASTVisitor.py +0 -0
  12. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/AST/MLGeneration.py +0 -0
  13. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/AST/ModuleAnalyzer.py +0 -0
  14. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/AST/ModuleDependencies.py +0 -0
  15. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/AST/WhereClauseChecker.py +0 -0
  16. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/AST/__init__.py +0 -0
  17. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/AST/check_operands.py +0 -0
  18. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/DataTypes/ScalarTypes.py +0 -0
  19. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/DataTypes/TimeClasses.py +0 -0
  20. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/DataTypes/TypePromotion.py +0 -0
  21. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/DataTypes/__init__.py +0 -0
  22. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/Exceptions/__init__.py +0 -0
  23. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/Exceptions/exceptions.py +0 -0
  24. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/Exceptions/messages.py +0 -0
  25. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/OperationScopes/OperationScopeService.py +0 -0
  26. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/OperationScopes/__init__.py +0 -0
  27. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/Operators/AggregateOperators.py +0 -0
  28. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/Operators/BooleanOperators.py +0 -0
  29. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/Operators/ClauseOperators.py +0 -0
  30. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/Operators/ComparisonOperators.py +0 -0
  31. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/Operators/ConditionalOperators.py +0 -0
  32. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/Operators/NumericOperators.py +0 -0
  33. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/Operators/Operator.py +0 -0
  34. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/Operators/StringOperators.py +0 -0
  35. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/Operators/TimeOperators.py +0 -0
  36. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/Operators/__init__.py +0 -0
  37. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/Utils/ValidationsGenerationUtils.py +0 -0
  38. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/Utils/__init__.py +0 -0
  39. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/Utils/operands_mapping.py +0 -0
  40. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/Utils/operator_mapping.py +0 -0
  41. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/Utils/tokens.py +0 -0
  42. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/Utils/utils.py +0 -0
  43. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/ValidationsGeneration/PropertiesConstraintsProcessor.py +0 -0
  44. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/ValidationsGeneration/Utils.py +0 -0
  45. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/ValidationsGeneration/VariantsProcessor.py +0 -0
  46. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/ValidationsGeneration/__init__.py +0 -0
  47. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/ValidationsGeneration/auxiliary_functions.py +0 -0
  48. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/api/__init__.py +0 -0
  49. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/api/ast_generator.py +0 -0
  50. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/api/complete_ast.py +0 -0
  51. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/api/data_dictionary.py +0 -0
  52. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/api/data_dictionary_validation.py +0 -0
  53. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/api/migration.py +0 -0
  54. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/api/operation_scopes.py +0 -0
  55. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/api/semantic.py +0 -0
  56. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/api/syntax.py +0 -0
  57. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/client.py +0 -0
  58. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/data_handlers.py +0 -0
  59. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/db_utils.py +0 -0
  60. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/grammar/__init__.py +0 -0
  61. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/grammar/dist/__init__.py +0 -0
  62. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/grammar/dist/dpm_xlLexer.interp +0 -0
  63. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/grammar/dist/dpm_xlLexer.py +0 -0
  64. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/grammar/dist/dpm_xlLexer.tokens +0 -0
  65. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/grammar/dist/dpm_xlParser.interp +0 -0
  66. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/grammar/dist/dpm_xlParser.py +0 -0
  67. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/grammar/dist/dpm_xlParser.tokens +0 -0
  68. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/grammar/dist/dpm_xlParserListener.py +0 -0
  69. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/grammar/dist/dpm_xlParserVisitor.py +0 -0
  70. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/grammar/dist/listeners.py +0 -0
  71. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/grammar/dpm_xlLexer.g4 +0 -0
  72. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/grammar/dpm_xlParser.g4 +0 -0
  73. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/migration.py +0 -0
  74. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/models.py +0 -0
  75. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/semantics/DAG/DAGAnalyzer.py +0 -0
  76. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/semantics/DAG/__init__.py +0 -0
  77. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/semantics/SemanticAnalyzer.py +0 -0
  78. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/semantics/Symbols.py +0 -0
  79. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/semantics/__init__.py +0 -0
  80. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/views/data_types.sql +0 -0
  81. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/views/datapoints.sql +0 -0
  82. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/views/hierarchy_operand_reference.sql +0 -0
  83. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/views/hierarchy_preconditions.sql +0 -0
  84. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/views/hierarchy_variables.sql +0 -0
  85. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/views/hierarchy_variables_context.sql +0 -0
  86. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/views/key_components.sql +0 -0
  87. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/views/module_from_table.sql +0 -0
  88. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/views/open_keys.sql +0 -0
  89. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/views/operation_info.sql +0 -0
  90. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/views/operation_list.sql +0 -0
  91. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/views/operations_versions_from_module_version.sql +0 -0
  92. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/views/precondition_info.sql +0 -0
  93. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/views/report_type_operand_reference_info.sql +0 -0
  94. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/views/subcategory_info.sql +0 -0
  95. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/py_dpm/views/table_info.sql +0 -0
  96. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/pydpm_xl.egg-info/SOURCES.txt +0 -0
  97. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/pydpm_xl.egg-info/dependency_links.txt +0 -0
  98. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/pydpm_xl.egg-info/entry_points.txt +0 -0
  99. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/pydpm_xl.egg-info/requires.txt +0 -0
  100. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/pydpm_xl.egg-info/top_level.txt +0 -0
  101. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/setup.cfg +0 -0
  102. {pydpm_xl-0.1.39rc24 → pydpm_xl-0.1.39rc26}/tests/test_semantic_release.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pydpm_xl
3
- Version: 0.1.39rc24
3
+ Version: 0.1.39rc26
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
@@ -190,7 +190,8 @@ class ASTToJSONVisitor(NodeVisitor):
190
190
  entries_by_row[row_code] = []
191
191
  entries_by_row[row_code].append(record)
192
192
 
193
- rows = list(entries_by_row.keys())
193
+ # Sort rows to ensure consistent numerical ordering for x-coordinate calculation
194
+ rows = sorted(entries_by_row.keys())
194
195
 
195
196
  # Helper function to detect range syntax (e.g., '0010-0080')
196
197
  def _has_range_syntax(values):
@@ -211,6 +212,19 @@ class ASTToJSONVisitor(NodeVisitor):
211
212
  if col and col not in seen_cols:
212
213
  context_cols.append(col)
213
214
  seen_cols.add(col)
215
+ # Sort to ensure consistent numerical ordering for y-coordinate calculation
216
+ context_cols.sort()
217
+
218
+ # Build sheet order from data for z-coordinate calculation
219
+ # Extract unique sheets and sort them for consistent ordering
220
+ context_sheets = []
221
+ seen_sheets = set()
222
+ for record in data_records:
223
+ sheet = record.get('sheet_code', '')
224
+ if sheet and sheet not in seen_sheets:
225
+ context_sheets.append(sheet)
226
+ seen_sheets.add(sheet)
227
+ context_sheets.sort()
214
228
 
215
229
  # Transform the data to match expected JSON structure
216
230
  transformed_data = []
@@ -226,45 +240,29 @@ class ASTToJSONVisitor(NodeVisitor):
226
240
  if 'cell_id' in record and record['cell_id'] is not None:
227
241
  transformed_record['operand_reference_id'] = int(record['cell_id'])
228
242
 
229
- # Check if data type is scalar (no x/y/z coordinates)
230
- # Scalar types: b (boolean), s (string), e (enumeration/item)
231
- # Non-scalar types: i, r, m, p (integer, decimal, monetary, percentage)
232
- data_type = record.get('data_type', '')
233
- is_scalar_type = data_type in ['b', 's', 'e']
234
-
235
243
  column_code = record.get('column_code', '')
236
244
  sheet_code = record.get('sheet_code', '')
237
245
 
238
- # Add x/y/z coordinates for non-scalar types only
239
- if not is_scalar_type:
240
- transformed_record['x'] = x_index
241
-
242
- # Find y coordinate based on column position in context
243
- y_index = 1 # default
244
- if context_cols and column_code in context_cols:
245
- y_index = context_cols.index(column_code) + 1
246
- transformed_record['y'] = y_index
247
-
248
- # Add z coordinate if sheet data exists
249
- if sheet_code:
250
- # For now, use a simple index; could be enhanced with sheet position logic
251
- transformed_record['z'] = 1 # This could be enhanced with actual sheet indexing
252
-
253
- # Note: column and row are at VarID level, not in data entries
254
-
255
- # Add additional fields required by ADAM engine
256
- # CRITICAL: data_type determines how the engine processes values
257
- if 'data_type' in record and record['data_type'] is not None:
258
- transformed_record['data_type'] = record['data_type']
259
-
260
- # Add metadata fields (cell_code, table_code, table_vid)
261
- # NOTE: row, column, sheet are NOT included in data - they're at VarID level
262
- if 'cell_code' in record and record['cell_code'] is not None:
263
- transformed_record['cell_code'] = record['cell_code']
264
- if 'table_code' in record and record['table_code'] is not None:
265
- transformed_record['table_code'] = record['table_code']
266
- if 'table_vid' in record and record['table_vid'] is not None:
267
- transformed_record['table_vid'] = int(record['table_vid'])
246
+ # Add x/y/z coordinates for ALL data types
247
+ # Coordinates are added unconditionally, then common ones are removed later
248
+ transformed_record['x'] = x_index
249
+
250
+ # Find y coordinate based on column position in context
251
+ y_index = 1 # default
252
+ if context_cols and column_code in context_cols:
253
+ y_index = context_cols.index(column_code) + 1
254
+ transformed_record['y'] = y_index
255
+
256
+ # Add z coordinate if sheet data exists
257
+ if sheet_code:
258
+ # Find z coordinate based on sheet position in context
259
+ z_index = 1 # default
260
+ if context_sheets and sheet_code in context_sheets:
261
+ z_index = context_sheets.index(sheet_code) + 1
262
+ transformed_record['z'] = z_index
263
+
264
+ # NOTE: data_type, cell_code, table_code, table_vid are NOT included
265
+ # in data entries - working fixtures don't have these fields
268
266
 
269
267
  transformed_data.append(transformed_record)
270
268
 
@@ -302,19 +300,17 @@ class ASTToJSONVisitor(NodeVisitor):
302
300
  'z': 'sheet'
303
301
  }
304
302
 
305
- # Add dimension codes to each data entry
306
- # IMPORTANT: adam-engine requires BOTH row AND column in every data item
307
- # We add all dimension codes (row, column, sheet) when they exist in the original record
308
- # We need to match each transformed record back to its original record
303
+ # Add dimension codes only for VARIABLE coordinates
304
+ # Working fixtures show dimension codes are only included when that dimension varies
305
+ # Example: {c*, s*} with fixed row has y/column, z/sheet but NO x/row
309
306
  record_index = 0
310
307
  for x_index, row_code in enumerate(rows, 1):
311
308
  for original_record in entries_by_row[row_code]:
312
309
  if record_index < len(transformed_data):
313
310
  transformed_record = transformed_data[record_index]
314
311
 
315
- # Add ALL dimension codes (row, column, sheet) to every data item
316
- # This is required by adam-engine even when the coordinate is common
317
- for coord in ['x', 'y', 'z']:
312
+ # Only add dimension codes for VARIABLE coordinates
313
+ for coord in variable_coords:
318
314
  dimension_field = coord_to_dimension[coord]
319
315
  output_field = coord_to_field[coord]
320
316
 
@@ -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.1.39rc24"
44
+ __version__ = "0.1.39rc26"
45
45
  __author__ = "MeaningfulData S.L."
46
46
  __email__ = "info@meaningfuldata.eu"
47
47
  __license__ = "GPL-3.0-or-later"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pydpm_xl
3
- Version: 0.1.39rc24
3
+ Version: 0.1.39rc26
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pydpm_xl"
3
- version = "0.1.39rc24"
3
+ version = "0.1.39rc26"
4
4
  description = "Python library for DPM-XL data processing and analysis"
5
5
  authors = [
6
6
  {name = "MeaningfulData S.L.", email = "info@meaningfuldata.eu"}
@@ -52,7 +52,7 @@ exclude = []
52
52
 
53
53
  [tool.poetry]
54
54
  name = "pydpm_xl"
55
- version = "0.1.39rc24"
55
+ version = "0.1.39rc26"
56
56
  description = "Python library for DPM-XL data processing and analysis"
57
57
  authors = ["MeaningfulData S.L. <info@meaningfuldata.eu>"]
58
58
  readme = "README.md"
File without changes
File without changes
File without changes