Skip to content

Commit c2ab7b0

Browse files
authored
Add tutorials/extension to docs nav bar, create pip.txt (#128)
* cap in description * Add news for doc nav * Install pip with pip.txt, conda with conda.txt * Overall doc paths and nav * Fix api doc table of content order * Add news on adding tutorials
1 parent 2df560c commit c2ab7b0

16 files changed

+94
-54
lines changed

Diff for: README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
.. |Tracking| image:: https://img.shields.io/badge/issue_tracking-github-blue
3636
:target: https://github.com/diffpy/diffpy.srmise/issues
3737

38-
implementation of the ParSCAPE algorithm for peak extraction from atomic pair distribution functions (PDFs)
38+
Implementation of the ParSCAPE algorithm for peak extraction from atomic pair distribution functions (PDFs)
3939

4040
SrMise is an implementation of the `ParSCAPE algorithm
4141
<https://dx.doi.org/10.1107/S2053273315005276>`_ for peak extraction from

Diff for: doc/source/extending.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. _extending-srmise:
1+
.. index:: extending-srmise
22

33
===================
44
Extending SrMise
@@ -47,7 +47,7 @@ To add a baseline, create a new module which defines a class inheriting from
4747
which need to be implemented are summarized in the source code.
4848

4949

50-
.. literalinclude:: ../../../diffpy/srmise/baselines/base.py
50+
.. literalinclude:: ../../src/diffpy/srmise/baselines/base.py
5151
:pyobject: BaselineFunction
5252
:end-before: __init__
5353

Diff for: doc/source/index.rst

+6-3
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,21 @@ https://github.com/diffpy/diffpy.srmise/graphs/contributors.
2323
Installation
2424
============
2525

26-
See the `README <https://github.com/diffpy/diffpy.srmise#installation>`_
26+
See the `README <https://github.com/diffpy/diffpy.srmise/blob/main/README.rst>`_
2727
file included with the distribution.
2828

2929
=================
3030
Table of contents
3131
=================
3232
.. toctree::
33+
:maxdepth: 1
3334
:titlesonly:
3435

35-
license
36-
release
36+
tutorial/index
37+
extending
3738
Package API <api/diffpy.srmise>
39+
release
40+
license
3841

3942
=======
4043
Indices

Diff for: doc/source/license.rst

+22-6
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,25 @@ OPEN SOURCE LICENSE AGREEMENT
99
=============================
1010
BSD 3-Clause License
1111

12-
Copyright (c) 2024, The Trustees of Columbia University in
13-
the City of New York.
14-
All Rights Reserved.
12+
Copyright 2014-2015, Board of Trustees of Michigan State University
13+
14+
Copyright 2016-2024, The Trustees of Columbia University in the City of New York.
15+
16+
All rights reserved.
17+
18+
If you use this program to do productive scientific research that
19+
leads to publication, we ask that you acknowledge use of the
20+
program by citing the following paper in your publication:
21+
22+
L. Granlund, S.J.L. Billinge, P.M. Duxbury, Algorithm for
23+
systematic peak extraction from atomic pair distribution
24+
functions, Acta Crystallographica A 71(4), 392-409 (2015).
25+
doi:10.1107/S2053273315005276
26+
27+
For more information please visit the diffpy web-page at
28+
http://www.diffpy.org
29+
or email Luke Granlund at [email protected], or Prof. Simon
30+
Billinge at [email protected].
1531

1632
Redistribution and use in source and binary forms, with or without
1733
modification, are permitted provided that the following conditions are met:
@@ -23,9 +39,9 @@ modification, are permitted provided that the following conditions are met:
2339
this list of conditions and the following disclaimer in the documentation
2440
and/or other materials provided with the distribution.
2541

26-
3. Neither the name of the copyright holder nor the names of its
27-
contributors may be used to endorse or promote products derived from
28-
this software without specific prior written permission.
42+
3. Neither the name of the copyright holder nor the names of its contributors
43+
may be used to endorse or promote products derived from this software
44+
without specific prior written permission.
2945

3046
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
3147
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

Diff for: doc/source/tutorial/abbreviations.txt

+13-15
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,18 @@
1010
.. |tar.gz| replace:: :source-release:`tar.gz`
1111

1212
.. Image substitutions
13-
.. |images/extract_single_peak1.png| image:: ../../../examples/images/extract_single_peak1.png
14-
.. |images/extract_single_peak2.png| image:: ../../../examples/images/extract_single_peak2.png
15-
.. |images/extract_single_peak3.png| image:: ../../../examples/images/extract_single_peak3.png
16-
.. |images/parameter_summary1.png| image:: ../../../examples/images/parameter_summary1.png
17-
.. |images/parameter_summary2.png| image:: ../../../examples/images/parameter_summary2.png
18-
.. |images/parameter_summary3.png| image:: ../../../examples/images/parameter_summary3.png
19-
.. |images/parameter_summary4.png| image:: ../../../examples/images/parameter_summary4.png
20-
.. |images/fit_initial1.png| image:: ../../../examples/images/fit_initial1.png
21-
.. |images/fit_initial2.png| image:: ../../../examples/images/fit_initial2.png
22-
.. |images/query_results1.png| image:: ../../../examples/images/query_results1.png
23-
.. |images/query_results2.png| image:: ../../../examples/images/query_results2.png
24-
.. |images/query_results3.png| image:: ../../../examples/images/query_results3.png
25-
26-
.. Links to non-tutorial parts of documentation.
27-
.. |Extending SrMise| replace:: :ref:`extending-srmise`
13+
.. |images/extract_single_peak1.png| ge:: ../../examples/images/extract_single_peak1.png
14+
.. |images/extract_single_peak2.png| image:: ../../examples/images/extract_single_peak2.png
15+
.. |images/extract_single_peak3.png| image:: ../../examples/images/extract_single_peak3.png
16+
.. |images/parameter_summary1.png| image:: ../../examples/images/parameter_summary1.png
17+
.. |images/parameter_summary2.png| image:: ../../examples/images/parameter_summary2.png
18+
.. |images/parameter_summary3.png| image:: ../../examples/images/parameter_summary3.png
19+
.. |images/parameter_summary4.png| image:: ../../examples/images/parameter_summary4.png
20+
.. |images/fit_initial1.png| image:: ../../examples/images/fit_initial1.png
21+
.. |images/fit_initial2.png| image:: ../../examples/images/fit_initial2.png
22+
.. |images/query_results1.png| image:: ../../examples/images/query_results1.png
23+
.. |images/query_results2.png| image:: ../../examples/images/query_results2.png
24+
.. |images/query_results3.png| image:: ../../examples/images/query_results3.png
2825

2926
.. External links
3027
.. _ParSCAPE algorithm: https://dx.doi.org/10.1107/S2053273315005276
@@ -42,3 +39,4 @@
4239
.. |pi/Qmax| replace:: π/Q\ :sub:`max`
4340

4441
.. Links to PDF information defined in sample_links.txt
42+
.. |Extending SrMise| replace:: :ref:`extending-srmise`

Diff for: doc/source/tutorial/extract_single_peak.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.. include:: sample_links.txt
44

55

6-
.. include:: ../../../examples/README
6+
.. include:: ../../examples/README.rst
77
:start-after: ~Example 1~
88
:end-before: ~Example 2~
99

@@ -13,4 +13,4 @@
1313
Script (extract_single_peak.py)
1414
-------------------------------
1515

16-
.. literalinclude:: ../../../examples/extract_single_peak.py
16+
.. literalinclude:: ../../examples/extract_single_peak.py

Diff for: doc/source/tutorial/fit_initial.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.. include:: sample_links.txt
44

55

6-
.. include:: ../../../examples/README
6+
.. include:: ../../examples/README.rst
77
:start-after: ~Example 3~
88
:end-before: ~Example 4~
99

@@ -13,4 +13,4 @@
1313
Script (fit_initial.py)
1414
---------------------------
1515

16-
.. literalinclude:: ../../../examples/fit_initial.py
16+
.. literalinclude:: ../../examples/fit_initial.py

Diff for: doc/source/tutorial/index.rst

+8-12
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,29 @@
11
.. include:: abbreviations.txt
22

3-
43
.. _tutorial:
54

65
===================
76
Tutorial
87
===================
98

10-
.. include:: ../../../examples/README
9+
.. include:: ../../examples/README.rst
1110
:end-before: ~List of Examples~
1211

1312

1413
.. Replace bare list from README
1514
16-
Examples
17-
========
18-
1915
.. toctree::
2016
:maxdepth: 1
2117

22-
extract_single_peak.rst
23-
parameter_summary.rst
24-
fit_initial.rst
25-
query_results.rst
26-
multimodel_known_uncertainties.rst
27-
multimodel_unknown_uncertainties.rst
18+
extract_single_peak
19+
parameter_summary
20+
fit_initial
21+
query_results
22+
multimodel_known_uncertainties
23+
multimodel_unknown_uncertainties
2824

2925

3026
.. Now add information about the samples
3127
32-
.. include:: ../../../examples/README
28+
.. include:: ../../examples/README
3329
:start-after: ~PDF Info~

Diff for: doc/source/tutorial/multimodel_known_uncertainties.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.. include:: sample_links.txt
44

55

6-
.. include:: ../../../examples/README
6+
.. include:: ../../examples/README.rst
77
:start-after: ~Example 5~
88
:end-before: ~Example 6~
99

@@ -14,12 +14,12 @@
1414
Extraction Script (multimodel_known_dG1.py)
1515
---------------------------------------------
1616

17-
.. literalinclude:: ../../../examples/multimodel_known_dG1.py
17+
.. literalinclude:: ../../examples/multimodel_known_dG1.py
1818

1919

2020
.. _multimodel_known_dG2.py:
2121

2222
Analysis Script (multimodel_known_dG2.py)
2323
-----------------------------------------
2424

25-
.. literalinclude:: ../../../examples/multimodel_known_dG2.py
25+
.. literalinclude:: ../../examples/multimodel_known_dG2.py

Diff for: doc/source/tutorial/multimodel_unknown_uncertainties.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.. include:: sample_links.txt
44

55

6-
.. include:: ../../../examples/README
6+
.. include:: ../../examples/README.rst
77
:start-after: ~Example 6~
88
:end-before: ~PDF Info~
99

@@ -14,12 +14,12 @@
1414
Extraction Script (multimodel_unknown_dG1.py)
1515
---------------------------------------------
1616

17-
.. literalinclude:: ../../../examples/multimodel_unknown_dG1.py
17+
.. literalinclude:: ../../examples/multimodel_unknown_dG1.py
1818

1919

2020
.. _multimodel_unknown_dG2.py:
2121

2222
Analysis Script (multimodel_unknown_dG2.py)
2323
-------------------------------------------
2424

25-
.. literalinclude:: ../../../examples/multimodel_unknown_dG2.py
25+
.. literalinclude:: ../../examples/multimodel_unknown_dG2.py

Diff for: doc/source/tutorial/parameter_summary.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.. include:: sample_links.txt
44

55

6-
.. include:: ../../../examples/README
6+
.. include:: ../../examples/README.rst
77
:start-after: ~Example 2~
88
:end-before: ~Example 3~
99

@@ -13,4 +13,4 @@
1313
Script (parameter_summary.py)
1414
-----------------------------
1515

16-
.. literalinclude:: ../../../examples/parameter_summary.py
16+
.. literalinclude:: ../../examples/parameter_summary.py

Diff for: doc/source/tutorial/query_results.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.. include:: sample_links.txt
44

55

6-
.. include:: ../../../examples/README
6+
.. include:: ../../examples/README.rst
77
:start-after: ~Example 4~
88
:end-before: ~Example 5~
99

@@ -13,4 +13,4 @@
1313
Script (query_results.py)
1414
-------------------------
1515

16-
.. literalinclude:: ../../../examples/query_results.py
16+
.. literalinclude:: ../../examples/query_results.py

Diff for: news/add-nav.rst

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
**Added:**
2+
3+
* <news item>
4+
5+
**Changed:**
6+
7+
* <news item>
8+
9+
**Deprecated:**
10+
11+
* <news item>
12+
13+
**Removed:**
14+
15+
* <news item>
16+
17+
**Fixed:**
18+
19+
* add pip dependencies under pip.txt, conda dependencies under conda.txt
20+
* add tutorial and extending examples to docs
21+
22+
**Security:**
23+
24+
* <news item>

Diff for: pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ exclude = ["diffpy.srmise.tests*"] # exclude packages matching these glob patte
5252
namespaces = false # to disable scanning PEP 420 namespaces (true by default)
5353

5454
[tool.setuptools.dynamic]
55-
dependencies = {file = ["requirements/run.txt"]}
55+
dependencies = {file = ["requirements/pip.txt"]}
5656

5757
[tool.black]
5858
line-length = 115
File renamed without changes.

Diff for: requirements/pip.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
numpy
2+
scipy
3+
matplotlib

0 commit comments

Comments
 (0)