Skip to content
Open
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 .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exclude =
__pycache__,
build,
dist,
doc/source/conf.py
docs/source/conf.py
max-line-length = 115
# Ignore some style 'errors' produced while formatting by 'black'
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#labels-why-pycodestyle-warnings
Expand Down
7 changes: 4 additions & 3 deletions .github/ISSUE_TEMPLATE/release_checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ assignees: ""
- [ ] All PRs/issues attached to the release are merged.
- [ ] All the badges on the README are passing.
- [ ] License information is verified as correct. If you are unsure, please comment below.
- [ ] Locally rendered documentation contains all appropriate pages, including API references (check no modules are
missing), tutorials, and other human-written text is up-to-date with any changes in the code.
- [ ] Locally rendered documentation contains all appropriate pages, tutorials, and other human-written text is up-to-date with any changes in the code.
- [ ] All API references are included. To check this, run `conda install scikit-package` and then `package build api-doc`. Review any edits made by rerendering the docs locally.
- [ ] Installation instructions in the README, documentation, and the website are updated.
- [ ] Successfully run any tutorial examples or do functional testing with the latest Python version.
- [ ] Grammar and writing quality are checked (no typos).
- [ ] Install `pip install build twine`, run `python -m build` and `twine check dist/*` to ensure that the package can be built and is correctly formatted for PyPI release.
- [ ] Dispatch matrix testing to test the release on all Python versions and systems. If you do not have permission to run this workflow, tag the maintainer and say `@maintainer, please dispatch matrix testing workflow`.

Please tag the maintainer (e.g., @username) in the comment here when you are ready for the PyPI/GitHub release. Include any additional comments necessary, such as version information and details about the pre-release here:

Expand All @@ -34,7 +35,7 @@ Please let the maintainer know that all checks are done and the package is ready
<!-- After the maintainer releases the PyPI package, please check the following when creating a PR for conda-forge release.-->

- [ ] Ensure that the full release has appeared on PyPI successfully.
- [ ] New package dependencies listed in `conda.txt` and `test.txt` are added to `meta.yaml` in the feedstock.
- [ ] New package dependencies listed in `conda.txt` and `tests.txt` are added to `meta.yaml` in the feedstock.
- [ ] Close any open issues on the feedstock. Reach out to the maintainer if you have questions.
- [ ] Tag the maintainer for conda-forge release.

Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/build-and-publish-docs-on-dispatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Build and Publish Docs on Dispatch

on:
workflow_dispatch:

jobs:
get-python-version:
uses: scikit-package/release-scripts/.github/workflows/_get-python-version-latest.yml@v0
with:
python_version: 0

docs:
uses: scikit-package/release-scripts/.github/workflows/_release-docs.yml@v0
with:
project: diffpy.srmise
c_extension: false
headless: false
python_version: ${{ fromJSON(needs.get-python-version.outputs.latest_python_version) }}
66 changes: 62 additions & 4 deletions .github/workflows/build-wheel-release-upload.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,76 @@
name: Release (GitHub/PyPI) and Deploy Docs
name: Build Wheel and Release

# Trigger on tag push or manual dispatch.
# Tag and release privilege are verified inside the reusable workflow.
on:
workflow_dispatch:
push:
tags:
- "*" # Trigger on all tags initially, but tag and release privilege are verified in _build-wheel-release-upload.yml
- "*"

# ── Release modality ──────────────────────────────────────────────────────────
# Three options are provided below. Only ONE job should be active at a time.
# To switch: comment out the active job and uncomment your preferred option,
# then commit the change to main before tagging a release.
# ─────────────────────────────────────────────────────────────────────────────

jobs:
release:
# Option 1 (default): Release to GitHub, publish to PyPI, and deploy docs.
#
# The wheel is uploaded to PyPI so users can install with `pip install`.
# A GitHub release is created with the changelog as the release body, and
# the Sphinx documentation is rebuilt and deployed to GitHub Pages.
#
# Choose this for open-source packages distributed via PyPI and/or
# conda-forge where broad public availability is the goal.
build-release:
uses: scikit-package/release-scripts/.github/workflows/_build-wheel-release-upload.yml@v0
with:
project: diffpy.srmise
c_extension: false
maintainer_GITHUB_username: sbillinge
maintainer_github_username: sbillinge
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}

