Skip to content

Commit ff4e635

Browse files
committed
start those docs
1 parent b4fdb36 commit ff4e635

File tree

10 files changed

+320
-2
lines changed

10 files changed

+320
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ build/
66
envs/
77
lib/
88
Untitled*.*
9+
libdoc/

.readthedocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
conda:
2+
file: environment.yml

anaconda-project.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,18 @@ commands:
5454
env_spec: rfjl37
5555

5656
install:win:
57-
windows: python -m pip install _artifacts\\sdist\\robotframework-jupyterlibrary-0.1.0.tar.gz --no-deps --ignore-installed -vv
57+
windows: python -m pip install _artifacts\\sdist\\robotframework-jupyterlibrary-0.1.0.tar.gz
58+
--no-deps --ignore-installed -vv
5859
env_spec: win_rfjl37
5960

61+
docs:
62+
unix: cd docs && make html
63+
env_spec: rfjl37
64+
65+
docs:libdoc:
66+
unix: python -m robot.libdoc JupyterLibrary docs/JupyterLibrary.html
67+
env_spec: rfjl37
68+
6069
env_specs:
6170
robotframework-jupyterlibrary:
6271
packages:
@@ -65,13 +74,17 @@ env_specs:
6574
- geckodriver
6675
- isort
6776
- jupyterlab >=0.35
77+
- nbsphinx
6878
- nodejs
6979
- pillow
7080
- python-chromedriver-binary
81+
- recommonmark
7182
- robotframework >=3.1
7283
- robotframework-lint
7384
- robotframework-seleniumlibrary >=3.2
7485
- six
86+
- sphinx
87+
- sphinx_rtd_theme
7588
- pip:
7689
- nteract_on_jupyter
7790
channels:

docs/Makefile

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

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.http://sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
33+
34+
:end
35+
popd

