Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Resolve multiple sphinx warnings #3787

Merged
merged 5 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions altair/vegalite/v5/schema/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class AreaConfigKwds(TypedDict, total=False):
mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__
value can be used.

__Default value:__ ``"source-over"``
**Default value:** ``"source-over"``
color
Default color.

Expand Down Expand Up @@ -842,7 +842,7 @@ class AxisConfigKwds(TypedDict, total=False):
and ``config.style.foo`` (the specified style ``"foo"`` has higher precedence).
tickBand
For band scales, indicates if ticks and grid lines should be placed at the
``"center"`` of a band (default) or at the band ``"extent"``s to indicate intervals
``"center"`` of a band (default) or at the band extents to indicate intervals
tickCap
The stroke cap for the tick lines' ending style. One of ``"butt"``, ``"round"`` or
``"square"``.
Expand Down Expand Up @@ -1125,7 +1125,7 @@ class BarConfigKwds(TypedDict, total=False):
mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__
value can be used.

__Default value:__ ``"source-over"``
**Default value:** ``"source-over"``
color
Default color.

Expand Down Expand Up @@ -3457,7 +3457,7 @@ class LineConfigKwds(TypedDict, total=False):
mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__
value can be used.

__Default value:__ ``"source-over"``
**Default value:** ``"source-over"``
color
Default color.

Expand Down Expand Up @@ -3995,7 +3995,7 @@ class MarkConfigKwds(TypedDict, total=False):
mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__
value can be used.

__Default value:__ ``"source-over"``
**Default value:** ``"source-over"``
color
Default color.

Expand Down Expand Up @@ -4571,7 +4571,7 @@ class OverlayMarkDefKwds(TypedDict, total=False):
mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__
value can be used.

__Default value:__ ``"source-over"``
**Default value:** ``"source-over"``
clip
Whether a mark be clipped to the enclosing group's width and height.
color
Expand Down Expand Up @@ -5713,7 +5713,7 @@ class RectConfigKwds(TypedDict, total=False):
mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__
value can be used.

__Default value:__ ``"source-over"``
**Default value:** ``"source-over"``
color
Default color.

Expand Down Expand Up @@ -6637,7 +6637,7 @@ class TickConfigKwds(TypedDict, total=False):
mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__
value can be used.

__Default value:__ ``"source-over"``
**Default value:** ``"source-over"``
color
Default color.

Expand Down
8 changes: 8 additions & 0 deletions altair/vegalite/v5/schema/_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ class Value(TypedDict, Generic[T]):
value: T
Wrapped value.

Returns
-------
dict

