Skip to content

Commit e328098

Browse files
committed
Merge branch 'doc-add-changelog'
* fix inclusion of moved source files * add release-notes page * clean up autogenerated API docs * move license to a separate page * fix documentation project name * activate intersphinx extension * switch to sphinx_py3doc_enhanced_theme
2 parents 036e96d + 4c88e37 commit e328098

File tree

9 files changed

+93
-65
lines changed

9 files changed

+93
-65
lines changed

CHANGELOG.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Release notes
2+
3+
## unreleased - Version 3.0.0
4+
5+
Differences from version 1.3.
6+
7+
### Added
8+
9+
- Support for Python 3.7, 3.6, 3.5 in addition to 2.7.
10+
11+
### Changed
12+
13+
- Always use lower-case imports from `diffpy.structure`.
14+
- Use numeric-value sort to order variables in `PrintFitHook`.
15+
16+
### Deprecated
17+
18+
- Variable `__gitsha__` in the `version` module renamed to `__git_commit__`.
19+
20+
### Removed
21+
22+
- Optional upper and lower-bound arguments in `Parameter.setValue`.
23+
The bounds can be set with `Parameter.boundRange` instead.
24+
- Unused classes `ListOperator`, `SetOperator`.
25+
26+
### Fixed
27+
28+
- Metadata retrieval from `PDFContribution` hierarchy.
29+
- Refresh `PDFGenerator` when its `rgrid` is changed in-place.
30+
- Zero division in the `nppdfsas.py` example.
31+
- Crash in `ellipsoidsas.py` example because of bug in `Parameter.setValue`.
32+
- Pickling of `ProfileGenerator` objects and of bound class methods.
33+
- Invalid escape sequences in string values.

doc/manual/source/api/diffpy.rst

-17
This file was deleted.

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

+3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
:tocdepth: 2
2+
13
diffpy.srfit package
24
====================
35

46
Subpackages
57
-----------
68

79
.. toctree::
10+
:maxdepth: 2
811

912
diffpy.srfit.equation
1013
diffpy.srfit.fitbase

doc/manual/source/api/modules.rst

-7
This file was deleted.

doc/manual/source/conf.py

+25-14
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,20 @@
3131

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

3741
# Add any paths that contain templates here, relative to this directory.
3842
templates_path = ['_templates']
3943

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

4349
# The encoding of source files.
4450
# source_encoding = 'utf-8-sig'
@@ -47,7 +53,7 @@
4753
master_doc = 'index'
4854

4955
# General information about the project.
50-
project = u'SrFit'
56+
project = u'diffpy.srfit'
5157
copyright = u'%Y, Brookhaven National Laboratory'
5258

5359
# The version info for the project you're documenting, acts as replacement for
@@ -107,13 +113,15 @@
107113

108114
# The theme to use for HTML and HTML Help pages. See the documentation for
109115
# a list of builtin themes.
110-
html_theme = 'default'
116+
html_theme = 'sphinx_py3doc_enhanced_theme'
111117

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

118126
# Add any paths that contain custom themes here, relative to this directory.
119127
# html_theme_path = []
@@ -181,7 +189,7 @@
181189
# html_file_suffix = None
182190

183191
# Output file base name for HTML help builder.
184-
htmlhelp_basename = 'SrFitdoc'
192+
htmlhelp_basename = 'srfitdoc'
185193

186194

