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
10 changes: 6 additions & 4 deletions .github/ISSUE_TEMPLATE/release_checklist.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
---
---

name: Release
about: Checklist and communication channel for PyPI and GitHub release
title: "Ready for <version-number> PyPI/GitHub release"
labels: "release"
assignees: ""

---

### PyPI/GitHub rc-release preparation checklist:

- [ ] 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.
- [ ] The `FALLBACK_VERSION` in `setup.py` has been updated to the latest version on PyPI.
- [ ] 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 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.pdffit2
c_extension: true
headless: false
python_version: ${{ fromJSON(needs.get-python-version.outputs.latest_python_version) }}
64 changes: 61 additions & 3 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:
# 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.pdffit2
c_extension: true
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.pdffit2
# c_extension: true
# maintainer_github_username: sbillinge
# 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.pdffit2
# maintainer_github_username: sbillinge
# 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.pdffit2
c_extension: true
headless: false
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ contributors. This is an open-source project and we hope and expect
that the list of contributors will expand with time. Many thanks to
all current and future contributors!

For more information on the DiffPy project email sb2896@columbia.edu
For more information on the DiffPy project email sbillinge@ucsb.edu

DiffPy was initiated as part of the Distributed Data Analysis of Neutron
Scattering Experiments (DANSE) project, funded by the National Science
Expand Down
2 changes: 1 addition & 1 deletion CODE-OF-CONDUCT.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
sb2896@columbia.edu. All complaints will be reviewed and investigated promptly and fairly.
sbillinge@ucsb.edu. All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ the following paper in your publication:
in crystals (https://stacks.iop.org/0953-8984/19/335219), *J. Phys.: Condens. Matter*, 19, 335219 (2007)

Copyright 2006-2007, Board of Trustees of Michigan State University,
Copyright 2008-2025, Board of Trustees of Columbia University in the
Copyright 2008-2026, Board of Trustees of Columbia University in the
city of New York. (Copyright holder indicated in each source file).

For more information please visit the project web-page:
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ If you use diffpy.pdffit2 in a scientific publication, we would like you to cite
Installation
------------

diffpy.pdffit2 supports Python 3.11, 3.12, and 3.13.
diffpy.pdffit2 supports Python 3.12, 3.13, and 3.14.

Windows, macOS (non-Arm64), Linux
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
12 changes: 7 additions & 5 deletions cookiecutter.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"maintainer_name": "Simon Billinge",
"maintainer_email": "sb2896@columbia.edu",
"maintainer_github_username": "sbillinge",
"author_names": "Simon Billinge",
"author_emails": "sbillinge@ucsb.edu",
"maintainer_names": "Simon Billinge",
"maintainer_emails": "sbillinge@ucsb.edu",
"maintainer_github_usernames": "sbillinge",
"contributors": "Pavol Juhas, Chris Farrow, Simon Billinge, Billinge Group members",
"license_holders": "The Trustees of Columbia University in the City of New York",
"project_name": "diffpy.pdffit2",
Expand All @@ -11,8 +13,8 @@
"package_dir_name": "diffpy.pdffit2",
"project_short_description": "PDFfit2 - real space structure refinement program.",
"project_keywords": "PDF, structure refinement",
"minimum_supported_python_version": "3.11",
"maximum_supported_python_version": "3.13",
"minimum_supported_python_version": "3.12",
"maximum_supported_python_version": "3.14",
"project_needs_c_code_compiled": "Yes",
"project_has_gui_tests": "No"
}
6 changes: 1 addition & 5 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,9 @@
"sphinx.ext.intersphinx",
"sphinx_rtd_theme",
"sphinx_copybutton",
"m2r",
"m2r2",
]

