Skip to content

Commit 4af7868

Browse files
authored
Merge pull request #283 from ycexiao/doc
skpkg: migrate documentation, README, and public static files
2 parents 847d45a + daf5c8b commit 4af7868

File tree

6 files changed

+72
-10
lines changed

6 files changed

+72
-10
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
=============
2-
Release Notes
2+
Release notes
33
=============
44

55
.. current developments

CODE_OF_CONDUCT.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Our Pledge
88
We as members, contributors, and leaders pledge to make participation in our
99
community a harassment-free experience for everyone, regardless of age, body
1010
size, visible or invisible disability, ethnicity, sex characteristics, gender
11-
identity and expression, level of experience, education, socio-economic status,
11+
identity and expression, level of experience, education, socioeconomic status,
1212
nationality, personal appearance, race, caste, color, religion, or sexual
1313
identity and orientation.
1414

README.rst

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
:target: https://diffpy.github.io/diffpy.pdfgui
99
:height: 100px
1010

11-
|PyPi| |Forge| |PythonVersion| |PR|
11+
|PyPI| |Forge| |PythonVersion| |PR|
1212

1313
|CI| |Codecov| |Black| |Tracking|
1414

@@ -26,7 +26,7 @@
2626

2727
.. |PR| image:: https://img.shields.io/badge/PR-Welcome-29ab47ff
2828

29-
.. |PyPi| image:: https://img.shields.io/pypi/v/diffpy.pdfgui
29+
.. |PyPI| image:: https://img.shields.io/pypi/v/diffpy.pdfgui
3030
:target: https://pypi.org/project/diffpy.pdfgui/
3131

3232
.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/diffpy.pdfgui
@@ -35,7 +35,7 @@
3535
.. |Tracking| image:: https://img.shields.io/badge/issue_tracking-github-blue
3636
:target: https://github.com/diffpy/diffpy.pdfgui/issues
3737

38-
Graphical user interface program for structure refinements to atomic
38+
Graphical user interface program for structure refinements to the atomic
3939
pair distribution function.
4040

4141
For users who do not have the expertise or necessity for command
@@ -167,4 +167,9 @@ Before contributing, please read our `Code of Conduct <https://github.com/diffpy
167167
Contact
168168
-------
169169

170-
For more information on diffpy.pdfgui please visit the project `web-page <https://diffpy.github.io/>`_ or email Prof. Simon Billinge at [email protected].
170+
For more information on diffpy.pdfgui please visit the project `web-page <https://diffpy.github.io/>`_ or email Simon Billinge at [email protected].
171+
172+
Acknowledgements
173+
----------------
174+
175+
``diffpy.pdfgui`` is built and maintained with `scikit-package <https://scikit-package.github.io/scikit-package/>`_.

doc/source/conf.py

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
# All configuration values have a default; values that are commented out
1414
# serve to show the default.
1515

16+
# Attempt to import the version dynamically from GitHub tag.
17+
try:
18+
fullversion = version("diffpy.pdfgui")
19+
except Exception:
20+
fullversion = "No version found. The correct version will appear in the released version." # noqa: E501
21+
1622
import sys
1723
import time
1824
from importlib.metadata import version
@@ -42,6 +48,7 @@
4248
"sphinx.ext.todo",
4349
"sphinx.ext.viewcode",
4450
"sphinx.ext.intersphinx",
51+
"sphinx_copybutton",
4552
"sphinx_rtd_theme",
4653
"m2r",
4754
]
@@ -64,6 +71,11 @@
6471
project = "diffpy.pdfgui"
6572
copyright = "%Y, The Trustees of Columbia University in the City of New York"
6673

74+
# For sphinx_copybutton extension.
75+
# Do not copy "$" for shell commands in code-blocks.
76+
copybutton_prompt_text = r"^\$ "
77+
copybutton_prompt_is_regexp = True
78+
6779
# The version info for the project you're documenting, acts as replacement for
6880
# |version| and |release|, also used in various other places throughout the
6981
# built documents.
@@ -123,6 +135,14 @@
123135
#
124136
html_theme = "sphinx_rtd_theme"
125137

138+
html_context = {
139+
"display_github": True,
140+
"github_user": "diffpy",
141+
"github_repo": "diffpy.pdfgui",
142+
"github_version": "main",
143+
"conf_py_path": "/doc/source/",
144+
}
145+
126146
# Theme options are theme-specific and customize the look and feel of a theme
127147
# further. For a list of options available for each theme, see the
128148
# documentation.
@@ -158,7 +178,7 @@
158178
# Add any extra paths that contain custom files (such as robots.txt or
159179
# .htaccess) here, relative to this directory. These files are copied
160180
# directly to the root of the documentation.
161-
html_extra_path = ["../manual"]
181+
html_extra_path = []
162182

163183
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
164184
# using the given strftime format.
@@ -221,7 +241,13 @@
221241
# (source start file, target name, title,
222242
# author, documentclass [howto, manual, or own class]).
223243
latex_documents = [
224-
("index", "diffpy.pdfgui.tex", "diffpy.pdfgui Documentation", ab_authors, "manual"),
244+
(
245+
"index",
246+
"diffpy.pdfgui.tex",
247+
"diffpy.pdfgui Documentation",
248+
ab_authors,
249+
"manual",
250+
),
225251
]
226252

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

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

254288
# If true, show URL addresses after external links.
255289
# man_show_urls = False

doc/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

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

7-
diffpy.pdfgui - GUI for PDF simulation and structure refinement.
7+
``diffpy.pdfgui`` - Graphical user interface program for structure refinements to the atomic pair distribution function.
88

99
| Software version |release|
1010
| Last updated |today|

news/doc.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
* Support ``scikit-package`` Level 5 standard (https://scikit-package.github.io/scikit-package/).
20+
21+
**Security:**
22+
23+
* <news item>

0 commit comments

Comments
 (0)