athena-python-pptx 0.14.2__tar.gz → 0.14.3__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 (91) hide show
  1. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/CHANGELOG.md +15 -0
  2. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/PKG-INFO +1 -1
  3. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/docs/API_PARITY_EXCEPTIONS.md +14 -2
  4. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/__init__.py +1 -1
  5. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/shapes/__init__.py +34 -2
  6. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pyproject.toml +1 -1
  7. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/.gitignore +0 -0
  8. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/AGENTS.md +0 -0
  9. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/API_PARITY_REPORT.md +0 -0
  10. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/CLAUDE.md +0 -0
  11. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/DEV-GUIDE.md +0 -0
  12. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/PARITY_QUESTIONS.md +0 -0
  13. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/PUBLISHING.md +0 -0
  14. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/README.md +0 -0
  15. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/docs/athena-api.json +0 -0
  16. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/docs/athena-api.md +0 -0
  17. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/_athena_extension.py +0 -0
  18. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/_citations.py +0 -0
  19. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/_ptc.py +0 -0
  20. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/_references.py +0 -0
  21. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/_unsupported.py +0 -0
  22. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/action.py +0 -0
  23. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/batching.py +0 -0
  24. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/chart/__init__.py +0 -0
  25. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/chart/axis.py +0 -0
  26. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/chart/category.py +0 -0
  27. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/chart/chart.py +0 -0
  28. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/chart/data.py +0 -0
  29. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/chart/datalabel.py +0 -0
  30. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/chart/legend.py +0 -0
  31. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/chart/marker.py +0 -0
  32. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/chart/plot.py +0 -0
  33. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/chart/point.py +0 -0
  34. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/chart/series.py +0 -0
  35. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/chart/xlsx.py +0 -0
  36. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/client.py +0 -0
  37. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/commands.py +0 -0
  38. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/decorators.py +0 -0
  39. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/dml/__init__.py +0 -0
  40. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/dml/chtfmt.py +0 -0
  41. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/dml/color.py +0 -0
  42. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/dml/effect.py +0 -0
  43. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/dml/fill.py +0 -0
  44. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/dml/line.py +0 -0
  45. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/docgen.py +0 -0
  46. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/enum/__init__.py +0 -0
  47. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/enum/action.py +0 -0
  48. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/enum/chart.py +0 -0
  49. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/enum/dml.py +0 -0
  50. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/enum/lang.py +0 -0
  51. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/enum/shapes.py +0 -0
  52. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/enum/text.py +0 -0
  53. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/errors.py +0 -0
  54. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/exc.py +0 -0
  55. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/kit.py +0 -0
  56. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/media.py +0 -0
  57. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/oxml/__init__.py +0 -0
  58. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/oxml/ns.py +0 -0
  59. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/package.py +0 -0
  60. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/parts/__init__.py +0 -0
  61. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/parts/_base.py +0 -0
  62. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/parts/chart.py +0 -0
  63. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/parts/coreprops.py +0 -0
  64. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/parts/embeddedpackage.py +0 -0
  65. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/parts/image.py +0 -0
  66. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/parts/media.py +0 -0
  67. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/parts/presentation.py +0 -0
  68. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/parts/slide.py +0 -0
  69. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/presentation.py +0 -0
  70. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/shapes/autoshape.py +0 -0
  71. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/shapes/base.py +0 -0
  72. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/shapes/connector.py +0 -0
  73. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/shapes/freeform.py +0 -0
  74. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/shapes/graphfrm.py +0 -0
  75. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/shapes/group.py +0 -0
  76. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/shapes/picture.py +0 -0
  77. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/shapes/placeholder.py +0 -0
  78. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/shapes/shapetree.py +0 -0
  79. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/shared.py +0 -0
  80. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/slide.py +0 -0
  81. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/slides.py +0 -0
  82. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/spec.py +0 -0
  83. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/table.py +0 -0
  84. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/text/__init__.py +0 -0
  85. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/text/fonts.py +0 -0
  86. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/text/layout.py +0 -0
  87. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/text/text.py +0 -0
  88. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/types.py +0 -0
  89. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/typing.py +0 -0
  90. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/units.py +0 -0
  91. {athena_python_pptx-0.14.2 → athena_python_pptx-0.14.3}/pptx/util.py +0 -0
@@ -2,6 +2,21 @@
2
2
 
3
3
  All notable changes to `athena-python-pptx` are documented in this file.
4
4
 
