8000 DOC: Update some Sphinx doc files: · numpy/numpy-financial@4fb898a · GitHub
[go: up one dir, main page]

Skip to content

Commit 4fb898a

Browse files
DOC: Update some Sphinx doc files:
* Include a file for release notes. * Change the name of the rst files for the individual functions. * Use autosummary, and add a hidden toctree to prevent Sphinx warnings.
1 parent bfc1859 commit 4fb898a

File tree

14 files changed

+42
-24
lines changed

14 files changed

+42
-24
lines changed

doc/source/conf.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,7 @@
5050
# The theme to use for HTML and HTML Help pages. See the documentation for
5151
# a list of builtin themes.
5252
#
53-
# html_theme = 'alabaster'
54-
# html_theme = 'pyramid'
55-
# html_theme = 'nature'
5653
html_theme = 'bizstyle'
57-
# html_theme = 'classic'
5854
html_copy_source = False
5955

6056
# Add any paths that contain custom static files (such as style sheets) here,
@@ -66,5 +62,5 @@
6662
html_favicon = "_static/numpy_financial_favicon.png"
6763

6864
html_sidebars = {
69-
'**': ['globaltoc.html', 'searchbox.html'],
65+
'**': ['localtoc.html', 'searchbox.html'],
7066
}
File renamed without changes.

doc/source/generate_rst_function_files.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
def generate_rst_function_files():
1212
names = [name for name in dir(nf) if not name.startswith('_')]
1313
for name in names:
14-
with open('numpy_financial.' + name + '.rst', 'w') as f:
14+
with open(name + '.rst', 'w') as f:
1515
f.write('''{name}
1616
{underline}
1717

doc/source/index.rst

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
.. numpy-financial documentation master file, created by
2-
sphinx-quickstart on Tue Oct 1 23:15:00 2019.
3-
You can adapt this file completely to your liking, but it should at least
4-
contain the root `toctree` directive.
51

62
numpy-financial |version|
73
=========================
84

9-
The `numpy-financial` package contains a collection of elementary financial
5+
The `numpy-financial` package is a collection of elementary financial
106
functions.
117

128
The `financial functions in NumPy <https://numpy.org/doc/1.17/reference/routines.financial.html>`_
@@ -32,21 +28,40 @@ Functions
3228

3329
.. toctree::
3430
:maxdepth: 4
35-
:caption: Contents:
3631

3732
.. autosummary::
38-
:toctree: .
39-
40-
numpy_financial.fv
41-
numpy_financial.ipmt
42-
numpy_financial.irr
43-
numpy_financial.mirr
44-
numpy_financial.nper
45-
numpy_financial.npv
46-
numpy_financial.pmt
47-
numpy_financial.ppmt
48-
numpy_financial.pv
49-
numpy_financial.rate
33+
34+
fv
35+
ipmt
36+
irr
37+
mirr
38+
nper
39+
npv
40+
pmt
41+
ppmt
42+
pv
43+
rate
44+
45+
.. The following "hidden" toctree is a hack to prevent Sphinx warnings
46+
about "document isn't included in any toctree"
47+
48+
.. toctree::
49+
:hidden:
50+
51+
fv
52+
ipmt
53+
irr
54+
mirr
55+
nper
56+
npv
57+
pmt
58+
ppmt
59+
pv
60+
rate
61+
62+
63+
.. include:: release-notes.rst
64+
5065

5166

5267
Index and Search
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

doc/source/release-notes.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Release Notes
2+
-------------
3+
4+
X.Y.Z
5+
~~~~~
6+
* This is the initial release of numpy-financial. The functions were
7+
copied from NumPy 1.17.

0 commit comments

Comments
 (0)
0