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

Address Sphinx warnings #2758

Merged
merged 26 commits into from
Dec 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
520d69f
Switch from using recommonmark to myst-parser as the former is deprec…
binste Dec 17, 2022
aa4707c
Tag gallery examples as sphinx orphan pages to disable warning about …
binste Dec 18, 2022
f9b41ac
Fix reference to image mark page
binste Dec 18, 2022
c54c9ba
Use 'value' instead of deprecated 'init'
binste Dec 18, 2022
9fbadda
Fix 'The value of 'empty' should be True or False.'
binste Dec 18, 2022
3b0e4aa
Replace usage of add_selection with add_params
binste Dec 18, 2022
dabda8d
Merge branch 'master' into address_docs_warnings
binste Dec 18, 2022
e8764a5
Switch from deprecated 'single' selection type to 'point'
binste Dec 18, 2022
00e69d0
Fix underline length
binste Dec 18, 2022
66483c0
Fix wrong indent
binste Dec 18, 2022
5272420
Enable parsing of raw content
binste Dec 18, 2022
68843dc
Move myst-parser into doc requirements
binste Dec 19, 2022
7b3531e
Restrict setuptools to version < 64. See added comment for reasoning
binste Dec 19, 2022
ba5c716
Merge branch 'master' into address_docs_warnings
binste Dec 19, 2022
7ef558d
No longer wrap docstring lines where an attribute is introduced with …
binste Dec 20, 2022
0e2b804
Mention myst-parser
binste Dec 20, 2022
82252b1
Handle list entires that start with '-' or miss a whitespace after th…
binste Dec 21, 2022
467c288
Fix relative link to datetime type
binste Dec 21, 2022
164e7da
Fix 'Anonymous hyperlink mismatch'
binste Dec 21, 2022
17f71e8
Resolve duplicate definitions of Color and Text which appear in chann…
binste Dec 21, 2022
089dd09
Merge branch 'master' into address_docs_warnings
binste Dec 21, 2022
c3a3148
Format code
binste Dec 21, 2022
8fc0513
Update documentation on dependencies. Remove section in readme and re…
binste Dec 21, 2022
b1b4534
Move myst-parser requirement into requirements_dev.txt so that it's a…
binste Dec 21, 2022
56f2508
suppress warning usage geographic CRS for centroid
mattijn Dec 21, 2022
86a6455
Update geoshape.rst :: typo
mattijn Dec 21, 2022
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
21 changes: 3 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ points = alt.Chart(source).mark_point().encode(
x='Horsepower',
y='Miles_per_Gallon',
color=alt.condition(brush, 'Origin', alt.value('lightgray'))
).add_selection(
).add_params(
brush
)

Expand Down Expand Up @@ -211,23 +211,8 @@ visualization.

## Development install

Vega-Altair requires the following dependencies:

* [pandas](https://pandas.pydata.org/)
* [traitlets](https://github.com/ipython/traitlets)
* [IPython](https://github.com/ipython/ipython)

If you have cloned the repository, run the following command from the root of the repository:

```
pip install -e .[dev]
```

If you do not wish to clone the repository, you can install using:

```
pip install git+https://github.com/altair-viz/altair
```
Instructions on how to install Vega-Altair for development can be found in
[the documentation](https://altair-viz.github.io/getting_started/installation.html).

## Testing

Expand Down
2 changes: 1 addition & 1 deletion altair/examples/us_population_over_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
name="Year",
fields=["year"],
bind=alt.binding_range(min=1900, max=2000, step=10, name="Year"),
init={"year": 2000},
value={"year": 2000},
)

alt.Chart(source).mark_bar().encode(
Expand Down
1 change: 1 addition & 0 deletions altair/sphinxext/altairgallery.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@

EXAMPLE_TEMPLATE = jinja2.Template(
"""
:orphan:
:html_theme.sidebar_secondary.remove:

.. This document is auto-generated by the altair-gallery extension. Do not modify directly.
Expand Down
16 changes: 12 additions & 4 deletions altair/sphinxext/schematable.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import importlib
import re
import sys
import warnings
from os.path import abspath, dirname

from docutils import nodes, utils
from docutils import nodes, utils, frontend
from docutils.parsers.rst import Directive
from docutils.parsers.rst.directives import flag
from recommonmark.parser import CommonMarkParser
from myst_parser.docutils_ import Parser
from sphinx import addnodes

sys.path.insert(0, abspath(dirname(dirname(dirname(__file__)))))
from tools.schemapi.utils import fix_docstring_issues # noqa: E402


def type_description(schema):
"""Return a concise type description for the given schema"""
Expand Down Expand Up @@ -121,11 +126,14 @@ def build_row(item):
row += nodes.entry("", par_type, classes=["vl-type-def"])

# Description
md_parser = CommonMarkParser()
md_parser = Parser()
# str_descr = "***Required.*** " if required else ""
str_descr = ""
str_descr += propschema.get("description", " ")
doc_descr = utils.new_document("schema_description")
str_descr = fix_docstring_issues(str_descr)
document_settings = frontend.get_default_settings()
document_settings.setdefault("raw_enabled", True)
doc_descr = utils.new_document("schema_description", document_settings)
md_parser.parse(str_descr, doc_descr)

# row += nodes.entry('', *doc_descr.children, classes="vl-decsr")
Expand Down
Loading