exstruct 0.5.1__tar.gz → 0.5.2__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 (60) hide show
  1. {exstruct-0.5.1 → exstruct-0.5.2}/PKG-INFO +9 -4
  2. {exstruct-0.5.1 → exstruct-0.5.2}/README.md +8 -3
  3. {exstruct-0.5.1 → exstruct-0.5.2}/pyproject.toml +4 -4
  4. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/op_schema.py +10 -3
  5. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/patch/internal.py +641 -28
  6. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/patch/models.py +71 -11
  7. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/patch/service.py +27 -17
  8. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/server.py +2 -0
  9. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/shared/output_path.py +8 -1
  10. {exstruct-0.5.1 → exstruct-0.5.2}/LICENSE +0 -0
  11. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/__init__.py +0 -0
  12. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/cli/availability.py +0 -0
  13. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/cli/main.py +0 -0
  14. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/core/__init__.py +0 -0
  15. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/core/backends/__init__.py +0 -0
  16. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/core/backends/base.py +0 -0
  17. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/core/backends/com_backend.py +0 -0
  18. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/core/backends/openpyxl_backend.py +0 -0
  19. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/core/cells.py +0 -0
  20. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/core/charts.py +0 -0
  21. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/core/integrate.py +0 -0
  22. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/core/logging_utils.py +0 -0
  23. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/core/modeling.py +0 -0
  24. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/core/pipeline.py +0 -0
  25. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/core/ranges.py +0 -0
  26. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/core/shapes.py +0 -0
  27. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/core/workbook.py +0 -0
  28. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/engine.py +0 -0
  29. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/errors.py +0 -0
  30. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/io/__init__.py +0 -0
  31. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/io/serialize.py +0 -0
  32. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/__init__.py +0 -0
  33. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/chunk_reader.py +0 -0
  34. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/extract_runner.py +0 -0
  35. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/io.py +0 -0
  36. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/patch/__init__.py +0 -0
  37. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/patch/chart_types.py +0 -0
  38. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/patch/engine/__init__.py +0 -0
  39. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/patch/engine/base.py +0 -0
  40. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/patch/engine/openpyxl_engine.py +0 -0
  41. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/patch/engine/xlwings_engine.py +0 -0
  42. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/patch/normalize.py +0 -0
  43. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/patch/ops/__init__.py +0 -0
  44. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/patch/ops/common.py +0 -0
  45. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/patch/ops/openpyxl_ops.py +0 -0
  46. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/patch/ops/xlwings_ops.py +0 -0
  47. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/patch/runtime.py +0 -0
  48. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/patch/specs.py +0 -0
  49. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/patch/types.py +0 -0
  50. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/patch_runner.py +0 -0
  51. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/shared/__init__.py +0 -0
  52. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/shared/a1.py +0 -0
  53. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/sheet_reader.py +0 -0
  54. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/tools.py +0 -0
  55. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/mcp/validate_input.py +0 -0
  56. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/models/__init__.py +0 -0
  57. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/models/maps.py +0 -0
  58. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/models/types.py +0 -0
  59. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/py.typed +0 -0
  60. {exstruct-0.5.1 → exstruct-0.5.2}/src/exstruct/render/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: exstruct
3
- Version: 0.5.1
3
+ Version: 0.5.2
4
4
  Summary: Excel to structured JSON (tables, shapes, charts) for LLM/RAG pipelines
5
5
  Keywords: excel,structure,data,exstruct
6
6
  Author: harumiWeb
@@ -176,9 +176,14 @@ Notes:
176
176
  - `com`: force COM (rejects `dry_run` / `return_inverse_ops` / `preflight_formula_check`)
177
177
  - `openpyxl`: force openpyxl (`.xls` is not supported)
178
178
  - `create_chart` is COM-only (`backend="openpyxl"` is not allowed for requests that include it), and it also rejects `dry_run` / `return_inverse_ops` / `preflight_formula_check`.
179
- - `create_chart` `chart_type` supports: `line`, `column`, `bar`, `area`, `pie`, `doughnut`, `scatter`, `radar` (aliases: `column_clustered`, `bar_clustered`, `xy_scatter`, `donut`).
180
- - `create_chart` and `apply_table_style` cannot be combined in one request (split into separate calls).
181
- - `exstruct_patch` response includes `engine` (`com` or `openpyxl`) to show the actual backend used. `restore_design_snapshot` remains openpyxl-only.
179
+ - `create_chart` `chart_type` supports: `line`, `column`, `bar`, `area`, `pie`, `doughnut`, `scatter`, `radar` (aliases: `column_clustered`, `bar_clustered`, `xy_scatter`, `donut`).
180
+ - `create_chart` `data_range` accepts either one range string or `list[str]` (multi-series), and `data_range` / `category_range` both support sheet-qualified ranges (`Sheet2!A1:B10`, `'Sales Data'!A1:B10`).
181
+ - `create_chart` supports optional explicit labels: `chart_title`, `x_axis_title`, `y_axis_title`.
182
+ - `create_chart` and `apply_table_style` can be combined in one request when the backend resolves to COM (`backend="com"` or `backend="auto"` with COM available).
183
+ - For stable `apply_table_style` COM runs on Windows, ensure desktop Excel is installed/runnable and the target `range` is a contiguous header-included A1 range.
184
+ - `exstruct_patch` error detail may include `error_code` / `failed_field` / `raw_com_message`; table-related codes include `table_style_invalid`, `list_object_add_failed`, and `com_api_missing`.
185
+ - `exstruct_patch` response includes `engine` (`com` or `openpyxl`) to show the actual backend used. `restore_design_snapshot` remains openpyxl-only.
186
+ - Use `exstruct_make` for new workbook creation and `exstruct_patch` for editing existing workbooks.
182
187
  - `exstruct_make` creates a new workbook and applies `ops` in one call (`out_path` required, `ops` optional).
