Skip to content

Commit 6cc4401

Browse files
committed
Create a Sphinx site for the dataframe interchange protocol
1 parent bcb5024 commit 6cc4401

File tree

7 files changed

+554
-105
lines changed

7 files changed

+554
-105
lines changed

protocol/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

protocol/conf.py

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
7+
# -- Path setup --------------------------------------------------------------
8+
9+
# If extensions (or modules to document with autodoc) are in another directory,
10+
# add these directories to sys.path here. If the directory is relative to the
11+
# documentation root, use os.path.abspath to make it absolute, like shown here.
12+
#
13+
# import os
14+
# import sys
15+
# sys.path.insert(0, os.path.abspath('.'))
16+
17+
import sphinx_material
18+
19+
# -- Project information -----------------------------------------------------
20+
21+
project = 'Python dataframe interchange protocol'
22+
copyright = '2021, Consortium for Python Data API Standards'
23+
author = 'Consortium for Python Data API Standards'
24+
25+
# The full version, including alpha/beta/rc tags
26+
release = '2021-DRAFT'
27+
28+
29+
# -- General configuration ---------------------------------------------------
30+
31+
# Add any Sphinx extension module names here, as strings. They can be
32+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
33+
# ones.
34+
extensions = [
35+
'myst_parser',
36+
'sphinx.ext.extlinks',
37+
'sphinx.ext.intersphinx',
38+
'sphinx.ext.todo',
39+
'sphinx_markdown_tables',
40+
'sphinx_copybutton',
41+
]
42+
43+
# Add any paths that contain templates here, relative to this directory.
44+
templates_path = ['_templates']
45+
46+
# List of patterns, relative to source directory, that match files and
47+
# directories to ignore when looking for source files.
48+
# This pattern also affects html_static_path and html_extra_path.
49+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
50+
51+
# MyST options
52+
myst_heading_anchors = 3
53+
myst_enable_extensions = ["colon_fence"]
54+
55+
# -- Options for HTML output -------------------------------------------------
56+
57+
# The theme to use for HTML and HTML Help pages. See the documentation for
58+
# a list of builtin themes.
59+
#
60+
extensions.append("sphinx_material")
61+
html_theme_path = sphinx_material.html_theme_path()
62+
html_context = sphinx_material.get_html_context()
63+
html_theme = 'sphinx_material'
64+
65+
# Add any paths that contain custom static files (such as style sheets) here,
66+
# relative to this directory. They are copied after the builtin static files,
67+
# so a file named "default.css" will overwrite the builtin "default.css".
68+
html_static_path = ['_static']
69+
70+
71+
# -- Material theme options (see theme.conf for more information) ------------
72+
html_show_sourcelink = False
73+
html_sidebars = {
74+
"**": ["logo-text.html", "globaltoc.html", "localtoc.html", "searchbox.html"]
75+
}
76+
77+
html_theme_options = {
78+
79+
# Set the name of the project to appear in the navigation.
80+
'nav_title': 'Python dataframe interchange protocol',
81+
82+
# Set you GA account ID to enable tracking
83+
#'google_analytics_account': 'UA-XXXXX',
84+
85+
# Specify a base_url used to generate sitemap.xml. If not
86+
# specified, then no sitemap will be built.
87+
#'base_url': 'https://project.github.io/project',
88+
89+
# Set the color and the accent color (see
90+
# https://material.io/design/color/the-color-system.html)
91+
'color_primary': 'indigo',
92+
'color_accent': 'green',
93+
94+
# Set the repo location to get a badge with stats
95+
#'repo_url': 'https://github.com/project/project/',
96+
#'repo_name': 'Project',
97+
98+
"html_minify": False,
99+
"html_prettify": True,
100+
"css_minify": True,
101+
"logo_icon": "&#xe869",
102+
"repo_type": "github",
103+
"touch_icon": "images/apple-icon-152x152.png",
104+
"theme_color": "#2196f3",
105+
"master_doc": False,
106+
107+
# Visible levels of the global TOC; -1 means unlimited
108+
'globaltoc_depth': 2,
109+
# If False, expand all TOC entries
110+
'globaltoc_collapse': True,
111+
# If True, show hidden TOC entries
112+
'globaltoc_includehidden': True,
113+
114+
"nav_links": [
115+
{"href": "index", "internal": True, "title": "Dataframe interchange protcol"},
116+
{
117+
"href": "https://data-apis.org",
118+
"internal": False,
119+
"title": "Consortium for Python Data API Standards",
120+
},
121+
],
122+
"heroes": {
123+
"index": "A protocol for zero-copy data interchange between Python dataframe libraries",
124+
#"customization": "Configuration options to personalize your site.",
125+
},
126+
127+
#"version_dropdown": True,
128+
#"version_json": "_static/versions.json",
129+
"table_classes": ["plain"],
130+
}
131+
132+
133+
todo_include_todos = True
134+
#html_favicon = "images/favicon.ico"
135+
136+
html_use_index = True
137+
html_domain_indices = True
138+
139+
extlinks = {
140+
"duref": (
141+
"http://docutils.sourceforge.net/docs/ref/rst/" "restructuredtext.html#%s",
142+
"",
143+
),
144+
"durole": ("http://docutils.sourceforge.net/docs/ref/rst/" "roles.html#%s", ""),
145+
"dudir": ("http://docutils.sourceforge.net/docs/ref/rst/" "directives.html#%s", ""),
146+
}

0 commit comments

Comments
 (0)