docs/source/conf.py

Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Configuration file for the Sphinx documentation builder.
4+
#
5+
# This file does only contain a selection of the most common options. For a
6+
# full list see the documentation:
7+
# http://www.sphinx-doc.org/en/master/config
8+
9+
from recommonmark.parser import CommonMarkParser
10+
11+
12+
# -- Path setup --------------------------------------------------------------
13+
14+
# If extensions (or modules to document with autodoc) are in another directory,
15+
# add these directories to sys.path here. If the directory is relative to the
16+
# documentation root, use os.path.abspath to make it absolute, like shown here.
17+
#
18+
# import os
19+
# import sys
20+
# sys.path.insert(0, os.path.abspath('.'))
21+
22+
23+
# -- Project information -----------------------------------------------------
24+
25+
project = "JupyterLibrary"
26+
copyright = "2018, Nick Bollweg"
27+
author = "Nick Bollweg"
28+
29+
# The short X.Y version
30+
version = ""
31+
# The full version, including alpha/beta/rc tags
32+
release = ""
33+
34+
35+
# -- General configuration ---------------------------------------------------
36+
37+
# If your documentation needs a minimal Sphinx version, state it here.
38+
#
39+
# needs_sphinx = '1.0'
40+
41+
# Add any Sphinx extension module names here, as strings. They can be
42+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
43+
# ones.
44+
extensions = [
45+
"nbsphinx",
46+
"sphinx.ext.autodoc",
47+
"sphinx.ext.coverage",
48+
"sphinx.ext.doctest",
49+
"sphinx.ext.githubpages",
50+
"sphinx.ext.ifconfig",
51+
"sphinx.ext.intersphinx",
52+
"sphinx.ext.mathjax",
53+
"sphinx.ext.todo",
54+
"sphinx.ext.viewcode",
55+
]
56+
57+
# Add any paths that contain templates here, relative to this directory.
58+
templates_path = ["_templates"]
59+
60+
# The suffix(es) of source filenames.
61+
# You can specify multiple suffix as a list of string:
62+
#
63+
source_suffix = [".rst", ".md"]
64+
65+
66+
source_parsers = {".md": CommonMarkParser}
67+
68+
# The master toctree document.
69+
master_doc = "index"
70+
71+
# The language for content autogenerated by Sphinx. Refer to documentation
72+
# for a list of supported languages.
73+
#
74+
# This is also used if you do content translation via gettext catalogs.
75+
# Usually you set "language" from the command line for these cases.
76+
language = None
77+
78+
# List of patterns, relative to source directory, that match files and
79+
# directories to ignore when looking for source files.
80+
# This pattern also affects html_static_path and html_extra_path.
81+
exclude_patterns = []
82+
83+
html_extra_path = ["libdoc/JupyterLibrary.html"]
84+
85+
# The name of the Pygments (syntax highlighting) style to use.
86+
pygments_style = None
87+
88+
89+
# -- Options for HTML output -------------------------------------------------
90+
91+
# The theme to use for HTML and HTML Help pages. See the documentation for
92+
# a list of builtin themes.
93+
#
94+
html_theme = "sphinx_rtd_theme"
95+
96+
# Theme options are theme-specific and customize the look and feel of a theme
97+
# further. For a list of options available for each theme, see the
98+
# documentation.
99+
#
100+
# html_theme_options = {}
101+
102+
# Add any paths that contain custom static files (such as style sheets) here,
103+
# relative to this directory. They are copied after the builtin static files,
104+
# so a file named "default.css" will overwrite the builtin "default.css".
105+
html_static_path = ["_static"]
106+
107+
# Custom sidebar templates, must be a dictionary that maps document names
108+
# to template names.
109+
#
110+
# The default sidebars (for documents that don't match any pattern) are
111+
# defined by theme itself. Builtin themes are using these templates by
112+
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
113+
# 'searchbox.html']``.
114+
#
115+
# html_sidebars = {}
116+
117+
118+
# -- Options for HTMLHelp output ---------------------------------------------
119+
120+
# Output file base name for HTML help builder.
121+
htmlhelp_basename = "jupyterlibrarydoc"
122+
123+
124+
# -- Options for LaTeX output ------------------------------------------------
125+
126+
latex_elements = {
127+
# The paper size ('letterpaper' or 'a4paper').
128+
#
129+
# 'papersize': 'letterpaper',
130+
# The font size ('10pt', '11pt' or '12pt').
131+
#
132+
# 'pointsize': '10pt',
133+
# Additional stuff for the LaTeX preamble.
134+
#
135+
# 'preamble': '',
136+
# Latex figure (float) alignment
137+
#
138+
# 'figure_align': 'htbp',
139+
}
140+
141+
# Grouping the document tree into LaTeX files. List of tuples
142+
# (source start file, target name, title,
143+
# author, documentclass [howto, manual, or own class]).
144+
latex_documents = [
145+
(
146+
master_doc,
147+
"jupyterlibrary.tex",
148+
"JupyterLibrary Documentation",
149+
"Nick Bollweg",
150+
"manual",
151+
)
152+
]
153+
154+
155+
# -- Options for manual page output ------------------------------------------
156+
157+
# One entry per manual page. List of tuples
158+
# (source start file, name, description, authors, manual section).
159+
man_pages = [
160+
(master_doc, "jupyterlibrary", "JupyterLibrary Documentation", [author], 1)
161+
]
162+
163+
164+
# -- Options for Texinfo output ----------------------------------------------
165+
166+
# Grouping the document tree into Texinfo files. List of tuples
167+
# (source start file, target name, title, author,
168+
# dir menu entry, description, category)
169+
texinfo_documents = [
170+
(
171+
master_doc,
172+
"jupyterlibrary",
173+
"JupyterLibrary Documentation",
174+
author,
175+
"jupyterlibrary",
176+
"One line description of project.",
177+
"Miscellaneous",
178+
)
179+
]
180+
181+
182+
# -- Options for Epub output -------------------------------------------------
183+
184+
# Bibliographic Dublin Core info.
185+
epub_title = project
186+
187+
# The unique identifier of the text. This can be a ISBN number
188+
# or the project homepage.
189+
#
190+
# epub_identifier = ''
191+
192+
# A unique identification for the text.
193+
#
194+
# epub_uid = ''
195+
196+
# A list of files that should not be packed into the epub file.
197+
epub_exclude_files = ["search.html"]
198+
199+
200+
# -- Extension configuration -------------------------------------------------
201+
202+
# -- Options for intersphinx extension ---------------------------------------
203+
204+
# Example configuration for intersphinx: refer to the Python standard library.
205+
intersphinx_mapping = {"https://docs.python.org/": None}
206+
207+
# -- Options for todo extension ----------------------------------------------
208+
209+
# If true, `todo` and `todoList` produce output, else they produce nothing.
210+
todo_include_todos = True
211+
212+
213+
def setup(app):
214+
import sys
215+
import subprocess
216+
217+
subprocess.run(
218+
[
219+
sys.executable,
220+
"-m",
221+
"robot.libdoc",
222+
"JupyterLibrary",
223+
"source/libdoc/JupyterLibrary.html",
224+
]
225+
)

docs/source/index.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Welcome to JupyterLibrary's documentation!
2+
=========================================================
3+
4+
`Keyword Documentation`_
5+
6+
.. _Keyword Documentation: JupyterLibrary.html
7+
8+
.. toctree::
9+
:maxdepth: 2
10+
:caption: Contents:
11+
12+
13+
14+
Indices and tables
15+
==================
16+
17+
* :ref:`genindex`
18+
* :ref:`modindex`
19+
* :ref:`search`

docs/source/libdoc/.gitkeep

Whitespace-only changes.

environment.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@ dependencies:
1010
- geckodriver
1111
- isort
1212
- jupyterlab >=0.35
13+
- nbsphinx
1314
- nodejs
1415
- pillow
1516
- python-chromedriver-binary
17+
- recommonmark
1618
- robotframework >=3.1
1719
- robotframework-lint
1820
- robotframework-seleniumlibrary >=3.2
1921
- six
22+
- sphinx
23+
- sphinx_rtd_theme
2024
- pip:
2125
- nteract_on_jupyter

scripts/lint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from subprocess import check_call
22

33

4-
PY_SRC = ["src", "setup.py", "scripts"]
4+
PY_SRC = ["src", "setup.py", "scripts", "docs"]
55
RF_SRC = ["atest", "src"]
66

77

0 commit comments

Comments
 (0)