# Option 2: Release to GitHub and deploy docs, without publishing to PyPI.
#
# A GitHub release is created and the Sphinx docs are deployed, but the
# wheel is not uploaded to PyPI. The source code remains publicly visible
# on GitHub and can be installed directly from there.
#
# Choose this when the package is public but you prefer to keep it off the
# default pip index — for example, if you distribute via conda-forge only,
# or if the package is not yet ready for a permanent PyPI presence.
#
# To use: comment out Option 1 above and uncomment the lines below.
# build-release-no-pypi:
# uses: scikit-package/release-scripts/.github/workflows/_build-release-github-no-pypi.yml@v0
# with:
# project: diffpy.srmise
# c_extension: false
# maintainer_github_username: sbillinge, Ainamacar
# secrets:
# PAT_TOKEN: ${{ secrets.PAT_TOKEN }}

# Option 3: Release to GitHub with wheel, license, and instructions bundled
# as a downloadable zip attached to the GitHub release asset.
#
# The wheel is built and packaged together with INSTRUCTIONS.txt and the
# LICENSE file into a zip that is attached directly to the GitHub release.
# Users with access to the (private) repo download the zip, follow the
# instructions inside, and install locally with pip. No PyPI or conda-forge
# upload occurs, and no docs are deployed.
#
# Choose this for private or restricted packages where distribution must be
# controlled: only users with repo access can download the release asset,
# making the GitHub release itself the distribution channel.
#
# To use: comment out Option 1 above and uncomment the lines below.
# build-release-private:
# uses: scikit-package/release-scripts/.github/workflows/_build-release-github-private-pure.yml@v0
# with:
# project: diffpy.srmise
# maintainer_github_username: sbillinge, Ainamacar
# secrets:
# PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/check-news-item.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Check for News
on:
pull_request_target:
branches:
- main
- main # GitHub does not evaluate expressions in trigger filters; edit this value if your base branch is not main

jobs:
check-news-item:
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/matrix-and-codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Matrix and Codecov

on:
# push:
# branches:
# - main
release:
types:
- prereleased
- published
workflow_dispatch:

jobs:
matrix-coverage:
uses: scikit-package/release-scripts/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml@v0
with:
project: diffpy.srmise
c_extension: false
headless: false
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ python:
- requirements: requirements/docs.txt

sphinx:
configuration: doc/source/conf.py
configuration: docs/source/conf.py
3 changes: 1 addition & 2 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Authors
=======

Luke Granlund
Billinge Group and community contributors.
Luke Granlund, Simon Billinge, Billinge Group members

Contributors
------------
Expand Down
File renamed without changes.
35 changes: 24 additions & 11 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.srmise
:height: 100px

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

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

Expand All @@ -25,8 +25,9 @@
:target: https://anaconda.org/conda-forge/diffpy.srmise

.. |PR| image:: https://img.shields.io/badge/PR-Welcome-29ab47ff
:target: https://github.com/diffpy/diffpy.srmise/pulls

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

.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/diffpy.srmise
Expand Down Expand Up @@ -101,10 +102,6 @@ The following creates and activates a new environment named ``diffpy.srmise_env`
conda create -n diffpy.srmise_env diffpy.srmise
conda activate diffpy.srmise_env

To confirm that the installation was successful, type ::

python -c "import diffpy.srmise; print(diffpy.srmise.__version__)"

The output should print the latest version displayed on the badges above.

If the above does not work, you can use ``pip`` to download and install the latest release from
Expand All @@ -119,6 +116,19 @@ and run the following ::

pip install .

This package also provides command-line utilities. To check the software has been installed correctly, type ::

diffpy.srmise --version

You can also type the following command to verify the installation. ::

python -c "import diffpy.srmise; print(diffpy.srmise.__version__)"


To view the basic usage and available commands, type ::

diffpy.srmise -h

Getting Started
---------------

Expand All @@ -127,9 +137,7 @@ You may consult our `online documentation <https://diffpy.github.io/diffpy.srmis
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.srmise. Please join the diffpy.srmise users community by joining the Google group. The diffpy.srmise 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.srmise/issues>`_ and/or `submit a fix as a PR <https://github.com/diffpy/diffpy.srmise/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.srmise/issues>`_ and/or `submit a fix as a PR <https://github.com/diffpy/diffpy.srmise/pulls>`_.

