From ae8caf460d5bd8849a02df213900173b360a759b Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Wed, 11 Jun 2025 11:06:56 -0400 Subject: [PATCH 1/3] skpkg: migration of docs --- doc/source/conf.py | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 045aba0..ae2443a 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -18,6 +18,12 @@ from importlib.metadata import version from pathlib import Path +# Attempt to import the version dynamically from GitHub tag. +try: + fullversion = version("diffpy.utils") +except Exception: + fullversion = "No version found. The correct version will appear in the released version." # noqa: E501 + # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use Path().resolve() to make it absolute, like shown here. @@ -43,6 +49,7 @@ "sphinx.ext.viewcode", "sphinx.ext.intersphinx", "sphinx_rtd_theme", + "sphinx_copybutton", "m2r", ] @@ -88,6 +95,11 @@ # substitute YEAR in the copyright string copyright = copyright.replace("%Y", year) +# For sphinx_copybutton extension. +# Do not copy "$" for shell commands in code-blocks. +copybutton_prompt_text = r"^\$ " +copybutton_prompt_is_regexp = True + # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = ["build"] @@ -123,6 +135,14 @@ # html_theme = "sphinx_rtd_theme" +html_context = { + "display_github": True, + "github_user": "diffpy", + "github_repo": "diffpy.utils", + "github_version": "main", + "conf_py_path": "/doc/source/", +} + # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. @@ -256,7 +276,13 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ("index", "diffpy.utils", "diffpy.utils Documentation", ab_authors, 1) + ( + "index", + "diffpy.utils", + "diffpy.utils Documentation", + ab_authors, + 1, + ) ] # If true, show URL addresses after external links. From 199cce8d6615be9d2c810bd1a964caac2c86bc53 Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Wed, 11 Jun 2025 11:15:15 -0400 Subject: [PATCH 2/3] skpkg: add config files for authors, changelog, code of conduct, license, README --- CHANGELOG.rst | 2 +- CODE_OF_CONDUCT.rst | 2 +- README.rst | 11 ++++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index bc99672..48c7a51 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,5 +1,5 @@ ============= -Release Notes +Release notes ============= .. current developments diff --git a/CODE_OF_CONDUCT.rst b/CODE_OF_CONDUCT.rst index ff9c356..e8199ca 100644 --- a/CODE_OF_CONDUCT.rst +++ b/CODE_OF_CONDUCT.rst @@ -8,7 +8,7 @@ Our Pledge We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, +identity and expression, level of experience, education, socioeconomic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation. diff --git a/README.rst b/README.rst index cc86c81..5fb8421 100644 --- a/README.rst +++ b/README.rst @@ -8,7 +8,7 @@ :target: https://diffpy.github.io/diffpy.utils :height: 100px -|PyPi| |Forge| |PythonVersion| |PR| +|PyPI| |Forge| |PythonVersion| |PR| |CI| |Codecov| |Black| |Tracking| @@ -26,7 +26,7 @@ .. |PR| image:: https://img.shields.io/badge/PR-Welcome-29ab47ff -.. |PyPi| image:: https://img.shields.io/pypi/v/diffpy.utils +.. |PyPI| image:: https://img.shields.io/pypi/v/diffpy.utils :target: https://pypi.org/project/diffpy.utils/ .. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/diffpy.utils @@ -141,4 +141,9 @@ Before contributing, please read our `Code of Conduct `_ or email Prof. Simon Billinge at sb2896@columbia.edu. +For more information on diffpy.utils please visit the project `web-page `_ or email Simon Billinge at sb2896@columbia.edu. + +Acknowledgements +---------------- + +``diffpy.utils`` is built and maintained with `scikit-package `_. From b14be774e119cf04ebbf8aaeeaa9dd680b9e34f0 Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Wed, 11 Jun 2025 11:33:12 -0400 Subject: [PATCH 3/3] chore: news --- news/doc-migration.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 news/doc-migration.rst diff --git a/news/doc-migration.rst b/news/doc-migration.rst new file mode 100644 index 0000000..b0ec659 --- /dev/null +++ b/news/doc-migration.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* Support ``scikit-package`` Level 5 standard (https://scikit-package.github.io/scikit-package/). + +**Security:** + +*