Skip to content

Commit 5db831d

Browse files
authored
chore: move over rest of doc and src files (#168)
* chore: move over rest of doc and src files * chore: run pre-commit * chore: fix index.rst back to original
1 parent a7c4a9d commit 5db831d

File tree

7 files changed

+65
-18
lines changed

7 files changed

+65
-18
lines changed

doc/source/api/diffpy.srmise.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
:tocdepth: -1
22

3-
diffpy.srmise package
4-
=====================
3+
|title|
4+
=======
5+
6+
.. |title| replace:: diffpy.srmise package
57

68
.. automodule:: diffpy.srmise
79
:members:

doc/source/conf.py

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@
1818
from importlib.metadata import version
1919
from pathlib import Path
2020

21+
# Attempt to import the version dynamically from GitHub tag.
22+
try:
23+
fullversion = version("diffpy.srmise")
24+
except Exception:
25+
fullversion = "No version found. The correct version will appear in the released version."
26+
2127
# If extensions (or modules to document with autodoc) are in another directory,
2228
# add these directories to sys.path here. If the directory is relative to the
2329
# documentation root, use Path().resolve() to make it absolute, like shown here.
@@ -26,7 +32,7 @@
2632
sys.path.insert(0, str(Path("../../src").resolve()))
2733

2834
# abbreviations
29-
ab_authors = "Billinge Group members and community contributors"
35+
ab_authors = "Simon Billinge, Billinge Group members"
3036

3137
# -- General configuration ------------------------------------------------
3238

@@ -43,6 +49,7 @@
4349
"sphinx.ext.viewcode",
4450
"sphinx.ext.intersphinx",
4551
"sphinx_rtd_theme",
52+
"sphinx_copybutton",
4653
"m2r",
4754
]
4855

@@ -68,7 +75,6 @@
6875
# |version| and |release|, also used in various other places throughout the
6976
# built documents.
7077

71-
fullversion = version(project)
7278
# The short X.Y version.
7379
version = "".join(fullversion.split(".post")[:1])
7480
# The full version, including alpha/beta/rc tags.
@@ -88,6 +94,11 @@
8894
# substitute YEAR in the copyright string
8995
copyright = copyright.replace("%Y", year)
9096

97+
# For sphinx_copybutton extension.
98+
# Do not copy "$" for shell commands in code-blocks.
99+
copybutton_prompt_text = r"^\$ "
100+
copybutton_prompt_is_regexp = True
101+
91102
# List of patterns, relative to source directory, that match files and
92103
# directories to ignore when looking for source files.
93104
exclude_patterns = ["build"]
@@ -123,6 +134,14 @@
123134
#
124135
html_theme = "sphinx_rtd_theme"
125136

137+
html_context = {
138+
"display_github": True,
139+
"github_user": "diffpy",
140+
"github_repo": "diffpy.srmise",
141+
"github_version": "main",
142+
"conf_py_path": "/doc/source/",
143+
}
144+
126145
# Theme options are theme-specific and customize the look and feel of a theme
127146
# further. For a list of options available for each theme, see the
128147
# documentation.
@@ -221,7 +240,13 @@
221240
# (source start file, target name, title,
222241
# author, documentclass [howto, manual, or own class]).
223242
latex_documents = [
224-
("index", "diffpy.srmise.tex", "diffpy.srmise Documentation", ab_authors, "manual"),
243+
(
244+
"index",
245+
"diffpy.srmise.tex",
246+
"diffpy.srmise Documentation",
247+
ab_authors,
248+
"manual",
249+
),
225250
]
226251

227252
# The name of an image file (relative to this directory) to place at the top of
@@ -249,7 +274,15 @@
249274

250275
# One entry per manual page. List of tuples
251276
# (source start file, name, description, authors, manual section).
252-
man_pages = [("index", "diffpy.srmise", "diffpy.srmise Documentation", ab_authors, 1)]
277+
man_pages = [
278+
(
279+
"index",
280+
"diffpy.srmise",
281+
"diffpy.srmise Documentation",
282+
ab_authors,
283+
1,
284+
)
285+
]
253286

254287
# If true, show URL addresses after external links.
255288
# man_show_urls = False

doc/source/index.rst

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,24 @@
44

55
.. |title| replace:: diffpy.srmise documentation
66

7-
diffpy.srmise - Peak extraction and peak fitting tool for atomic pair distribution functions..
7+
``diffpy.srmise`` - Peak extraction and peak fitting tool for atomic pair distribution functions
88

9-
| Software version |release|.
9+
| Software version |release|
1010
| Last updated |today|.
1111
12+
===============
13+
Getting started
14+
===============
15+
16+
Welcome to the ``diffpy.srmise`` documentation!
17+
18+
To get started, please visit the :ref:`Getting started <getting-started>` page.
19+
1220
=======
1321
Authors
1422
=======
1523

16-
diffpy.srmise is developed by Billinge Group
17-
and its community contributors.
18-
19-
For a detailed list of contributors see
24+
``diffpy.srmise`` is developed by Simon Billinge, Billinge Group members. The maintainer for this project is Simon Billinge. For a detailed list of contributors see
2025
https://github.com/diffpy/diffpy.srmise/graphs/contributors.
2126

2227
============
@@ -26,6 +31,12 @@ Installation
2631
See the `README <https://github.com/diffpy/diffpy.srmise#installation>`_
2732
file included with the distribution.
2833

34+
================
35+
Acknowledgements
36+
================
37+
38+
``diffpy.srmise`` is built and maintained with `scikit-package <https://scikit-package.github.io/scikit-package/>`_.
39+
2940
=================
3041
Table of contents
3142
=================

doc/source/license.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ BSD 3-Clause License
1111

1212
Copyright 2014-2015, Board of Trustees of Michigan State University
1313

14-
Copyright 2016-2024, The Trustees of Columbia University in the City of New York.
14+
Copyright 2016-2025, The Trustees of Columbia University in the City of New York.
1515

1616
All rights reserved.
1717

src/diffpy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
##############################################################################
33
#
4-
# (c) 2024 The Trustees of Columbia University in the City of New York.
4+
# (c) 2025 The Trustees of Columbia University in the City of New York.
55
# All rights reserved.
66
#
77
# File coded by: Billinge Group members and community contributors.

src/diffpy/srmise/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env python
22
##############################################################################
33
#
4-
# (c) 2024 The Trustees of Columbia University in the City of New York.
4+
# (c) 2025 The Trustees of Columbia University in the City of New York.
55
# All rights reserved.
66
#
7-
# File coded by: Billinge Group members and community contributors.
7+
# File coded by: Simon Billinge, Billinge Group members.
88
#
99
# See GitHub contributions for a more detailed list of contributors.
1010
# https://github.com/diffpy/diffpy.srmise/graphs/contributors
@@ -15,6 +15,7 @@
1515
"""Peak extraction and peak fitting tool for atomic pair distribution
1616
functions."""
1717

18+
1819
# package version
1920
from diffpy.srmise.version import __version__
2021

src/diffpy/srmise/version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env python
22
##############################################################################
33
#
4-
# (c) 2024 The Trustees of Columbia University in the City of New York.
4+
# (c) 2025 The Trustees of Columbia University in the City of New York.
55
# All rights reserved.
66
#
7-
# File coded by: Billinge Group members and community contributors.
7+
# File coded by: Simon Billinge, Billinge Group members.
88
#
99
# See GitHub contributions for a more detailed list of contributors.
1010
# https://github.com/diffpy/diffpy.srmise/graphs/contributors

0 commit comments

Comments
 (0)