autodoc_mock_imports = [
Copy link
Contributor

Choose a reason for hiding this comment

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

I am guessing we may need to keep this unless there is a reason you think not

"diffpy.pdffit2.pdffit2",
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

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

fullversion = version(project)
Copy link
Contributor

Choose a reason for hiding this comment

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

Please check that full version is getting defined somewhere

# The short X.Y version.
version = "".join(fullversion.split(".post")[:1])
# The full version, including alpha/beta/rc tags.
Expand Down
3 changes: 2 additions & 1 deletion docs/source/examples/Ni_refinement.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Perform simple refinement of Ni structure to the experimental x-ray PDF.
"""Perform simple refinement of Ni structure to the experimental x-ray
PDF.

Save fitted curve, refined structure and results summary.
"""
Expand Down
8 changes: 7 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
| Software version |release|
| Last updated |today|.
===============
Getting started
===============

Welcome to the ``diffpy.pdffit2`` documentation!

The diffpy.pdffit2 package provides functions for the calculation and
refinement of atomic Pair Distribution Functions (PDF) from crystal
structure models. It is used as a computational engine by PDFgui. All
Expand Down Expand Up @@ -88,7 +94,7 @@ Acknowledgements
Table of contents
=================
.. toctree::
:titlesonly:
:maxdepth: 2

examples
Package API <api/diffpy.pdffit2>
Expand Down
15 changes: 10 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ build-backend = "setuptools.build_meta"
name = "diffpy.pdffit2"
dynamic=['version', 'dependencies']
authors = [
{ name="Simon Billinge", email="sb2896@columbia.edu" },
{name='Simon Billinge', email='sbillinge@ucsb.edu'},
]
maintainers = [
{ name="Simon Billinge", email="sb2896@columbia.edu" },
{name='Simon Billinge', email='sbillinge@ucsb.edu'},
]
description = "PDFfit2 - real space structure refinement program."
keywords = ['PDF', 'structure refinement']
readme = "README.rst"
requires-python = ">=3.11, <3.14"
requires-python = ">=3.12, <3.15"
classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
Expand All @@ -25,9 +25,9 @@ classifiers = [
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Operating System :: Unix',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: 3.14',
'Topic :: Scientific/Engineering :: Physics',
'Topic :: Scientific/Engineering :: Chemistry',
]
Expand Down Expand Up @@ -57,7 +57,12 @@ dependencies = {file = ["requirements/pip.txt"]}
[tool.codespell]
exclude-file = ".codespell/ignore_lines.txt"
ignore-words = ".codespell/ignore_words.txt"
skip = "*.cif,*.dat,*.cc,*.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

We probably want to keep the .cc and .h here

skip = "*.cif,*.dat"

[tool.docformatter]
recursive = true
wrap-summaries = 72
wrap-descriptions = 72

[tool.black]
line-length = 79
Expand Down
2 changes: 1 addition & 1 deletion src/diffpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# (c) 2008 trustees of the Michigan State University.
# All rights reserved.
# (c) 2025 The Trustees of Columbia University in the City of New York.
# (c) 2025-2026 The Trustees of Columbia University in the City of New York.
# All rights reserved.
#
# File coded by: Billinge Group members and community contributors.
Expand Down
4 changes: 2 additions & 2 deletions src/diffpy/pdffit2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#
# (c) 2006 trustees of the Michigan State University.
# All rights reserved.
# (c) 2025 The Trustees of Columbia University in the City of New York.
# (c) 2025-2026 The Trustees of Columbia University in the City of New York.
# All rights reserved.
#
# File coded by: Billinge Group members and community contributors.
# File coded by: Billinge group members and community contributors.
#
# See GitHub contributions for a more detailed list of contributors.
# https://github.com/diffpy/diffpy.pdffit2/graphs/contributors
Expand Down
4 changes: 2 additions & 2 deletions src/diffpy/pdffit2/ipy_ext.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python

"""This module defines functions within IPython session to simulate the old
pdffit2 interactive session.
"""This module defines functions within IPython session to simulate the
old pdffit2 interactive session.

Usage: %load_ext diffpy.pdffit2.ipy_ext
"""
Expand Down
Loading