From 68dc5738d30ee6954151340302e37cda0122b164 Mon Sep 17 00:00:00 2001 From: Daniel Sirakov Date: Tue, 7 Jul 2026 22:26:12 -0700 Subject: [PATCH 1/2] skpkg: update project to latest scikit-package template --- .../workflows/build-wheel-release-upload.yml | 63 ++++++++++++++++++- .github/workflows/check-news-item.yml | 2 +- README.rst | 2 +- cookiecutter.json | 6 +- docs/source/index.rst | 5 +- news/scikitv3.3.0.rst | 23 +++++++ src/diffpy/__init__.py | 5 +- src/diffpy/srfit/__init__.py | 2 +- src/diffpy/srfit/srfit_app.py | 2 +- src/diffpy/srfit/version.py | 5 +- 10 files changed, 96 insertions(+), 19 deletions(-) create mode 100644 news/scikitv3.3.0.rst diff --git a/.github/workflows/build-wheel-release-upload.yml b/.github/workflows/build-wheel-release-upload.yml index c5e92258..d51e7a42 100644 --- a/.github/workflows/build-wheel-release-upload.yml +++ b/.github/workflows/build-wheel-release-upload.yml @@ -1,18 +1,75 @@ -name: Build Wheel, Release on 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.srfit c_extension: false - maintainer_GITHUB_username: cadenmyers13, sbillinge + maintainer_github_username: cadenmyers13, 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.srfit + # c_extension: false + # maintainer_github_username: cadenmyers13, 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.srfit + # maintainer_github_username: cadenmyers13, sbillinge + # secrets: + # PAT_TOKEN: ${{ secrets.PAT_TOKEN }} diff --git a/.github/workflows/check-news-item.yml b/.github/workflows/check-news-item.yml index bd352c24..4d641bc2 100644 --- a/.github/workflows/check-news-item.yml +++ b/.github/workflows/check-news-item.yml @@ -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: diff --git a/README.rst b/README.rst index be8a91e4..b0474756 100644 --- a/README.rst +++ b/README.rst @@ -199,7 +199,7 @@ Before contributing, please read our `Code of Conduct `_ or email the maintainers ``Caden Myers (cjm2304@columbia.edu) and Simon J. L. Billinge (sbillinge@ucsb.edu)``. +For more information on diffpy.srfit please visit the project `web-page `_ or email the maintainers ``Caden Myers(cjm2304@columbia.edu) and Simon J. L. Billinge(sbillinge@ucsb.edu)``. Acknowledgements ---------------- diff --git a/cookiecutter.json b/cookiecutter.json index 46da0e2e..63ecd00d 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -5,16 +5,16 @@ "maintainer_emails": "cjm2304@columbia.edu, sbillinge@ucsb.edu", "maintainer_github_usernames": "cadenmyers13, sbillinge", "contributors": "Christopher Farrow, Pavol Juhas, Caden Myers, Simon J. L. Billinge, and members of the DiffPy community.", - "license_holders": "The DiffPy Team", "project_name": "diffpy.srfit", + "license_holders": "The DiffPy Team", "github_username_or_orgname": "diffpy", "github_repo_name": "diffpy.srfit", "conda_pypi_package_dist_name": "diffpy.srfit", "package_dir_name": "diffpy.srfit", "project_short_description": "Generalized code base for modeling problems.", "project_keywords": "regression, modeling, fitting, diffraction, PDF", - "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": "No", "project_has_gui_tests": "No" } diff --git a/docs/source/index.rst b/docs/source/index.rst index b40360f6..18a64a76 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -42,7 +42,7 @@ Authors ======= diffpy.srfit is developed by members of the Billinge Group at -Columbia University and at Brookhaven National Laboratory including +the University of California, Santa Barbara, Columbia University and at Brookhaven National Laboratory including Christopher L. Farrow, Pavol Juhás, Simon J.L. Billinge. The source code in *observable.py* was derived from the 1.0 version @@ -80,9 +80,10 @@ Table of contents .. toctree:: :titlesonly: + getting-started + Package API license release - Package API .. faq.rst diff --git a/news/scikitv3.3.0.rst b/news/scikitv3.3.0.rst new file mode 100644 index 00000000..c6d1073d --- /dev/null +++ b/news/scikitv3.3.0.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* Updated project to the latest scikit-package template + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* diff --git a/src/diffpy/__init__.py b/src/diffpy/__init__.py index bcf7fcd3..75681401 100644 --- a/src/diffpy/__init__.py +++ b/src/diffpy/__init__.py @@ -7,7 +7,7 @@ # (c) 2025-present The DiffPy Team. # # File coded by: Christopher Farrow, Pavol Juhas, Caden Myers, -# Simon J. L. Billinge, and members of the DiffPy community. +# Simon J. L. Billinge, Billinge Group members and community contributors. # # See GitHub contributions for a more detailed list of contributors. # https://github.com/diffpy/diffpy.srfit/graphs/contributors @@ -15,6 +15,3 @@ # See LICENSE.rst for license information. # ############################################################################## -from pkgutil import extend_path - -__path__ = extend_path(__path__, __name__) diff --git a/src/diffpy/srfit/__init__.py b/src/diffpy/srfit/__init__.py index d8b19522..7a70bbf2 100644 --- a/src/diffpy/srfit/__init__.py +++ b/src/diffpy/srfit/__init__.py @@ -6,7 +6,7 @@ # (c) 2026-present The DiffPy Team. All rights reserved. # # File coded by: Christopher Farrow, Pavol Juhas, Caden Myers, -# Simon J. L. Billinge, and members of the DiffPy community. +# Simon J. L. Billinge, Billinge Group members and community contributors. # # See GitHub contributions for a more detailed list of contributors. # https://github.com/diffpy/diffpy.srfit/graphs/contributors diff --git a/src/diffpy/srfit/srfit_app.py b/src/diffpy/srfit/srfit_app.py index 65b92262..aed5989a 100644 --- a/src/diffpy/srfit/srfit_app.py +++ b/src/diffpy/srfit/srfit_app.py @@ -1,6 +1,6 @@ import argparse -from diffpy.srfit.version import __version__ +from diffpy.srfit.version import __version__ # noqa def main(): diff --git a/src/diffpy/srfit/version.py b/src/diffpy/srfit/version.py index c62be11e..e341883e 100644 --- a/src/diffpy/srfit/version.py +++ b/src/diffpy/srfit/version.py @@ -6,10 +6,9 @@ # (c) 2026-present The DiffPy Team. All rights reserved. # # File coded by: Christopher Farrow, Pavol Juhas, Caden Myers, -# Simon J. L. Billinge, and members of the DiffPy community. -# +# Simon J. L. Billinge, Billinge Group members and community contributors. # See GitHub contributions for a more detailed list of contributors. -# https://github.com/diffpy/diffpy.srfit/graphs/contributors +# https://github.com/diffpy/diffpy.srfit/graphs/contributors # noqa: E501 # # See LICENSE.rst for license information. # From a2bab04363e4a72dc1bde1d2ca83903b1f593a01 Mon Sep 17 00:00:00 2001 From: Simon Billinge Date: Thu, 9 Jul 2026 04:15:48 -0700 Subject: [PATCH 2/2] Reorganize update message in changelog Moved the update of the project template from 'Changed' to 'Fixed' section. --- news/scikitv3.3.0.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/news/scikitv3.3.0.rst b/news/scikitv3.3.0.rst index c6d1073d..6ba0f7c5 100644 --- a/news/scikitv3.3.0.rst +++ b/news/scikitv3.3.0.rst @@ -4,7 +4,7 @@ **Changed:** -* Updated project to the latest scikit-package template +* **Deprecated:** @@ -16,7 +16,7 @@ **Fixed:** -* +* Updated project to the latest scikit-package template **Security:**