Skip to content

Commit 6d739fd

Browse files
authored
Merge pull request #342 from cadenmyers13/doc-migration
skpkg: doc migration
2 parents b4417be + b14be77 commit 6d739fd

File tree

5 files changed

+60
-6
lines changed

5 files changed

+60
-6
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: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
:target: https://diffpy.github.io/diffpy.utils
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.utils
29+
.. |PyPI| image:: https://img.shields.io/pypi/v/diffpy.utils
3030
:target: https://pypi.org/project/diffpy.utils/
3131

3232
.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/diffpy.utils
@@ -141,4 +141,9 @@ Before contributing, please read our `Code of Conduct <https://github.com/diffpy
141141
Contact
142142
-------
143143

144-
For more information on diffpy.utils please visit the project `web-page <https://diffpy.github.io/>`_ or email Prof. Simon Billinge at [email protected].
144+
For more information on diffpy.utils please visit the project `web-page <https://diffpy.github.io/>`_ or email Simon Billinge at [email protected].
145+
146+
Acknowledgements
147+
----------------
148+
149+
``diffpy.utils`` is built and maintained with `scikit-package <https://scikit-package.github.io/scikit-package/>`_.

doc/source/conf.py

Lines changed: 27 additions & 1 deletion
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.utils")
24+
except Exception:
25+
fullversion = "No version found. The correct version will appear in the released version." # noqa: E501
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.
@@ -43,6 +49,7 @@
4349
"sphinx.ext.viewcode",
4450
"sphinx.ext.intersphinx",
4551
"sphinx_rtd_theme",
52+
"sphinx_copybutton",
4653
"m2r",
4754
]
4855

@@ -88,6 +95,11 @@
8895
# substitute YEAR in the copyright string
8996
copyright = copyright.replace("%Y", year)
9097

98+
# For sphinx_copybutton extension.
99+
# Do not copy "$" for shell commands in code-blocks.
100+
copybutton_prompt_text = r"^\$ "
101+
copybutton_prompt_is_regexp = True
102+
91103
# List of patterns, relative to source directory, that match files and
92104
# directories to ignore when looking for source files.
93105
exclude_patterns = ["build"]
@@ -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.utils",
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.
@@ -256,7 +276,13 @@
256276
# One entry per manual page. List of tuples
257277
# (source start file, name, description, authors, manual section).
258278
man_pages = [
259-
("index", "diffpy.utils", "diffpy.utils Documentation", ab_authors, 1)
279+
(
280+
"index",
281+
"diffpy.utils",
282+
"diffpy.utils Documentation",
283+
ab_authors,
284+
1,
285+
)
260286
]
261287

262288
# If true, show URL addresses after external links.

news/doc-migration.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)