183
188
  - Supports `.xlsx` / `.xlsm` / `.xls`
184
189
  - Initial sheet is normalized to `Sheet1`
@@ -111,9 +111,14 @@ Notes:
111
111
  - `com`: force COM (rejects `dry_run` / `return_inverse_ops` / `preflight_formula_check`)
112
112
  - `openpyxl`: force openpyxl (`.xls` is not supported)
113
113
  - `create_chart` is COM-only (`backend="openpyxl"` is not allowed for requests that include it), and it also rejects `dry_run` / `return_inverse_ops` / `preflight_formula_check`.
114
- - `create_chart` `chart_type` supports: `line`, `column`, `bar`, `area`, `pie`, `doughnut`, `scatter`, `radar` (aliases: `column_clustered`, `bar_clustered`, `xy_scatter`, `donut`).
115
- - `create_chart` and `apply_table_style` cannot be combined in one request (split into separate calls).
116
- - `exstruct_patch` response includes `engine` (`com` or `openpyxl`) to show the actual backend used. `restore_design_snapshot` remains openpyxl-only.
114
+ - `create_chart` `chart_type` supports: `line`, `column`, `bar`, `area`, `pie`, `doughnut`, `scatter`, `radar` (aliases: `column_clustered`, `bar_clustered`, `xy_scatter`, `donut`).
115
+ - `create_chart` `data_range` accepts either one range string or `list[str]` (multi-series), and `data_range` / `category_range` both support sheet-qualified ranges (`Sheet2!A1:B10`, `'Sales Data'!A1:B10`).
116
+ - `create_chart` supports optional explicit labels: `chart_title`, `x_axis_title`, `y_axis_title`.
117
+ - `create_chart` and `apply_table_style` can be combined in one request when the backend resolves to COM (`backend="com"` or `backend="auto"` with COM available).
118
+ - For stable `apply_table_style` COM runs on Windows, ensure desktop Excel is installed/runnable and the target `range` is a contiguous header-included A1 range.
119
+ - `exstruct_patch` error detail may include `error_code` / `failed_field` / `raw_com_message`; table-related codes include `table_style_invalid`, `list_object_add_failed`, and `com_api_missing`.
120
+ - `exstruct_patch` response includes `engine` (`com` or `openpyxl`) to show the actual backend used. `restore_design_snapshot` remains openpyxl-only.
121
+ - Use `exstruct_make` for new workbook creation and `exstruct_patch` for editing existing workbooks.
117
122
  - `exstruct_make` creates a new workbook and applies `ops` in one call (`out_path` required, `ops` optional).
118
123
  - Supports `.xlsx` / `.xlsm` / `.xls`
119
124
  - Initial sheet is normalized to `Sheet1`
@@ -1,7 +1,7 @@
1
- [project]
2
- name = "exstruct"
3
- version = "0.5.1"
4
- description = "Excel to structured JSON (tables, shapes, charts) for LLM/RAG pipelines"
1
+ [project]
2
+ name = "exstruct"
3
+ version = "0.5.2"
4
+ description = "Excel to structured JSON (tables, shapes, charts) for LLM/RAG pipelines"
5
5
  readme = "README.md"
6
6
  license = { file = "LICENSE" }
7
7
  keywords = ["excel", "structure", "data", "exstruct"]
@@ -380,7 +380,6 @@ _PATCH_OP_SCHEMA_BY_NAME: dict[str, PatchOpSchema] = {
380
380
  "range must include header row",
381
381
  "table name must be unique when provided",
382
382
  "range must not intersect existing table",
383
- "backend='com' falls back to openpyxl with warning",
384
383
  ],
385
384
  example={
386
385
  "op": "apply_table_style",
@@ -401,9 +400,14 @@ _PATCH_OP_SCHEMA_BY_NAME: dict[str, PatchOpSchema] = {
401
400
  "height",
402
401
  "titles_from_data",
403
402
  "series_from_rows",
403
+ "chart_title",
404
+ "x_axis_title",
405
+ "y_axis_title",
404
406
  ],
405
407
  constraints=[
406
408
  "chart_type in {'line','column','bar','area','pie','doughnut','scatter','radar'}",
409
+ "data_range accepts A1 range string or list[str] for multi-series input",
410
+ "data_range/category_range allow sheet-qualified ranges like 'Sheet2!A1:B10'",
407
411
  "width/height must be > 0 when provided",
408
412
  "chart_name must be unique in sheet when provided",
409
413
  "backend='openpyxl' is not supported",
@@ -412,14 +416,17 @@ _PATCH_OP_SCHEMA_BY_NAME: dict[str, PatchOpSchema] = {
412
416
  "op": "create_chart",
413
417
  "sheet": "Sheet1",
414
418
  "chart_type": "line",
415
- "data_range": "A1:C10",
416
- "category_range": "A2:A10",
419
+ "data_range": ["A2:A10", "C2:C10", "D2:D10"],
420
+ "category_range": "B2:B10",
417
421
  "anchor_cell": "E2",
418
422
  "chart_name": "SalesTrend",
419
423
  "width": 360,
420
424
  "height": 220,
421
425
  "titles_from_data": True,
422
426
  "series_from_rows": False,
427
+ "chart_title": "Sales trend",
428
+ "x_axis_title": "Month",
429
+ "y_axis_title": "Amount",
423
430
  },
424
431
  ),
425
432
  "restore_design_snapshot": PatchOpSchema(