Skip to content

Commit 231251f

Browse files
authored
docs cleanup (#249)
1 parent b044aba commit 231251f

File tree

7 files changed

+27
-19
lines changed

7 files changed

+27
-19
lines changed

cf_xarray/accessor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -915,9 +915,9 @@ def _process_signature(
915915
):
916916
"""
917917
Processes a function's signature, args, kwargs:
918-
1. Binds *args so that everthing is a Mapping from kwarg name to values
919-
2. Calls _rewrite_values to rewrite any special CF names to normal xarray names.
920-
This uses key_mappers
918+
1. Binds ``*args`` so that everthing is a Mapping from kwarg name to values
919+
2. Calls ``_rewrite_values`` to rewrite any special CF names to normal xarray names.
920+
This uses ``key_mappers``
921921
3. Unpacks arguments if necessary before returning them.
922922
"""
923923
sig = inspect.signature(func, follow_wrapped=False)

cf_xarray/scripts/make_doc.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ def make_criteria_csv():
2828

2929
# Criteria tables
3030
df = DataFrame.from_dict(coordinate_criteria)
31-
df = df.dropna(1, how="all")
31+
df = df.dropna(axis=1, how="all")
3232
df = df.applymap(lambda x: ", ".join(sorted(x)) if isinstance(x, tuple) else x)
33-
df = df.sort_index(0).sort_index(1)
33+
df = df.sort_index(axis=0).sort_index(axis=1)
3434

3535
# All criteria
3636
df.to_csv(os.path.join(csv_dir, "all_criteria.csv"))
3737

3838
# Axes and coordinates
3939
for keys, name in zip([_AXIS_NAMES, _COORD_NAMES], ["axes", "coords"]):
40-
subdf = df[sorted(keys)].dropna(1, how="all")
41-
subdf = subdf.dropna(1, how="all").transpose()
40+
subdf = df[sorted(keys)].dropna(axis=1, how="all")
41+
subdf = subdf.dropna(axis=1, how="all").transpose()
4242
subdf.to_csv(os.path.join(csv_dir, f"{name}_criteria.csv"))
4343

4444

@@ -52,7 +52,7 @@ def make_regex_csv():
5252
os.makedirs(csv_dir, exist_ok=True)
5353
df = DataFrame(regex, index=[0])
5454
df = df.applymap(lambda x: f"``{x}``")
55-
df = df.sort_index(1).transpose()
55+
df = df.sort_index(axis=1).transpose()
5656
df.to_csv(os.path.join(csv_dir, "all_regex.csv"), header=False)
5757

5858

ci/doc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ dependencies:
1414
- sphinx-autosummary-accessors
1515
- ipython
1616
- ipykernel
17+
- ipywidgets
1718
- pandas
1819
- pydata-sphinx-theme
1920
- pip:

doc/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,8 @@ help:
1818
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
1919
%: Makefile
2020
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21+
22+
.PHONY: clean
23+
clean:
24+
rm -rf $(BUILDDIR)/*
25+
rm -rf generated/*

doc/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
html_theme_options = {
155155
"github_url": "https://github.com/xarray-contrib/cf-xarray",
156156
"use_edit_page_button": True,
157-
"search_bar_position": "navbar",
157+
"navbar_end": "search-field.html",
158158
}
159159

160160
html_context = {
@@ -322,3 +322,5 @@
322322
}
323323
napoleon_use_param = True
324324
napoleon_use_rtype = True
325+
326+
numpydoc_show_class_members = False

doc/contributing.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,15 @@ Primarily for developer reference. Some of these could become public API if nece
5959
:toctree: generated/
6060

6161
~accessor._getattr
62+
~accessor._getitem
63+
~accessor._get_all
6264
~accessor._get_axis_coord
63-
~accessor._get_axis_coord_single
65+
~accessor._get_bounds
66+
~accessor._get_coords
67+
~accessor._get_custom_criteria
68+
~accessor._get_dims
69+
~accessor._get_groupby_time_accessor
70+
~accessor._get_indexes
6471
~accessor._get_measure
65-
~accessor._get_measure_variable
66-
accessor._CFWrappedPlotMethods._plot_decorator
72+
~accessor._get_with_standard_name
73+

doc/examples/index.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)