maidr 0.22.1__tar.gz → 0.22.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 (43) hide show
  1. {maidr-0.22.1 → maidr-0.22.2}/PKG-INFO +1 -1
  2. {maidr-0.22.1 → maidr-0.22.2}/maidr/__init__.py +1 -1
  3. {maidr-0.22.1 → maidr-0.22.2}/maidr/core/maidr.py +1 -2
  4. {maidr-0.22.1 → maidr-0.22.2}/maidr/patch/barplot.py +3 -0
  5. {maidr-0.22.1 → maidr-0.22.2}/maidr/util/environment.py +10 -0
  6. {maidr-0.22.1 → maidr-0.22.2}/pyproject.toml +1 -1
  7. {maidr-0.22.1 → maidr-0.22.2}/LICENSE +0 -0
  8. {maidr-0.22.1 → maidr-0.22.2}/README.md +0 -0
  9. {maidr-0.22.1 → maidr-0.22.2}/maidr/api.py +0 -0
  10. {maidr-0.22.1 → maidr-0.22.2}/maidr/core/__init__.py +0 -0
  11. {maidr-0.22.1 → maidr-0.22.2}/maidr/core/context_manager.py +0 -0
  12. {maidr-0.22.1 → maidr-0.22.2}/maidr/core/enum/__init__.py +0 -0
  13. {maidr-0.22.1 → maidr-0.22.2}/maidr/core/enum/library.py +0 -0
  14. {maidr-0.22.1 → maidr-0.22.2}/maidr/core/enum/maidr_key.py +0 -0
  15. {maidr-0.22.1 → maidr-0.22.2}/maidr/core/enum/plot_type.py +0 -0
  16. {maidr-0.22.1 → maidr-0.22.2}/maidr/core/figure_manager.py +0 -0
  17. {maidr-0.22.1 → maidr-0.22.2}/maidr/core/plot/__init__.py +0 -0
  18. {maidr-0.22.1 → maidr-0.22.2}/maidr/core/plot/barplot.py +0 -0
  19. {maidr-0.22.1 → maidr-0.22.2}/maidr/core/plot/boxplot.py +0 -0
  20. {maidr-0.22.1 → maidr-0.22.2}/maidr/core/plot/grouped_barplot.py +0 -0
  21. {maidr-0.22.1 → maidr-0.22.2}/maidr/core/plot/heatmap.py +0 -0
  22. {maidr-0.22.1 → maidr-0.22.2}/maidr/core/plot/histogram.py +0 -0
  23. {maidr-0.22.1 → maidr-0.22.2}/maidr/core/plot/lineplot.py +0 -0
  24. {maidr-0.22.1 → maidr-0.22.2}/maidr/core/plot/maidr_plot.py +0 -0
  25. {maidr-0.22.1 → maidr-0.22.2}/maidr/core/plot/maidr_plot_factory.py +0 -0
  26. {maidr-0.22.1 → maidr-0.22.2}/maidr/core/plot/scatterplot.py +0 -0
  27. {maidr-0.22.1 → maidr-0.22.2}/maidr/exception/__init__.py +0 -0
  28. {maidr-0.22.1 → maidr-0.22.2}/maidr/exception/extraction_error.py +0 -0
  29. {maidr-0.22.1 → maidr-0.22.2}/maidr/patch/__init__.py +0 -0
  30. {maidr-0.22.1 → maidr-0.22.2}/maidr/patch/boxplot.py +0 -0
  31. {maidr-0.22.1 → maidr-0.22.2}/maidr/patch/clear.py +0 -0
  32. {maidr-0.22.1 → maidr-0.22.2}/maidr/patch/common.py +0 -0
  33. {maidr-0.22.1 → maidr-0.22.2}/maidr/patch/heatmap.py +0 -0
  34. {maidr-0.22.1 → maidr-0.22.2}/maidr/patch/highlight.py +0 -0
  35. {maidr-0.22.1 → maidr-0.22.2}/maidr/patch/histogram.py +0 -0
  36. {maidr-0.22.1 → maidr-0.22.2}/maidr/patch/lineplot.py +0 -0
  37. {maidr-0.22.1 → maidr-0.22.2}/maidr/patch/scatterplot.py +0 -0
  38. {maidr-0.22.1 → maidr-0.22.2}/maidr/util/__init__.py +0 -0
  39. {maidr-0.22.1 → maidr-0.22.2}/maidr/util/mixin/__init__.py +0 -0
  40. {maidr-0.22.1 → maidr-0.22.2}/maidr/util/mixin/extractor_mixin.py +0 -0
  41. {maidr-0.22.1 → maidr-0.22.2}/maidr/util/mixin/merger_mixin.py +0 -0
  42. {maidr-0.22.1 → maidr-0.22.2}/maidr/widget/__init__.py +0 -0
  43. {maidr-0.22.1 → maidr-0.22.2}/maidr/widget/shiny.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: maidr
3
- Version: 0.22.1
3
+ Version: 0.22.2
4
4
  Summary: Multimodal Access and Interactive Data Representations
5
5
  License: GPL-3.0-or-later
6
6
  Keywords: accessibility,visualization,sonification,braille,tactile,multimodal,data representation,blind,low vision,visual impairments
@@ -1,4 +1,4 @@
1
- __version__ = "0.22.1"
1
+ __version__ = "0.22.2"
2
2
 
3
3
  from .api import close, render, save_html, show, stacked
4
4
  from .core import Maidr
@@ -11,7 +11,6 @@ from typing import Any, Literal
11
11
  from htmltools import HTML, HTMLDocument, Tag, tags
12
12
  from lxml import etree
13
13
  from matplotlib.figure import Figure
14
- from matplotlib.patches import Rectangle
15
14
 
16
15
  from maidr.core.context_manager import HighlightContextManager
17
16
  from maidr.core.enum.maidr_key import MaidrKey
@@ -272,7 +271,7 @@ class Maidr:
272
271
  # Render the plot inside an iframe if in a Jupyter notebook, Google Colab
273
272
  # or VSCode notebook. No need for iframe if this is a Quarto document.
274
273
  # For TypeScript we will use iframe by default for now
275
- if Environment.is_notebook():
274
+ if Environment.is_notebook() or Environment.is_shiny():
276
275
  unique_id = "iframe_" + Maidr._unique_id()
277
276
 
278
277
  def generate_iframe_script(unique_id: str) -> str:
@@ -64,6 +64,9 @@ def bar(
64
64
  align == "edge"
65
65
  ):
66
66
  plot_type = PlotType.DODGED
67
+ if "dodge" in kwargs:
68
+ plot_type = PlotType.DODGED
69
+
67
70
  return common(plot_type, wrapped, instance, args, kwargs)
68
71
 
69
72
 
@@ -31,6 +31,16 @@ class Environment:
31
31
  except ImportError:
32
32
  return False
33
33
 
34
+ @staticmethod
35
+ def is_shiny() -> bool:
36
+ """Return True if the environment is a Shiny app."""
37
+ try:
38
+ import shiny
39
+
40
+ return shiny.__name__ == "shiny"
41
+ except ImportError:
42
+ return False
43
+
34
44
  @staticmethod
35
45
  def is_vscode_notebook() -> bool:
36
46
  """Return True if the environment is a VSCode notebook."""
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [tool.poetry]
6
6
  name = "maidr"
7
- version = "0.22.1"
7
+ version = "0.22.2"
8
8
  description = "Multimodal Access and Interactive Data Representations"
9
9
  authors = [
10
10
  "JooYoung Seo <jseo1005@illinois.edu>",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes