Skip to content

Commit da257e8

Browse files
committed
Merge branch 'doc-add-changelog'
* improve docstrings to class-registry functions * resolve py:obj sphinx links in docstrings * clean up autogenerated API docs * add release-notes page * move license to a separate page * fix documentation project name * activate intersphinx extension * switch to sphinx_py3doc_enhanced_theme
2 parents 42a8dc1 + d855e38 commit da257e8

File tree

9 files changed

+128
-105
lines changed

9 files changed

+128
-105
lines changed

CHANGELOG.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Release notes
2+
3+
## Unreleased - Version 1.3.0
4+
5+
Main differences from version 1.2.
6+
7+
### Added
8+
9+
- Support for Python 3.7, 3.6, 3.5 in addition to 2.7.
10+
- Validation of compiler options from `python-config`.
11+
- Make scons scripts compatible with Python 3 and Python 2.
12+
- `ConstantPeakWidth` attributes `uisowidth`, `bisowidth` to ease
13+
PDF simulation with uniform isotropic atom displacements.
14+
15+
### Changed
16+
17+
- Require libdiffpy 1.4 or later.
18+
- Build Anaconda package with Anaconda C++ compiler.
19+
- Allow language standard c++11.
20+
- Pickle format for `PDFCalculator`, `DebyePDFCalculator`,
21+
`OverlapCalculator`, `PeakWidthModel`, `PeakProfile`, `PDFEnvelope`,
22+
`PDFBaseline`, and `ScatteringFactorTable` objects.
23+
24+
### Deprecated
25+
26+
- Variable `__gitsha__` in the `version` module renamed to `__git_commit__`.
27+
- `libdiffpy_version_info` attribute `git_sha` renamed to `git_commit`.
28+
29+
### Removed
30+
31+
- Unused method `BVParam.__hash__`.
32+
- Disable pickling of `BasePairQuantity` as it is in effect abstract.
33+
- Pickling of Python-added attributes to exported C++ classes.
34+
- Function `get_libdiffpy_version_info` from the `version` module.
35+
36+
### Fixed
37+
38+
- Return value conversion of `CrystalStructureAdapter` methods
39+
`expandLatticeAtom` and `getEquivalentAtoms` methods.
40+
Make them return a `list` of `Atom` objects.
41+
- Name suffix resolution of `boost_python` shared library.

doc/manual/source/api/diffpy.rst

-17
This file was deleted.

doc/manual/source/api/diffpy.srreal.rst

+11-23
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
1+
:tocdepth: 2
2+
3+
.. default-role:: py:obj
4+
15
diffpy.srreal package
26
=====================
37

8+
.. automodule:: diffpy.srreal
9+
:members:
10+
:undoc-members:
11+
:show-inheritance:
12+
413
Submodules
514
----------
615

@@ -141,13 +150,7 @@ diffpy.srreal.structureadapter module
141150
:undoc-members:
142151
:show-inheritance:
143152

144-
diffpy.srreal.structureconverters module
145-
----------------------------------------
146-
147-
.. automodule:: diffpy.srreal.structureconverters
148-
:members:
149-
:undoc-members:
150-
:show-inheritance:
153+
.. skip internal module diffpy.srreal.structureconverters
151154
152155
diffpy.srreal.version module
153156
----------------------------
@@ -157,19 +160,4 @@ diffpy.srreal.version module
157160
:undoc-members:
158161
:show-inheritance:
159162

160-
diffpy.srreal.wraputils module
161-
------------------------------
162-
163-
.. automodule:: diffpy.srreal.wraputils
164-
:members:
165-
:undoc-members:
166-
:show-inheritance:
167-
168-
169-
Module contents
170-
---------------
171-
172-
.. automodule:: diffpy.srreal
173-
:members:
174-
:undoc-members:
175-
:show-inheritance:
163+
.. skip internal module diffpy.srreal.wraputils

doc/manual/source/api/modules.rst

-7
This file was deleted.

doc/manual/source/conf.py

+32-21
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
#
4-
# diffpy.SrReal documentation build configuration file, created by
4+
# diffpy.srreal documentation build configuration file, created by
55
# sphinx-quickstart on Tue Oct 22 12:02:48 2013.
66
#
77
# This file is execfile()d with the current directory set to its containing dir.
@@ -12,17 +12,18 @@
1212
# All configuration values have a default; values that are commented out
1313
# serve to show the default.
1414

15-
import sys, os
15+
import sys
16+
import os
1617
import time
1718

1819
# If extensions (or modules to document with autodoc) are in another directory,
1920
# add these directories to sys.path here. If the directory is relative to the
2021
# documentation root, use os.path.abspath to make it absolute, like shown here.
21-
# sys.path.insert(0, os.path.abspath('.'))
22-
# sys.path.insert(0, os.path.abspath('../../..'))
22+
#sys.path.insert(0, os.path.abspath('.'))
23+
sys.path.insert(0, os.path.abspath('../../..'))
2324

2425
# abbreviations
25-
ab_authors = 'Pavol Juhás, Christopher L. Farrow, Simon J.L. Billinge group'
26+
ab_authors = u'Pavol Juhás, Christopher L. Farrow, Simon J.L. Billinge group'
2627

2728
# -- General configuration -----------------------------------------------------
2829

@@ -31,14 +32,21 @@
3132

3233
# Add any Sphinx extension module names here, as strings. They can be extensions
3334
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
34-
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest',
35-
'sphinx.ext.coverage', 'sphinx.ext.napoleon']
35+
extensions = [
36+
'sphinx.ext.autodoc',
37+
'sphinx.ext.coverage',
38+
'sphinx.ext.napoleon',
39+
'sphinx.ext.intersphinx',
40+
'm2r',
41+
]
3642

3743
# Add any paths that contain templates here, relative to this directory.
3844
templates_path = ['_templates']
3945

40-
# The suffix of source filenames.
41-
source_suffix = '.rst'
46+
# The suffix(es) of source filenames.
47+
# You can specify multiple suffix as a list of string:
48+
#
49+
source_suffix = ['.rst', '.md']
4250

4351
# The encoding of source files.
4452
# source_encoding = 'utf-8-sig'
@@ -47,16 +55,14 @@
4755
master_doc = 'index'
4856

4957
# General information about the project.
50-
project = 'SrReal'
58+
project = 'diffpy.srreal'
5159
copyright = '%Y, Brookhaven National Laboratory'
5260

5361
# The version info for the project you're documenting, acts as replacement for
5462
# |version| and |release|, also used in various other places throughout the
5563
# built documents.
56-
sys.path.insert(0, os.path.abspath('../../..'))
5764
from setup import versiondata
5865
fullversion = versiondata.get('DEFAULT', 'version')
59-
sys.path.remove(os.path.abspath('../../..'))
6066
# The short X.Y version.
6167
version = ''.join(fullversion.split('.post')[:1])
6268
# The full version, including alpha/beta/rc tags.
@@ -108,13 +114,15 @@
108114

109115
# The theme to use for HTML and HTML Help pages. See the documentation for
110116
# a list of builtin themes.
111-
html_theme = 'default'
117+
html_theme = 'sphinx_py3doc_enhanced_theme'
112118

113119
# Theme options are theme-specific and customize the look and feel of a theme
114120
# further. For a list of options available for each theme, see the
115121
# documentation.
116-
# html_theme_options = {}
117-
html_theme_options = {'collapsiblesidebar' : 'true'}
122+
html_theme_options = {
123+
'collapsiblesidebar' : 'true',
124+
'navigation_with_keys' : 'true',
125+
}
118126

119127
# Add any paths that contain custom themes here, relative to this directory.
120128
# html_theme_path = []
@@ -182,7 +190,7 @@
182190
# html_file_suffix = None
183191

184192
# Output file base name for HTML help builder.
185-
htmlhelp_basename = 'SrRealdoc'
193+
htmlhelp_basename = 'srrealdoc'
186194

187195

188196
# -- Options for LaTeX output --------------------------------------------------
@@ -201,7 +209,7 @@
201209
# Grouping the document tree into LaTeX files. List of tuples
202210
# (source start file, target name, title, author, documentclass [howto/manual]).
203211
latex_documents = [
204-
('index', 'SrReal_manual.tex', 'SrReal Documentation',
212+
('index', 'diffpy.srreal.tex', 'diffpy.srreal Documentation',
205213
ab_authors, 'manual'),
206214
]
207215

@@ -231,7 +239,7 @@
231239
# One entry per manual page. List of tuples
232240
# (source start file, name, description, authors, manual section).
233241
man_pages = [
234-
('index', 'srreal', 'SrReal Documentation',
242+
('index', 'diffpy.srreal', 'diffpy.srreal Documentation',
235243
ab_authors, 1)
236244
]
237245

@@ -245,8 +253,8 @@
245253
# (source start file, target name, title, author,
246254
# dir menu entry, description, category)
247255
texinfo_documents = [
248-
('index', 'SrReal', 'SrReal Documentation',
249-
ab_authors, 'SrReal', 'One line description of project.',
256+
('index', 'diffpy.srreal', 'diffpy.srreal Documentation',
257+
ab_authors, 'diffpy.srreal', 'One line description of project.',
250258
'Miscellaneous'),
251259
]
252260

@@ -261,4 +269,7 @@
261269

262270

263271
# Example configuration for intersphinx: refer to the Python standard library.
264-
# intersphinx_mapping = {'http://docs.python.org/': None}
272+
intersphinx_mapping = {
273+
'numpy': ('https://docs.scipy.org/doc/numpy', None),
274+
'python' : ('https://docs.python.org/3.7', None),
275+
}

doc/manual/source/index.rst

+23-32
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
1-
.. SrReal documentation master file, created by
2-
sphinx-quickstart on Tue Oct 22 12:02:48 2013.
3-
You can adapt this file completely to your liking, but it should at least
4-
contain the root `toctree` directive.
5-
61
####################################################
72
diffpy.srreal documentation
83
####################################################
94

10-
Software version |release|.
11-
12-
Last updated |today|.
13-
14-
diffpy.srreal - calculators for PDF, bond valence sum and other pair quantities
5+
diffpy.srreal - calculators for PDF, bond valence sum and other pair quantities.
156

7+
| Software version |release|.
8+
| Last updated |today|.
169
1710
The diffpy.srreal package provides calculators for atomic pair distribution
1811
function (PDF), bond valence sums (BVS), atom overlaps for a hard-sphere
@@ -44,41 +37,39 @@ calculate PDF with a user-defined profile function. A new calculator class
4437
can be also defined for any quantity that is obtained by iteration over atom
4538
pairs, by defining only the function that processes atom-pair contributions.
4639

47-
===================
48-
Disclaimer
49-
===================
50-
51-
.. literalinclude:: ../../../LICENSE.txt
52-
53-
================
54-
Acknowledgments
55-
================
56-
57-
Developers
58-
-----------
59-
60-
diffpy.srreal is developed and maintained by
40+
========================================
41+
Authors
42+
========================================
6143

62-
.. literalinclude:: ../../../AUTHORS.txt
44+
diffpy.srreal is developed by members of the Billinge Group at
45+
Columbia University and at Brookhaven National Laboratory including
46+
Pavol Juhás, Christopher L. Farrow, Simon J.L. Billinge.
6347

48+
For a detailed list of contributors see
49+
https://github.com/diffpy/diffpy.srreal/graphs/contributors.
6450

6551
======================================
6652
Installation
6753
======================================
6854

69-
See the `README.rst <https://github.com/diffpy/diffpy.srreal#requirements>`_
55+
See the `README <https://github.com/diffpy/diffpy.srreal#requirements>`_
7056
file included with the distribution.
7157

72-
7358
======================================
74-
API and Index
59+
Table of contents
7560
======================================
7661

7762
.. toctree::
78-
:maxdepth: 2
79-
80-
api/diffpy.srreal.rst
81-
63+
:titlesonly:
64+
65+
license
66+
release
67+
Package API <api/diffpy.srreal>
68+
69+
======================================
70+
Indices
71+
======================================
72+
8273
* :ref:`genindex`
8374
* :ref:`modindex`
8475
* :ref:`search`

doc/manual/source/license.rst

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. index:: license
2+
13
License
24
#######
35

doc/manual/source/release.rst

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.. index:: release notes
2+
3+
.. mdinclude:: ../../../CHANGELOG.md

0 commit comments

Comments
 (0)