Skip to content

Commit 671d86d

Browse files
authored
Merge pull request #85 from tinatn29/doc
skpkg: migrate documentation, add news
2 parents dff1173 + 5e3f935 commit 671d86d

File tree

5 files changed

+109
-47
lines changed

5 files changed

+109
-47
lines changed

doc/make.bat

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
@ECHO OFF
2-
3-
pushd %~dp0
4-
5-
REM Command file for Sphinx documentation
6-
7-
if "%SPHINXBUILD%" == "" (
8-
set SPHINXBUILD=sphinx-build
9-
)
10-
set SOURCEDIR=source
11-
set BUILDDIR=build
12-
set SPHINXPROJ=PackagingScientificPython
13-
14-
if "%1" == "" goto help
15-
16-
%SPHINXBUILD% >NUL 2>NUL
17-
if errorlevel 9009 (
18-
echo.
19-
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
20-
echo.installed, then set the SPHINXBUILD environment variable to point
21-
echo.to the full path of the 'sphinx-build' executable. Alternatively you
22-
echo.may add the Sphinx directory to PATH.
23-
echo.
24-
echo.If you don't have Sphinx installed, grab it from
25-
echo.http://sphinx-doc.org/
26-
exit /b 1
27-
)
28-
29-
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
30-
goto end
31-
32-
:help
33-
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
34-
35-
:end
36-
popd
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
set SPHINXPROJ=PackagingScientificPython
13+
14+
if "%1" == "" goto help
15+
16+
%SPHINXBUILD% >NUL 2>NUL
17+
if errorlevel 9009 (
18+
echo.
19+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
20+
echo.installed, then set the SPHINXBUILD environment variable to point
21+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
22+
echo.may add the Sphinx directory to PATH.
23+
echo.
24+
echo.If you don't have Sphinx installed, grab it from
25+
echo.http://sphinx-doc.org/
26+
exit /b 1
27+
)
28+
29+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
30+
goto end
31+
32+
:help
33+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
34+
35+
:end
36+
popd

doc/source/api/diffpy.fourigui.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ diffpy.fourigui package
88
:undoc-members:
99
:show-inheritance:
1010

11+
Subpackages
12+
-----------
13+
14+
.. toctree::
15+
diffpy.fourigui.example_package
16+
1117
Submodules
1218
----------
1319

doc/source/conf.py

Lines changed: 22 additions & 2 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.fourigui documentation build configuration file, created by
4+
# diffpy.fourigui 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.fourigui")
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

@@ -90,6 +97,11 @@
9097
# substitute YEAR in the copyright string
9198
copyright = copyright.replace("%Y", year)
9299

100+
# For sphinx_copybutton extension.
101+
# Do not copy "$" for shell commands in code-blocks.
102+
copybutton_prompt_text = r"^\$ "
103+
copybutton_prompt_is_regexp = True
104+
93105
# List of patterns, relative to source directory, that match files and
94106
# directories to ignore when looking for source files.
95107
exclude_patterns = ["build"]
@@ -125,6 +137,14 @@
125137
#
126138
html_theme = "sphinx_rtd_theme"
127139

140+
html_context = {
141+
"display_github": True,
142+
"github_user": "diffpy",
143+
"github_repo": "diffpy.fourigui",
144+
"github_version": "main",
145+
"conf_py_path": "/doc/source/",
146+
}
147+
128148
# Theme options are theme-specific and customize the look and feel of a theme
129149
# further. For a list of options available for each theme, see the
130150
# documentation.

doc/source/index.rst

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

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

7-
diffpy.fourigui - Tool for visualizing 3D diffraction and PDF images.
7+
``diffpy.fourigui`` - Tool for visualizing 3D diffraction and PDF images.
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.fourigui`` documentation!
17+
18+
To get started, please visit the :ref:`Getting started <getting-started>` page.
19+
1220
=======
1321
Authors
1422
=======
1523

16-
diffpy.fourigui is developed by Billinge Group
17-
and its community contributors.
18-
19-
For a detailed list of contributors see
24+
``diffpy.fourigui`` is developed by Billinge Group
25+
and its community contributors. For a detailed list of contributors see
2026
https://github.com/diffpy/diffpy.fourigui/graphs/contributors.
2127

2228
============
@@ -26,16 +32,23 @@ Installation
2632
See the `README <https://github.com/diffpy/diffpy.fourigui#installation>`_
2733
file included with the distribution.
2834

35+
================
36+
Acknowledgements
37+
================
38+
39+
``diffpy.fourigui`` is built and maintained with `scikit-package <https://scikit-package.github.io/scikit-package/>`_.
40+
2941
=================
3042
Table of contents
3143
=================
3244
.. toctree::
33-
:titlesonly:
45+
:maxdepth: 2
3446

47+
getting-started
3548
tutorial
36-
license
37-
release
3849
Package API <api/diffpy.fourigui>
50+
release
51+
license
3952

4053
=======
4154
Indices

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)