Skip to content

skpkg: migrate documentation, README, and public static files #153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
=============
Release Notes
Release notes
=============

.. current developments
Expand Down
3 changes: 1 addition & 2 deletions LICENSE.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
BSD 3-Clause License

Copyright (c) 2023-2024, The Trustees of Columbia University
in the City of New York.
Copyright (c) 2023-2025, The Trustees of Columbia University in the City of New York.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
11 changes: 8 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:target: https://diffpy.github.io/diffpy.snmf
:height: 100px

|PyPi| |Forge| |PythonVersion| |PR|
|PyPI| |Forge| |PythonVersion| |PR|

|CI| |Codecov| |Black| |Tracking|

Expand All @@ -26,7 +26,7 @@

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

.. |PyPi| image:: https://img.shields.io/pypi/v/diffpy.snmf
.. |PyPI| image:: https://img.shields.io/pypi/v/diffpy.snmf
:target: https://pypi.org/project/diffpy.snmf/

.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/diffpy.snmf
Expand Down Expand Up @@ -132,4 +132,9 @@ Before contributing, please read our `Code of Conduct <https://github.com/diffpy
Contact
-------

For more information on diffpy.snmf please visit the project `web-page <https://diffpy.github.io/>`_ or email Prof. Simon Billinge at [email protected].
For more information on diffpy.snmf please visit the project `web-page <https://diffpy.github.io/>`_ or email Simon J.L. Billinge group at [email protected].

Acknowledgements
----------------

``diffpy.snmf`` is built and maintained with `scikit-package <https://scikit-package.github.io/scikit-package/>`_.
43 changes: 38 additions & 5 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# diffpy.snmf documentation build configuration file, created by
# diffpy.snmf documentation build configuration file, created by # noqa: E501
# sphinx-quickstart on Thu Jan 30 15:49:41 2014.
#
# This file is execfile()d with the current directory set to its
Expand All @@ -18,9 +18,15 @@
from importlib.metadata import version
from pathlib import Path

# Attempt to import the version dynamically from GitHub tag.
try:
fullversion = version("diffpy.snmf")
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.
# documentation root, use Path().resolve() to make it absolute, like shown here. # noqa: E501
# sys.path.insert(0, str(Path(".").resolve()))
sys.path.insert(0, str(Path("../..").resolve()))
sys.path.insert(0, str(Path("../../src").resolve()))
Expand All @@ -43,6 +49,7 @@
"sphinx.ext.viewcode",
"sphinx.ext.intersphinx",
"sphinx_rtd_theme",
"sphinx_copybutton",
"m2r",
]

Expand All @@ -68,7 +75,6 @@
# |version| and |release|, also used in various other places throughout the
# built documents.

fullversion = version(project)
# The short X.Y version.
version = "".join(fullversion.split(".post")[:1])
# The full version, including alpha/beta/rc tags.
Expand All @@ -88,6 +94,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"]
Expand Down Expand Up @@ -123,6 +134,14 @@
#
html_theme = "sphinx_rtd_theme"

html_context = {
"display_github": True,
"github_user": "diffpy",
"github_repo": "diffpy.snmf",
"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.
Expand Down Expand Up @@ -221,7 +240,13 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
("index", "diffpy.snmf.tex", "diffpy.snmf Documentation", ab_authors, "manual"),
(
"index",
"diffpy.snmf.tex",
"diffpy.snmf Documentation",
ab_authors,
"manual",
),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -249,7 +274,15 @@

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [("index", "diffpy.snmf", "diffpy.snmf Documentation", ab_authors, 1)]
man_pages = [
(
"index",
"diffpy.snmf",
"diffpy.snmf Documentation",
ab_authors,
1,
)
]

# If true, show URL addresses after external links.
# man_show_urls = False
Expand Down
24 changes: 22 additions & 2 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Welcome to SNMF's Documentation!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here also, just move the old file over to the new proejct so wee keep everything. I don't think there is anything we need from the new template.

====================================

``diffpy.snmf`` - Python package implementing the stretched NMF algorithm.

| Software version |release|
| Last updated |today|.

``SNMF``: This library implements the stretched non negative matrix factorization (sNMF) and sparse stretched NMF
(ssNMF) algorithms described in the paper "Stretched Non-negative Matrix Factorization" by Ran Gu et al. (2023),
which is referenced under the Citation section below.
Expand Down Expand Up @@ -52,8 +57,9 @@ by citing the following paper in your publication:
*npj Comput Mater* **10**, 193 (2024).


=======
Authors
-------
=======
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe make this change after you move over the old file


``snmf`` implements the algorithms described in ...., developed by members of the Billinge Group at
Columbia University, Brookhaven National Laboratory, Stony Brook University, Nankai University, and Colorado State
Expand All @@ -68,6 +74,19 @@ For a detailed list of contributors, check `here

To get started, please go to :ref:`quick_start`

============
Installation
============

See the `README <https://github.com/diffpy/diffpy.snmf#installation>`_
file included with the distribution.

================
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and add this Acknowledgements section to the new doc.

Acknowledgements
================

``diffpy.snmf`` is built and maintained with `scikit-package <https://scikit-package.github.io/scikit-package/>`_.

.. toctree::
:maxdepth: 3
:hidden:
Expand All @@ -84,8 +103,9 @@ To get started, please go to :ref:`quick_start`

.. include:: ../../CHANGELOG.rst

=======
Indices
-------
=======
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and this change


* :ref:`genindex`
* :ref:`search`
3 changes: 1 addition & 2 deletions doc/source/license.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ OPEN SOURCE LICENSE AGREEMENT
=============================
BSD 3-Clause License

Copyright (c) 2023-2024, The Trustees of Columbia University in
the City of New York.
Copyright (c) 2023-2025, The Trustees of Columbia University in the City of New York.
All Rights Reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
23 changes: 23 additions & 0 deletions news/doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* Support ``scikit-package`` Level 5 standard (https://scikit-package.github.io/scikit-package/).

**Security:**

* <news item>
1 change: 1 addition & 0 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
sphinx
sphinx_rtd_theme
sphinx-copybutton
doctr
m2r
Loading