Skip to content

Commit 9777042

Browse files
Adding initial sphinx structure (#19)
1 parent 34c7f68 commit 9777042

20 files changed

+382
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.swp
2+
_build

requirements.txt

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
sphinx==3.1.1
2+
sphinx-material==0.0.30
3+
recommonmark
4+
sphinx_markdown_tables
5+
sphinx_copybutton

spec/01_purpose_and_scope.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Purpose and scope
2+
3+
## Introduction
4+
5+
6+
7+
## History
8+
9+
10+
11+
## Scope (includes out-of-scope / non-goals)
12+
13+
14+
15+
## Stakeholders
16+
17+
18+
19+
20+
## High-level API overview
21+
22+
23+
24+
25+
## How to read this document
26+
27+
28+
29+
30+
## How to adopt this API
31+
32+
33+
34+
35+
## Definitions
36+
37+
38+
39+
40+
## References
41+

spec/02_use_cases.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Use cases
2+
3+
## Types of use cases
4+
5+
6+
7+
## Concrete use cases

spec/03_assumptions.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Assumptions
2+
3+
## Hardware environments
4+
5+
6+
7+
## Software environments
8+
9+
10+
11+
## Dependencies
12+
13+
14+
15+
## Interactive use & production code
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Backwards compatibility
2+
3+
This section discusses the impact on existing dataframe libraries of
4+
choices made in the API standard, and the trade-offs that went into them.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Data interchange mechanisms

spec/04_design_topics/index.rst

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Design topics & constraints
2+
===========================
3+
4+
.. toctree::
5+
:caption: Design topics & constraints
6+
:maxdepth: 1
7+
8+
backwards_compatibility
9+
data_interchange

spec/05_future_API_evolution.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Future API standard evolution
2+
3+
## Scope extensions
4+
5+
6+
7+
## Backwards compatibility
8+
9+
10+
11+
## Versioning
12+
13+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Dataframe basics
2+
3+
## Class name
4+
5+
6+
## Dataframe size
7+
8+
9+
## Columns names
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Column selection
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Filter rows

spec/06_API_specification/index.rst

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
API specification
2+
=================
3+
4+
.. toctree::
5+
:caption: API specification
6+
:maxdepth: 1
7+
8+
01_dataframe_basics
9+
02_column_selection
10+
03_filter_rows

spec/07_usage_data.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Data on existing API design & usage
2+
3+
## Summary
4+
5+
6+
7+
8+
## Methods
9+
10+
11+
12+
13+
## Tooling
14+
15+
16+
17+
## Detailed results and raw data

spec/08_verification_test_suite.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Verification - test suite
2+

spec/09_benchmark_suite.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Benchmark suite

spec/Makefile

+20
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)

spec/conf.py

