Skip to content

Commit bab7e4e

Browse files
committed
fix #175 : added sphinx documentation directory + prepared changelog files.
1 parent f1082e4 commit bab7e4e

File tree

7 files changed

+333
-1
lines changed

7 files changed

+333
-1
lines changed

doc/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)

doc/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

doc/source/changes/template.rst.inc

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
.. py:currentmodule:: larray_editor
2+
3+
Syntax changes
4+
--------------
5+
6+
* renamed ``MappingEditor.old_method_name()`` to :py:obj:`MappingEditor.new_method_name()` (closes :issue:`1`).
7+
8+
* renamed ``old_argument_name`` argument of :py:obj:`MappingEditor.method_name()` to ``new_argument_name``.
9+
10+
11+
Backward incompatible changes
12+
-----------------------------
13+
14+
* other backward incompatible changes
15+
16+
17+
New features
18+
------------
19+
20+
* added a feature (see the :ref:`miscellaneous section <misc>` for details).
21+
22+
* added another feature in the editor (closes :editor_issue:`1`).
23+
24+
.. note::
25+
26+
- It works for foo bar !
27+
- It does not work for foo baz !
28+
29+
30+
.. _misc:
31+
32+
Miscellaneous improvements
33+
--------------------------
34+
35+
* improved something.
36+
37+
38+
Fixes
39+
-----
40+
41+
* fixed something (closes :issue:`1`).
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Miscellaneous improvements
2+
--------------------------
3+
4+
* improved something.
5+
6+
7+
Fixes
8+
-----
9+
10+
* fixed something (closes :issue:`1`).

doc/source/conf.py

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

doc/source/index.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.. LArray-Editor documentation master file, created by
2+
sphinx-quickstart on Fri Apr 12 14:25:10 2019.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
7+
Welcome to LArray-Editor's documentation!
8+
=========================================
9+
10+
.. toctree::
11+
:maxdepth: 2
12+
:caption: Contents:
13+
14+
15+
16+
Indices and tables
17+
==================
18+
19+
* :ref:`genindex`
20+
* :ref:`modindex`
21+
* :ref:`search`

make_release.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
TMP_PATH_CONDA = r"c:\tmp\editor_conda_new_release"
2121
PACKAGE_NAME = "larray-editor"
2222
SRC_CODE = "larray_editor"
23-
SRC_DOC = None
23+
SRC_DOC = join('doc', 'source')
2424

2525
GITHUB_REP = "https://github.com/larray-project/larray-editor"
2626
CONDA_FEEDSTOCK_REP = "https://github.com/larray-project/larray-editor-feedstock.git"

0 commit comments

Comments
 (0)