.. _Generic:
https://typing.readthedocs.io/en/latest/spec/generics.html#generics
"""
Expand Down Expand Up @@ -180,6 +184,10 @@ class RowColKwds(TypedDict, Generic[T], total=False):
column: T
row: T

Returns
-------
dict

.. _Generic:
https://typing.readthedocs.io/en/latest/spec/generics.html#generics
"""
Expand Down
8 changes: 4 additions & 4 deletions altair/vegalite/v5/schema/channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -21618,8 +21618,8 @@ def encode(
original order in the data sources.
* Otherwise, this ``order`` channel encodes layer order of the marks.

**Note**: In aggregate plots, ``order`` field should be ``aggregate``d to
avoid creating additional aggregation grouping.
**Note**: In aggregate plots, ``order`` field should be aggregated to avoid
creating additional aggregation grouping.
radius : str, :class:`Radius`, Dict, :class:`RadiusDatum`, :class:`RadiusValue`
The outer radius in pixels of arc marks.
radius2 : str, :class:`Radius2`, Dict, :class:`Radius2Datum`, :class:`Radius2Value`
Expand Down Expand Up @@ -21882,8 +21882,8 @@ class EncodeKwds(TypedDict, total=False):
the data sources.
* Otherwise, this ``order`` channel encodes layer order of the marks.

**Note**: In aggregate plots, ``order`` field should be ``aggregate``d to avoid
creating additional aggregation grouping.
**Note**: In aggregate plots, ``order`` field should be aggregated to avoid creating
additional aggregation grouping.
radius
The outer radius in pixels of arc marks.
radius2
Expand Down
32 changes: 16 additions & 16 deletions altair/vegalite/v5/schema/core.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion altair/vegalite/v5/schema/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class _MarkDef(SchemaBase):
mix-blend-mode <https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode>`__
value can be used.

__Default value:__ ``"source-over"``
**Default value:** ``"source-over"``
clip : bool, dict, :class:`ExprRef`
Whether a mark be clipped to the enclosing group's width and height.
color : str, dict, :class:`Color`, :class:`ExprRef`, :class:`Gradient`, :class:`HexColor`, :class:`ColorName`, :class:`LinearGradient`, :class:`RadialGradient`, Literal['black', 'silver', 'gray', 'white', 'maroon', 'red', 'purple', 'fuchsia', 'green', 'lime', 'olive', 'yellow', 'navy', 'blue', 'teal', 'aqua', 'orange', 'aliceblue', 'antiquewhite', 'aquamarine', 'azure', 'beige', 'bisque', 'blanchedalmond', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'greenyellow', 'grey', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen', 'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'limegreen', 'linen', 'magenta', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen', 'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream', 'mistyrose', 'moccasin', 'navajowhite', 'oldlace', 'olivedrab', 'orangered', 'orchid', 'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink', 'plum', 'powderblue', 'rosybrown', 'royalblue', 'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'skyblue', 'slateblue', 'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue', 'tan', 'thistle', 'tomato', 'turquoise', 'violet', 'wheat', 'whitesmoke', 'yellowgreen', 'rebeccapurple']
Expand Down
2 changes: 1 addition & 1 deletion doc/getting_started/resources.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Altair in R provides an R interface to the Altair Python package. See the `docs
.. _`Altair in R`: https://github.com/vegawidget/altair

Altair-upset_
~~~~~~~~~~
~~~~~~~~~~~~~

Create beautiful and interactive UpSet plots using Altair. UpSet plots are a powerful alternative to Venn diagrams for visualizing set intersections, especially when dealing with many sets. The library supports both Pandas and Polars DataFrames, making it flexible for different data processing workflows.

Expand Down
8 changes: 8 additions & 0 deletions tools/generate_schema_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,10 @@ class Value(TypedDict, Generic[T]):
value: T
Wrapped value.

Returns
-------
dict

.. _Generic:
https://typing.readthedocs.io/en/latest/spec/generics.html#generics
"""
Expand Down Expand Up @@ -420,6 +424,10 @@ class RowColKwds(TypedDict, Generic[T], total=False):
column: T
row: T

Returns
-------
dict

.. _Generic:
https://typing.readthedocs.io/en/latest/spec/generics.html#generics
"""
Expand Down
10 changes: 8 additions & 2 deletions tools/markup.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,11 @@ def __call__(self, s: str) -> str:
_RE_SPECIAL.sub("", d) if i % 2 else d
for i, d in enumerate(_RE_LINK.split(s))
)
# NOTE: Some entries in the Vega-Lite schema miss the second occurence of '__'
# (Needs to happen pre-parse to convert into `**Default value:**` for `.rst`)
description = description.replace("__Default value: ", "__Default value:__ ")

description = super().__call__(description)
# Some entries in the Vega-Lite schema miss the second occurence of '__'
description = description.replace("__Default value: ", "__Default value:__ ")
# Links to the vega-lite documentation cannot be relative but instead need to
# contain the full URL.
description = description.replace(
Expand All @@ -135,6 +136,11 @@ def __call__(self, s: str) -> str:
description = description.replace("’", "'") # noqa: RUF001 [RIGHT SINGLE QUOTATION MARK]
description = description.replace("–", "-") # noqa: RUF001 [EN DASH]
description = description.replace(" ", " ") # noqa: RUF001 [NO-BREAK SPACE]

# Fixing `codespan` followed by a non-whitespace character
description = description.replace("``aggregate``d", "aggregated").replace(
'``"extent"``s', "extents"
)
return description.strip()


Expand Down