+160
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
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+
from recommonmark.transform import AutoStructify
19+
20+
# -- Project information -----------------------------------------------------
21+
22+
project = 'Python dataframe API standard'
23+
copyright = '2020, Consortium for Python Data API Standards'
24+
author = 'Consortium for Python Data API Standards'
25+
26+
# The full version, including alpha/beta/rc tags
27+
release = '0.1-dev'
28+
29+
30+
# -- General configuration ---------------------------------------------------
31+
32+
# Add any Sphinx extension module names here, as strings. They can be
33+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
34+
# ones.
35+
extensions = [
36+
'recommonmark',
37+
'sphinx.ext.extlinks',
38+
'sphinx.ext.intersphinx',
39+
'sphinx.ext.todo',
40+
'sphinx_markdown_tables',
41+
'sphinx_copybutton',
42+
]
43+
44+
# Add any paths that contain templates here, relative to this directory.
45+
templates_path = ['_templates']
46+
47+
# List of patterns, relative to source directory, that match files and
48+
# directories to ignore when looking for source files.
49+
# This pattern also affects html_static_path and html_extra_path.
50+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
51+
52+
53+
# -- Options for HTML output -------------------------------------------------
54+
55+
# The theme to use for HTML and HTML Help pages. See the documentation for
56+
# a list of builtin themes.
57+
#
58+
extensions.append("sphinx_material")
59+
html_theme_path = sphinx_material.html_theme_path()
60+
html_context = sphinx_material.get_html_context()
61+
html_theme = 'sphinx_material'
62+
63+
# Add any paths that contain custom static files (such as style sheets) here,
64+
# relative to this directory. They are copied after the builtin static files,
65+
# so a file named "default.css" will overwrite the builtin "default.css".
66+
html_static_path = ['_static']
67+
68+
69+
# -- Material theme options (see theme.conf for more information) ------------
70+
html_show_sourcelink = False
71+
html_sidebars = {
72+
"**": ["logo-text.html", "globaltoc.html", "localtoc.html", "searchbox.html"]
73+
}
74+
75+
html_theme_options = {
76+
77+
# Set the name of the project to appear in the navigation.
78+
'nav_title': 'Python dataframe API standard',
79+
80+
# Set you GA account ID to enable tracking
81+
#'google_analytics_account': 'UA-XXXXX',
82+
83+
# Specify a base_url used to generate sitemap.xml. If not
84+
# specified, then no sitemap will be built.
85+
#'base_url': 'https://project.github.io/project',
86+
87+
# Set the color and the accent color (see
88+
# https://material.io/design/color/the-color-system.html)
89+
'color_primary': 'deep-purple',
90+
'color_accent': 'cyan',
91+
92+
# Set the repo location to get a badge with stats
93+
#'repo_url': 'https://github.com/project/project/',
94+
#'repo_name': 'Project',
95+
96+
"html_minify": False,
97+
"html_prettify": True,
98+
"css_minify": True,
99+
"logo_icon": "&#xe869",
100+
"repo_type": "github",
101+
"touch_icon": "images/apple-icon-152x152.png",
102+
"theme_color": "#2196f3",
103+
"master_doc": False,
104+
105+
# Visible levels of the global TOC; -1 means unlimited
106+
'globaltoc_depth': 2,
107+
# If False, expand all TOC entries
108+
'globaltoc_collapse': True,
109+
# If True, show hidden TOC entries
110+
'globaltoc_includehidden': True,
111+
112+
"nav_links": [
113+
{"href": "index", "internal": True, "title": "Array API standard"},
114+
{
115+
"href": "https://link-to-consortium-website",
116+
"internal": False,
117+
"title": "Consortium for Python Data API Standards",
118+
},
119+
],
120+
"heroes": {
121+
"index": "A common API for array and tensor Python libraries",
122+
#"customization": "Configuration options to personalize your site.",
123+
},
124+
125+
#"version_dropdown": True,
126+
#"version_json": "_static/versions.json",
127+
"table_classes": ["plain"],
128+
}
129+
130+
131+
todo_include_todos = True
132+
#html_favicon = "images/favicon.ico"
133+
134+
html_use_index = True
135+
html_domain_indices = True
136+
137+
extlinks = {
138+
"duref": (
139+
"http://docutils.sourceforge.net/docs/ref/rst/" "restructuredtext.html#%s",
140+
"",
141+
),
142+
"durole": ("http://docutils.sourceforge.net/docs/ref/rst/" "roles.html#%s", ""),
143+
"dudir": ("http://docutils.sourceforge.net/docs/ref/rst/" "directives.html#%s", ""),
144+
}
145+
146+
147+
# Enable eval_rst in markdown
148+
def setup(app):
149+
app.add_config_value(
150+
"recommonmark_config",
151+
{"enable_math": True, "enable_inline_math": True, "enable_eval_rst": True},
152+
True,
153+
)
154+
app.add_transform(AutoStructify)
155+
app.add_object_type(
156+
"confval",
157+
"confval",
158+
objname="configuration value",
159+
indextemplate="pair: %s; configuration value",
160+
)

spec/index.rst

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Python dataframe API standard
2+
=============================
3+
4+
Contents
5+
--------
6+
7+
.. toctree::
8+
:caption: Context
9+
:maxdepth: 1
10+
11+
01_purpose_and_scope
12+
02_use_cases
13+
03_assumptions
14+
15+
.. toctree::
16+
:caption: API
17+
:maxdepth: 1
18+
19+
04_design_topics/index
20+
05_future_API_evolution
21+
06_API_specification/index
22+
23+
.. toctree::
24+
:caption: Methodology and Usage
25+
:maxdepth: 1
26+
27+
07_usage_data
28+
08_verification_test_suite
29+
09_benchmark_suite

0 commit comments

Comments
 (0)