5
+ ## 0.14.3 — waterfall `connector_lines`
6
+
7
+ - New Athena extension `chart.plots[0].connector_lines = False` on a
8
+ `WaterfallPlot` hides the lines joining each bar to the next (Excel's
9
+ "Show connector lines"; `True` by default). Emits a
10
+ `SetWaterfallConnectorLines` chart patch; an SDK-authored waterfall then
11
+ exports one category per bar with its `gap_width`, and an uploaded Office
12
+ 2016 waterfall writes `connectorLines` into its own part. Reads back from
13
+ either.
14
+ - Studio-side (no SDK change, any SDK version): SDK-authored bar / column
15
+ series export `<c:invertIfNegative val="0"/>` by default, so negative bars
16
+ keep the series colour instead of rendering white in PowerPoint; an explicit
17
+ `series.invert_if_negative = True` still wins. `chart.replace_data()` on an
18
+ uploaded bar chart rebuilds its series the same way.
19
+
5
20
  ## 0.14.2 — `chart.value_axis` / `chart.category_axis` edit the axis python-pptx returns
6
21
 
7
22
  Axis edits (`axis_title`, `visible`, `minimum_scale` / `maximum_scale` /
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: athena-python-pptx
3
- Version: 0.14.2
3
+ Version: 0.14.3
4
4
  Summary: Drop-in replacement for python-pptx that connects to PPTX Studio for real-time collaboration
5
5
  Project-URL: Homepage, https://github.com/pptx-studio/python-sdk
6
6
  Project-URL: Documentation, https://docs.pptx-studio.com/sdk/python
@@ -1443,6 +1443,7 @@ cd.categories = ["FY24", "Price", "Volume", "FX", "FY25"]
1443
1443
  cd.add_series("EBIT", (120, 18, -9, -4, None)) # one series of deltas
1444
1444
  chart = slide.shapes.add_chart(XL_CHART_TYPE.WATERFALL, x, y, cx, cy, cd).chart
1445
1445
  chart.plots[0].subtotals = [0, 4] # Athena extension
1446
+ chart.plots[0].connector_lines = False # Athena extension (default True)
1446
1447
  ```
1447
1448
 
1448
1449
  | Surface | Kind | Wire |
@@ -1450,6 +1451,7 @@ chart.plots[0].subtotals = [0, 4] # Athena extension
1450
1451
  | `chart.plots[0]` on a waterfall | `WaterfallPlot` (a `BarPlot`: `data_labels`, `has_data_labels` work; `gap_width` is kept but not drawn, see below) | — |
1451
1452
  | `WaterfallPlot.subtotals` (get / set) | Athena extension | `SetWaterfallSubtotals` chart patch |
1452
1453
  | `WaterfallPlot.set_subtotals(indices)` | Athena extension (same as the setter) | `SetWaterfallSubtotals` |
1454
+ | `WaterfallPlot.connector_lines` (get / set, `bool`) | Athena extension | `SetWaterfallConnectorLines` chart patch |
1453
1455
  | `chart.chart_type` | reads back `XL_CHART_TYPE.WATERFALL` | — |
1454
1456
 
1455
1457
  Semantics follow Excel's "Set as total": a subtotal point is drawn from zero
@@ -1493,6 +1495,13 @@ as on and paint the parts below zero white. Keynote ignores deleted legend
1493
1495
  entries and point labels, so its legend also lists the base and connector
1494
1496
  series, and a bar split at zero shows a label on each part.
1495
1497
 
1498
+ Connector lines are on unless `chart.plots[0].connector_lines = False`
1499
+ (Excel's "Show connector lines"; python-pptx has no waterfall type, so this
1500
+ is an Athena extension like `subtotals`). Off, an SDK-authored waterfall
1501
+ exports without the "Connector" series and its blank-labelled categories:
1502
+ one category per bar, and `gap_width` is drawn. The setting survives
1503
+ `chart.replace_data(...)`, and a reopened deck reads it back.
1504
+
1496
1505
  What that construction cannot carry, the studio does not draw either, so the
1497
1506
  preview matches the deck: labels centred in the bars (a stacked chart has no
1498
1507
  outside-end position), and no label on a floating bar that crosses zero. With
@@ -1503,8 +1512,10 @@ waterfall type.
1503
1512
  **Waterfalls in uploaded decks.** A waterfall PowerPoint 2016+ saved (an
1504
1513
  Office-2016 chartEx part) is a `WaterfallPlot` with its `subtotals` too. It
1505
1514
  exports as its original part: `chart.replace_data(...)` (one series), point
1506
- values, category labels, the series name, `subtotals` and the chart title are
1507
- written back into that part and its embedded workbook. Its type, legend, data
1515
+ values, category labels, the series name, `subtotals`, `connector_lines`
1516
+ (`cx:visibility/@connectorLines`; a part that never set it reads `True`) and
1517
+ the chart title are written back into that part and its embedded workbook. Its
1518
+ type, legend, data
1508
1519
  labels, colours, axes and other formatting keep the uploaded design: a write to
1509
1520
  them fails the command with an error naming the edit, rather than being
1510
1521
  accepted and lost on export. The other chartEx charts (treemap, sunburst,
@@ -2563,6 +2574,7 @@ python-pptx. Generated from `pptx._athena_extension.iter_athena_extensions()`.
2563
2574
  | `pptx.shapes.Table.delete_column` | method | 0.1.81 | python-pptx#895 | Table.delete_column — alias for remove_column. |
2564
2575
  | `pptx.shapes.Table.delete_row` | method | 0.1.81 | python-pptx#837 | Table.delete_row — alias for remove_row, the verb used in python-pptx#837. |
2565
2576
  | `pptx.shapes.Table.remove_column` | method | 0.1.81 | python-pptx#895 | Table.remove_column — column-axis counterpart to remove_row. |
2577
+ | `pptx.shapes.WaterfallPlot.connector_lines` | property | 0.14.3 | Athena-Intel/demo-app-monorepo#37496 | WaterfallPlot.connector_lines — whether lines join each bar to the next. |
2566
2578
  | `pptx.shapes.WaterfallPlot.set_subtotals` | method | 0.14.0 | python-pptx#651 | WaterfallPlot.set_subtotals — mark the total points of a waterfall. |
2567
2579
  | `pptx.shapes.WaterfallPlot.subtotals` | property | 0.14.0 | python-pptx#651 | WaterfallPlot.subtotals — point indices drawn from zero as totals. |
2568
2580
  | `pptx.shapes._ChartTitle.height` | property | 0.1.81 | python-pptx#1030 | ChartTitle.height — fractional height of the title layout box. |
@@ -326,7 +326,7 @@ def validate_all_touched() -> dict[int, list[str]]:
326
326
  return results
327
327
 
328
328
 
329
- __version__ = "0.14.2"
329
+ __version__ = "0.14.3"
330
330
 
331
331
  __all__ = [
332
332
  # Main entry point
@@ -3296,8 +3296,9 @@ class WaterfallPlot(BarPlot):
3296
3296
  python-pptx has no waterfall; this plot is an Athena extension. The
3297
3297
  series carries the deltas, and :attr:`subtotals` marks the points drawn
3298
3298
  from zero as totals (Excel's "Set as total"). A total whose value is
3299
- ``None`` shows the running total. ``gap_width`` and ``data_labels`` work
3300
- as on a bar plot.
3299
+ ``None`` shows the running total. :attr:`connector_lines` shows or hides
3300
+ the lines joining each bar to the next (Excel's "Show connector lines",
3301
+ on by default). ``gap_width`` and ``data_labels`` work as on a bar plot.
3301
3302
  """
3302
3303
 
3303
3304
  @property
@@ -3344,6 +3345,37 @@ class WaterfallPlot(BarPlot):
3344
3345
  "subtotalIndices": values,
3345
3346
  }])
3346
3347
 
3348
+ @property
3349
+ @athena_extension(
3350
+ issue="Athena-Intel/demo-app-monorepo#37496",
3351
+ since="0.14.3",
3352
+ description="WaterfallPlot.connector_lines — whether lines join each bar to the next.",
3353
+ )
3354
+ def connector_lines(self) -> bool:
3355
+ """Whether connector lines join each bar's end to the next bar.
3356
+
3357
+ ``True`` unless turned off (Excel's default), including for an
3358
+ uploaded Office 2016 waterfall that never set it.
3359
+ """
3360
+ waterfall = self._data.get("waterfall") or {}
3361
+ return waterfall.get("connectorLines") is not False
3362
+
3363
+ @connector_lines.setter
3364
+ @athena_extension(issue="Athena-Intel/demo-app-monorepo#37496", since="0.14.3", description="WaterfallPlot.connector_lines setter.")
3365
+ def connector_lines(self, value: bool) -> None:
3366
+ """Show (``True``) or hide (``False``) the connector lines.
3367
+
3368
+ Emits a ``SetWaterfallConnectorLines`` chart patch.
3369
+ """
3370
+ shown = bool(value)
3371
+ self._data["waterfall"] = {**(self._data.get("waterfall") or {}), "connectorLines": shown}
3372
+ _emit_chart_patches(self._chart._shape, [{
3373
+ "op": "SetWaterfallConnectorLines",
3374
+ "chartId": self._chart._shape.shape_id,
3375
+ "plotId": self._plot_id,
3376
+ "connectorLines": shown,
3377
+ }])
3378
+
3347
3379
 
3348
3380
  def _plot_class_for_type(chart_type: Optional[str]) -> type:
3349
3381
  """Pick the right :class:`_ChartPlot` subclass for a chart type.
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "athena-python-pptx"
7
- version = "0.14.2"
7
+ version = "0.14.3"
8
8
  description = "Drop-in replacement for python-pptx that connects to PPTX Studio for real-time collaboration"
9
9
  readme = "README.md"
10
10
  license = "MIT"