Feel free to fork the project and contribute. To install diffpy.srmise
in a development mode, with its sources being directly used by Python
Expand All @@ -152,9 +160,14 @@ trying to commit again.

Improvements and fixes are always appreciated.

Before contributing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.srmise/blob/main/CODE_OF_CONDUCT.rst>`_.
Before contributing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.srmise/blob/main/CODE-OF-CONDUCT.rst>`_.

Contact
-------

For more information on diffpy.srmise please visit the project `web-page <https://diffpy.github.io/>`_ or email Prof. Simon Billinge at sb2896@columbia.edu.
For more information on diffpy.srmise please visit the project `web-page <https://diffpy.github.io/>`_ or email the maintainers ``Simon Billinge(sbillinge@ucsb.edu)``.

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

``diffpy.srmise`` is built and maintained with `scikit-package <https://scikit-package.github.io/scikit-package/>`_.
20 changes: 20 additions & 0 deletions cookiecutter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"author_names": "Simon J.L Billinge group, Luke Granlund",
"author_emails": "sbillinge@ucsb.edu, granlund@pa.msu.edu",
"maintainer_names": "Simon Billinge",
"maintainer_emails": "sbillinge@ucsb.edu",
"maintainer_github_usernames": "sbillinge, Ainamacar",
"contributors": "Simon Billinge, Billinge Group members",
"license_holders": "The Trustees of Columbia University in the City of New York",
"project_name": "diffpy.srmise",
"github_username_or_orgname": "diffpy",
"github_repo_name": "diffpy.srmise",
"conda_pypi_package_dist_name": "diffpy.srmise",
"package_dir_name": "diffpy.srmise",
"project_short_description": "Peak extraction and peak fitting tool for atomic pair distribution functions.",
"project_keywords": "peak extraction, fitting, PDF, AIC, multimodelling",
"minimum_supported_python_version": "3.12",
"maximum_supported_python_version": "3.14",
"project_needs_c_code_compiled": "No",
"project_has_gui_tests": "No"
}
8 changes: 4 additions & 4 deletions docs/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.srmise documentation build configuration file, created by
# diffpy.srmise 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 @@ -22,11 +22,11 @@
try:
fullversion = version("diffpy.srmise")
except Exception:
fullversion = "No version found. The correct version will appear in the released version."
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 @@ -50,7 +50,7 @@
"sphinx.ext.intersphinx",
"sphinx_rtd_theme",
"sphinx_copybutton",
"m2r",
"m2r2",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
7 changes: 3 additions & 4 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

.. |title| replace:: diffpy.srmise documentation

``diffpy.srmise`` - Peak extraction and peak fitting tool for atomic pair distribution functions
``diffpy.srmise`` - Peak extraction and peak fitting tool for atomic pair distribution functions.

| Software version |release|
| Last updated |today|.
Expand All @@ -21,7 +21,7 @@ To get started, please visit the :ref:`Getting started <getting-started>` page.
Authors
=======

``diffpy.srmise`` is developed by Simon Billinge, Billinge Group members. The maintainer for this project is Simon Billinge. For a detailed list of contributors see
``diffpy.srmise`` is developed by Simon Billinge, Billinge Group members. This project is maintained by Simon Billinge. For a detailed list of contributors see
https://github.com/diffpy/diffpy.srmise/graphs/contributors.

============
Expand All @@ -41,8 +41,7 @@ Acknowledgements
Table of contents
=================
.. toctree::
:maxdepth: 1
:titlesonly:
:maxdepth: 2

tutorial/index
extending
Expand Down
8 changes: 4 additions & 4 deletions docs/source/license.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ BSD 3-Clause License

Copyright 2014-2015, Board of Trustees of Michigan State University

Copyright 2016-2025, The Trustees of Columbia University in the City of New York.
Copyright 2016-2026, The Trustees of Columbia University in the City of New York.

All rights reserved.

Expand Down Expand Up @@ -39,9 +39,9 @@ modification, are permitted provided that the following conditions are met:
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Expand Down
23 changes: 23 additions & 0 deletions news/skpkg.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* No news added: re-scikit-packaged `diffpy.srmise`

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>
Loading
Loading