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 4 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 AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Authors
=======

Billinge Group and community contributors.
Simon J.L. Billinge group

Contributors
------------
Expand Down
49 changes: 1 addition & 48 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,52 +1,5 @@
=============
Release Notes
Release notes
=============

.. current developments

0.1.3
=====

**Fixed:**

* Updated README instructions for pip and conda-forge install
* Updated README instructions to check for successful installation


0.1.2
=====

**Added:**

* Use GitHub Actions to build, release, upload to PyPI
* Added issue template for PyPI/GitHub release

**Changed:**

* Added tag check for release
* citation from arXiv to npj Comput Mater in docs

**Fixed:**

* Python version from 3.9 to 3.12 in CI news item
* tests folder at the root of the repo
* re-cookiecuter repo to groupd's package standard
* Add pip dependencies under pip.txt and conda dependencies under conda.txt


0.1.0
=====

**Added:**

* Initial release of diffpy.snmf

**Changed:**

* Support Python version 3.12
* Remove support for Python version 3.9

**Fixed:**

* Repo structure modified to the new diffpy standard
* Code linting based on .pre-commit-config.yaml
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) 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
24 changes: 12 additions & 12 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 All @@ -35,7 +35,7 @@
.. |Tracking| image:: https://img.shields.io/badge/issue_tracking-github-blue
:target: https://github.com/diffpy/diffpy.snmf/issues

A python package implementing the stretched NMF algorithm.
Python package implementing the stretched NMF algorithm.

``diffpy.snmf`` implements the stretched non negative matrix factorization (sNMF) and sparse stretched NMF
(ssNMF) algorithms.
Expand All @@ -50,14 +50,9 @@ For more information about the diffpy.snmf library, please consult our `online d
Citation
--------

If you use this program for a scientific research that leads
to publication, we ask that you acknowledge use of the program
by citing the following paper in your publication:
If you use diffpy.snmf in a scientific publication, we would like you to cite this package as

Ran Gu, Yevgeny Rakita, Ling Lan, Zach Thatcher, Gabrielle E. Kamm, Daniel O’Nolan, Brennan Mcbride, Allison Wustrow, James R. Neilson, Karena W. Chapman, Qiang Du, and Simon J. L. Billinge,
`Stretched Non-negative Matrix Factorization
<https://doi.org/10.1038/s41524-024-01377-5>`__,
*npj Comput Mater* **10**, 193 (2024).
diffpy.snmf Package, https://github.com/diffpy/diffpy.snmf

Installation
------------
Expand Down Expand Up @@ -104,7 +99,7 @@ Support and Contribute

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

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

Feel free to fork the project and contribute. To install diffpy.snmf
in a development mode, with its sources being directly used by Python
Expand Down Expand Up @@ -132,4 +127,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/>`_.
66 changes: 14 additions & 52 deletions doc/source/api/diffpy.snmf.rst
Original file line number Diff line number Diff line change
@@ -1,68 +1,30 @@
:tocdepth: -1

diffpy.snmf package
===================
|title|
=======

.. automodule:: diffpy.snmf
:members:
:undoc-members:
:show-inheritance:

Submodules
----------

diffpy.snmf.subroutines module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: diffpy.snmf.subroutines
:members:
:undoc-members:
:show-inheritance:

diffpy.snmf.containers module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: diffpy.snmf.containers
:members:
:undoc-members:
:show-inheritance:

diffpy.snmf.io module
^^^^^^^^^^^^^^^^^^^^^

.. automodule:: diffpy.snmf.io
:members:
:undoc-members:
:show-inheritance:
.. |title| replace:: diffpy.snmf package

diffpy.snmf.polynomials module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. automodule:: diffpy.snmf.polynomials
.. automodule:: diffpy.snmf
:members:
:undoc-members:
:show-inheritance:

diffpy.snmf.optimizers module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Subpackages
-----------

.. automodule:: diffpy.snmf.optimizers
:members:
:undoc-members:
:show-inheritance:
.. toctree::
diffpy.snmf.example_package

diffpy.snmf.factorizers module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Submodules
----------

.. automodule:: diffpy.snmf.factorizers
:members:
:undoc-members:
:show-inheritance:
|module|
--------

diffpy.snmf.stretchednmfapp module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. |module| replace:: diffpy.snmf.example_submodule module

.. automodule:: diffpy.snmf.stretchednmfapp
.. automodule:: diffpy.snmf.example_submodule
:members:
:undoc-members:
:show-inheritance:
47 changes: 40 additions & 7 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,15 +18,21 @@
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()))

# abbreviations
ab_authors = "Billinge Group members and community contributors"
ab_authors = "Simon J.L. Billinge group"

# -- General configuration ------------------------------------------------

Expand All @@ -43,6 +49,7 @@
"sphinx.ext.viewcode",
"sphinx.ext.intersphinx",
"sphinx_rtd_theme",
"sphinx_copybutton",
"m2r",
]

Expand All @@ -62,13 +69,12 @@

# General information about the project.
project = "diffpy.snmf"
copyright = "2023-%Y, The Trustees of Columbia University in the City of New York"
copyright = "%Y, The Trustees of Columbia University in the City of New York"
Copy link
Contributor

Choose a reason for hiding this comment

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

keep the old one here


# The version info for the project you're documenting, acts as replacement for
# |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
Loading
Loading