187195
# -- Options for LaTeX output --------------------------------------------------
@@ -200,7 +208,7 @@
200208
# Grouping the document tree into LaTeX files. List of tuples
201209
# (source start file, target name, title, author, documentclass [howto/manual]).
202210
latex_documents = [
203-
('index', 'SrFit_manual.tex', u'SrFit Documentation',
211+
('index', 'srfit_manual.tex', u'diffpy.srfit documentation',
204212
ab_authors, 'manual'),
205213
]
206214

@@ -230,7 +238,7 @@
230238
# One entry per manual page. List of tuples
231239
# (source start file, name, description, authors, manual section).
232240
man_pages = [
233-
('index', 'srfit', u'SrFit Documentation',
241+
('index', 'diffpy.srfit', u'diffpy.srfit documentation',
234242
ab_authors, 1)
235243
]
236244

@@ -244,8 +252,8 @@
244252
# (source start file, target name, title, author,
245253
# dir menu entry, description, category)
246254
texinfo_documents = [
247-
('index', 'SrFit', u'SrFit Documentation',
248-
ab_authors, 'SrFit', 'One line description of project.',
255+
('index', 'diffpy.srfit', u'diffpy.srfit documentation',
256+
ab_authors, 'diffpy.srfit', 'One line description of project.',
249257
'Miscellaneous'),
250258
]
251259

@@ -260,4 +268,7 @@
260268

261269

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

doc/manual/source/extending.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ external program before or after interfacing with SrFit. An example of a
180180
customized Profile is the ``SASProfile`` class in the
181181
``diffpy.srfit.sas.sasprofile`` module:
182182

183-
.. literalinclude:: ../../../diffpy/srfit/sas/sasprofile.py
183+
.. literalinclude:: ../../../src/diffpy/srfit/sas/sasprofile.py
184184
:pyobject: SASProfile
185185

186186
The ``__init__`` method sets the ``xobs``, ``yobs`` and ``dyobs`` attributes of
@@ -218,7 +218,7 @@ to keep the restraint cost comparable to the residual of a single data point.
218218
``Restraint`` whose penalty is the root-mean-square deviation from the expected
219219
and calculated BVS of a structure.
220220

221-
.. literalinclude:: ../../../diffpy/srfit/structure/bvsrestraint.py
221+
.. literalinclude:: ../../../src/diffpy/srfit/structure/bvsrestraint.py
222222
:pyobject: BVSRestraint
223223

224224
Note that the penalty scaling is optional (selected by the `scaled` flag) and
@@ -230,7 +230,7 @@ restrainable object. A ``BVSRestraint`` is used to restrain a ``SrRealParSet``,
230230
which is a ``ParameterSet`` wrapper base class for SrReal-compatible
231231
structures. The restraint is applied with the ``restrainBVS`` method.
232232

233-
.. literalinclude:: ../../../diffpy/srfit/structure/srrealparset.py
233+
.. literalinclude:: ../../../src/diffpy/srfit/structure/srrealparset.py
234234
:pyobject: SrRealParSet.restrainBVS
235235

236236
The purpose of the method is to create the custom ``Restraint`` object,

doc/manual/source/index.rst

+24-24
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
.. _developers-guide-index:
22

33
####################################################
4-
SrFit developer's documentation
4+
diffpy.srfit documentation
55
####################################################
66

7-
Software version |release|.
7+
diffpy.srfit - configurable code for solving atomic structures.
88

9-
Last updated |today|.
10-
11-
Configurable code for solving atomic structures.
9+
| Software version |release|.
10+
| Last updated |today|.
1211
1312
The diffpy.srfit package provides the framework for building a global optimizer
1413
on the fly from components such as function calculators (that calculate
@@ -32,31 +31,25 @@ obtain the total cost function. Additionally, diffpy.srfit is designed to be
3231
extensible, allowing the user to integrate external calculators to perform
3332
co-refinements with other techniques.
3433

35-
===================
36-
Disclaimer
37-
===================
38-
39-
.. literalinclude:: ../../../LICENSE.txt
40-
41-
================
42-
Acknowledgments
43-
================
44-
45-
Developers
46-
-----------
47-
48-
diffpy.sifit is developed and maintained by
34+
========================================
35+
Authors
36+
========================================
4937

50-
.. literalinclude:: ../../../AUTHORS.txt
38+
diffpy.srfit is developed by members of the Billinge Group at
39+
Columbia University and at Brookhaven National Laboratory including
40+
Christopher L. Farrow, Pavol Juhás, Simon J.L. Billinge.
5141

5242
The source code in *observable.py* was derived from the 1.0 version
5343
of the Caltech "Pyre" project.
5444

45+
For a detailed list of contributors see
46+
https://github.com/diffpy/diffpy.srfit/graphs/contributors.
47+
5548
======================================
5649
Installation
5750
======================================
5851

59-
See the `README.rst <https://github.com/diffpy/diffpy.srfit#requirements>`_
52+
See the `README <https://github.com/diffpy/diffpy.srfit#requirements>`_
6053
file included with the distribution.
6154

6255
======================================
@@ -70,15 +63,22 @@ Where next?
7063
extending.rst
7164

7265
======================================
73-
API
66+
Table of contents
7467
======================================
7568

7669
.. toctree::
77-
:maxdepth: 3
70+
:titlesonly:
7871

79-
api/diffpy.srfit.rst
72+
license
73+
release
74+
Package API <api/diffpy.srfit>
8075

8176
.. faq.rst
8277
78+
======================================
79+
Indices
80+
======================================
81+
8382
* :ref:`genindex`
83+
* :ref:`modindex`
8484
* :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)