Skip to content

Commit 2b3bfce

Browse files
authored
Merge pull request #43 from dabeycorn/doc
skpkg: migrate documentation, README, and public static files
2 parents 18b5e03 + 5e99353 commit 2b3bfce

File tree

12 files changed

+100
-38
lines changed

12 files changed

+100
-38
lines changed

.readthedocs.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
3+
build:
4+
os: "ubuntu-22.04"
5+
tools:
6+
python: "latest"
7+
8+
python:
9+
install:
10+
- requirements: requirements/docs.txt
11+
12+
sphinx:
13+
configuration: doc/source/conf.py

AUTHORS.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Authors
22
=======
33

4-
Simon J. L. Billinge
5-
Zachary A. Thatcher
6-
Billinge Group and community contributors.
4+
- Simon J. L. Billinge
5+
- Zachary A. Thatcher
6+
- Billinge Group members and community contributors
77

88
Contributors
99
------------

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

LICENSE.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2022-2024, The Trustees of Columbia University
4-
in the City of New York.
3+
Copyright (c) 2022-2025, The Trustees of Columbia University in the City of New York.
54
All rights reserved.
65

76
Redistribution and use in source and binary forms, with or without

README.rst

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

3232
.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/diffpy.nmf_mapping
@@ -105,15 +105,14 @@ and run the following ::
105105
Getting Started
106106
---------------
107107

108-
109108
You may consult our `online documentation <https://diffpy.github.io/diffpy.nmf_mapping>`_ for tutorials and API references.
110109

111110
Support and Contribute
112111
----------------------
113112

114113
`Diffpy user group <https://groups.google.com/g/diffpy-users>`_ is the discussion forum for general questions and discussions about the use of diffpy.nmf_mapping. Please join the diffpy.nmf_mapping users community by joining the Google group. The diffpy.nmf_mapping project welcomes your expertise and enthusiasm!
115114

116-
If you see a bug or want to request a feature, please `report it as an issue <https://github.com/diffpy/diffpy.nmf_mapping/issues>`_ and/or `submit a fix as a PR <https://github.com/diffpy/diffpy.nmf_mapping/pulls>`_. You can also post it to the `Diffpy user group <https://groups.google.com/g/diffpy-users>`_.
115+
If you see a bug or want to request a feature, please `report it as an issue <https://github.com/diffpy/diffpy.nmf_mapping/issues>`_ and/or `submit a fix as a PR <https://github.com/diffpy/diffpy.nmf_mapping/pulls>`_.
117116

118117
Feel free to fork the project and contribute. To install diffpy.nmf_mapping
119118
in a development mode, with its sources being directly used by Python
@@ -141,4 +140,9 @@ Before contributing, please read our `Code of Conduct <https://github.com/diffpy
141140
Contact
142141
-------
143142

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

doc/source/api/diffpy.nmf_mapping.rst

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
:tocdepth: -1
22

3-
diffpy.nmf-mapping package
4-
==========================
3+
|title|
4+
=======
5+
6+
.. |title| replace:: diffpy.nmf_mapping package
57

68
.. automodule:: diffpy.nmf_mapping
79
:members:
810
:undoc-members:
911
:show-inheritance:
1012

13+
Subpackages
14+
-----------
15+
16+
.. toctree::
17+
diffpy.nmf_mapping.example_package
18+
1119
Submodules
1220
----------
1321

14-
diffpy.nmf_mapping.nmf_mapping_code module
15-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16-
17-
.. automodule:: diffpy.nmf_mapping.nmf_mapping_code
18-
:members:
19-
:undoc-members:
20-
:show-inheritance:
22+
|module|
23+
--------
2124

22-
diffpy.nmf_mapping.main module
23-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25+
.. |module| replace:: diffpy.nmf_mapping.example_submodule module
2426

25-
.. automodule:: diffpy.nmf_mapping.main
27+
.. automodule:: diffpy.nmf_mapping.example_submodule
2628
:members:
2729
:undoc-members:
2830
:show-inheritance:

doc/source/conf.py

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
#
4-
# diffpy.nmf_mapping documentation build configuration file, created by
4+
# diffpy.nmf_mapping documentation build configuration file, created by # noqa: E501
55
# sphinx-quickstart on Thu Jan 30 15:49:41 2014.
66
#
77
# This file is execfile()d with the current directory set to its
@@ -18,9 +18,15 @@
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.nmf_mapping")
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
23-
# documentation root, use Path().resolve() to make it absolute, like shown here.
29+
# documentation root, use Path().resolve() to make it absolute, like shown here. # noqa: E501
2430
# sys.path.insert(0, str(Path(".").resolve()))
2531
sys.path.insert(0, str(Path("../..").resolve()))
2632
sys.path.insert(0, str(Path("../../src").resolve()))
@@ -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.nmf_mapping",
141+
"github_version": "main",
142+
"conf_py_path": "/docs/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.

doc/source/img/.placeholder

Whitespace-only changes.

doc/source/index.rst

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,16 @@
44

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

7-
diffpy.nmf_mapping - Python package for running NMF analysis on PDF and XRD data..
7+
``diffpy.nmf_mapping`` - Python package for running NMF analysis on PDF and XRD data.
88

9-
| Software version |release|.
9+
| Software version |release|
1010
| Last updated |today|.
1111
1212
=======
1313
Authors
1414
=======
1515

16-
diffpy.nmf_mapping is developed by Billinge Group
17-
and its community contributors.
18-
19-
For a detailed list of contributors see
16+
``diffpy.nmf_mapping`` is developed by Billinge Group members and community contributors. The maintainer for this project is Simon J.L. Billinge group. For a detailed list of contributors see
2017
https://github.com/diffpy/diffpy.nmf_mapping/graphs/contributors.
2118

2219
============
@@ -26,15 +23,21 @@ Installation
2623
See the `README <https://github.com/diffpy/diffpy.nmf_mapping#installation>`_
2724
file included with the distribution.
2825

26+
================
27+
Acknowledgements
28+
================
29+
30+
``diffpy.nmf_mapping`` is built and maintained with `scikit-package <https://scikit-package.github.io/scikit-package/>`_.
31+
2932
=================
3033
Table of contents
3134
=================
3235
.. toctree::
33-
:titlesonly:
36+
:maxdepth: 2
3437

35-
license
36-
release
3738
Package API <api/diffpy.nmf_mapping>
39+
release
40+
license
3841

3942
=======
4043
Indices

0 commit comments

Comments
 (0)