diff --git a/.github/ISSUE_TEMPLATE/release_checklist.md b/.github/ISSUE_TEMPLATE/release_checklist.md index 56bcd01..56c5fca 100644 --- a/.github/ISSUE_TEMPLATE/release_checklist.md +++ b/.github/ISSUE_TEMPLATE/release_checklist.md @@ -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: diff --git a/.github/workflows/build-and-publish-docs-on-dispatch.yml b/.github/workflows/build-and-publish-docs-on-dispatch.yml new file mode 100644 index 0000000..916991b --- /dev/null +++ b/.github/workflows/build-and-publish-docs-on-dispatch.yml @@ -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.srxplanargui + c_extension: false + headless: false + python_version: ${{ fromJSON(needs.get-python-version.outputs.latest_python_version) }} diff --git a/.github/workflows/build-wheel-release-upload.yml b/.github/workflows/build-wheel-release-upload.yml index ae0b583..42fc074 100644 --- a/.github/workflows/build-wheel-release-upload.yml +++ b/.github/workflows/build-wheel-release-upload.yml @@ -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.srxplanargui 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.srxplanargui + # c_extension: false + # 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.srxplanargui + # maintainer_github_username: sbillinge + # secrets: + # PAT_TOKEN: ${{ secrets.PAT_TOKEN }} diff --git a/.github/workflows/check-news-item.yml b/.github/workflows/check-news-item.yml index 33bc2b7..64d2560 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/.github/workflows/matrix-and-codecov.yml b/.github/workflows/matrix-and-codecov.yml new file mode 100644 index 0000000..3bd42fe --- /dev/null +++ b/.github/workflows/matrix-and-codecov.yml @@ -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.srxplanargui + c_extension: false + headless: false + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/AUTHORS.rst b/AUTHORS.rst index 51563e5..bb8d6e2 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -3,7 +3,7 @@ Authors Xiaohao Yang -Billinge Group members +Billinge Group members and the DiffPy Team Contributors ------------ diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 721d865..9bf72e2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -12,4 +12,3 @@ Release notes * Change "diffpy.srxplanargui" from python 2 to python 3 architecture. * Support ``scikit-package`` Level 5 standard (https://scikit-package.github.io/scikit-package/). * Change documentation for diffpy.srxplanargui to successfully display. - diff --git a/CODE-OF-CONDUCT.rst b/CODE-OF-CONDUCT.rst index e8199ca..25fafe2 100644 --- a/CODE-OF-CONDUCT.rst +++ b/CODE-OF-CONDUCT.rst @@ -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. diff --git a/LICENSE.rst b/LICENSE.rst index c01cc33..e0ae064 100644 --- a/LICENSE.rst +++ b/LICENSE.rst @@ -1,6 +1,7 @@ BSD 3-Clause License Copyright (c) 2009-2025, The Trustees of Columbia University in the City of New York. +Copyright (c) 2026, The DiffPy Team. All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/README.rst b/README.rst index 01dc6a8..2135d32 100644 --- a/README.rst +++ b/README.rst @@ -38,7 +38,9 @@ xPDFsuite, a software for PDF transformation and visualization. -GUI for diffpy.srxplanar +GUI for diffpy.srxplanar; subpart for xPDFsuite, a software for PDF transformation and visualization + +For more information about the diffpy.srxplanargui library, please consult our `online documentation `_. Citation -------- @@ -129,7 +131,7 @@ Before contributing, please read our `Code of Conduct `_ or email Simon Billinge at sb2896@columbia.edu. +For more information on diffpy.srxplanargui please visit the project `web-page `_ or email the maintainers ``Simon Billinge(sbillinge@ucsb.edu)``. Acknowledgements ---------------- diff --git a/cookiecutter.json b/cookiecutter.json index 8a7ebc3..ca6db88 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -1,15 +1,17 @@ { - "maintainer_name": "Simon Billinge", - "maintainer_email": "sb2896@columbia.edu", - "maintainer_github_username": "sbillinge", - "contributors": "Xiaohao Yang and Billinge Group members", - "license_holders": "The Trustees of Columbia University in the City of New York", + "author_names": "Simon Billinge", + "author_emails": "sbillinge@ucsb.edu", + "maintainer_names": "Simon Billinge", + "maintainer_emails": "sbillinge@ucsb.edu", + "maintainer_github_usernames": "sbillinge", + "contributors": "Xiaohao Yang and Billinge Group members and the DiffPy Team", "project_name": "diffpy.srxplanargui", + "license_holders": "The DiffPy Team", "github_username_or_orgname": "diffpy", "github_repo_name": "diffpy.srxplanargui", "conda_pypi_package_dist_name": "diffpy.srxplanargui", "package_dir_name": "diffpy.srxplanargui", - "project_short_description": "xPDFsuite, a software for PDF transformation and visualization.", + "project_short_description": "GUI for diffpy.srxplanar; subpart for xPDFsuite", "project_keywords": "diffpy, pdf, data interpretation", "minimum_supported_python_version": "3.11", "maximum_supported_python_version": "3.13", diff --git a/docs/source/conf.py b/docs/source/conf.py index 4d8de40..289b7d7 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -32,7 +32,7 @@ sys.path.insert(0, str(Path("../../src").resolve())) # abbreviations -ab_authors = "Rundong Hua, Simon Billinge, Billinge Group members" +ab_authors = "Billinge Group members and the DiffPy Team" # -- General configuration ------------------------------------------------ @@ -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. diff --git a/docs/source/img/.placeholder b/docs/source/img/.placeholder new file mode 100644 index 0000000..e69de29 diff --git a/docs/source/index.rst b/docs/source/index.rst index a190be7..446bc8a 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -4,7 +4,8 @@ .. |title| replace:: diffpy.srxplanargui documentation -``diffpy.srxplanargui`` - xPDFsuite, a software for PDF transformation and visualization. +``diffpy.srxplanargui`` - GUI for diffpy.srxplanar; subpart for xPDFsuite, +a software for PDF transformation and visualization | Software version |release| | Last updated |today|. @@ -22,7 +23,7 @@ for getting the whole xpdfsuite package and download the package there. Authors ======= -``diffpy.srxplanargui`` is developed by Xiaohao Yang, Simon Billinge, Billinge Group members. The maintainer for this project is Simon Billinge. For a detailed list of contributors see +``diffpy.srxplanargui`` is developed by Xiaohao Yang, Simon Billinge, Billinge Group members, and the DiffPy Team. This project is maintained by Simon Billinge. For a detailed list of contributors see https://github.com/diffpy/diffpy.srxplanargui/graphs/contributors. ============ diff --git a/docs/source/license.rst b/docs/source/license.rst index 5e751f7..31f1419 100644 --- a/docs/source/license.rst +++ b/docs/source/license.rst @@ -10,6 +10,7 @@ OPEN SOURCE LICENSE AGREEMENT BSD 3-Clause License Copyright (c) 2025, The Trustees of Columbia University in the City of New York. +Copyright (c) 2026, The DiffPy Team. All Rights Reserved. Redistribution and use in source and binary forms, with or without diff --git a/docs/source/snippets/.placeholder b/docs/source/snippets/.placeholder new file mode 100644 index 0000000..e69de29 diff --git a/news/update-scikit-package.rst b/news/update-scikit-package.rst new file mode 100644 index 0000000..98c19aa --- /dev/null +++ b/news/update-scikit-package.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* Update package scaffolding to the latest ``scikit-package`` standard. + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* diff --git a/pyproject.toml b/pyproject.toml index 53ae9b2..bee45ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,12 +6,15 @@ build-backend = "setuptools.build_meta" name = "diffpy.srxplanargui" 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 = "xPDFsuite, a software for PDF transformation and visualization." +description = """ +GUI for diffpy.srxplanar; subpart for xPDFsuite, a software \ +for PDF transformation and visualization\ +""" keywords = ['diffpy', 'pdf', 'data interpretation'] readme = "README.rst" requires-python = ">=3.11, <3.14" diff --git a/requirements/build.txt b/requirements/build.txt new file mode 100644 index 0000000..e69de29 diff --git a/requirements/docs.txt b/requirements/docs.txt index 5f34c6e..1de813f 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -2,4 +2,4 @@ sphinx sphinx_rtd_theme sphinx-copybutton doctr -m2r +m2r2 diff --git a/src/diffpy/__init__.py b/src/diffpy/__init__.py index ffe8c8b..4677b82 100644 --- a/src/diffpy/__init__.py +++ b/src/diffpy/__init__.py @@ -2,9 +2,11 @@ ############################################################################## # # (c) 2012-2025 The Trustees of Columbia University in the City of New York. +# (c) 2026 The DiffPy Team. # All rights reserved. # -# File coded by: Xiaohao Yang and Billinge Group members. +# File coded by: Xiaohao Yang, +# Billinge Group members, and community contributors. # # See GitHub contributions for a more detailed list of contributors. # https://github.com/diffpy/diffpy.srxplanargui/graphs/contributors diff --git a/src/diffpy/srxplanargui/__init__.py b/src/diffpy/srxplanargui/__init__.py index 19cf2a0..df25219 100644 --- a/src/diffpy/srxplanargui/__init__.py +++ b/src/diffpy/srxplanargui/__init__.py @@ -2,9 +2,10 @@ ############################################################################## # # (c) 2012-2025 The Trustees of Columbia University in the City of New York. +# (c) 2026 The DiffPy Team. # All rights reserved. # -# File coded by: Xiaohao Yang, Billinge Group members. +# File coded by: Xiaohao Yang, Billinge Group members and the DiffPy Team. # # See GitHub contributions for a more detailed list of contributors. # https://github.com/diffpy/diffpy.srxplanargui/graphs/contributors @@ -12,7 +13,8 @@ # See LICENSE.rst for license information. # ############################################################################## -"""XPDFsuite, a software for PDF transformation and visualization.""" +"""GUI for diffpy.srxplanar; subpart for xPDFsuite, a software for PDF +transformation and visualization.""" # package version from diffpy.srxplanargui.version import __version__ # noqa diff --git a/src/diffpy/srxplanargui/srxplanargui_app.py b/src/diffpy/srxplanargui/srxplanargui_app.py index 653c323..c8f76a6 100644 --- a/src/diffpy/srxplanargui/srxplanargui_app.py +++ b/src/diffpy/srxplanargui/srxplanargui_app.py @@ -7,8 +7,9 @@ def main(): parser = argparse.ArgumentParser( prog="diffpy.srxplanargui", description=( - "xPDFsuite, a software for PDF transformation" - " and visualization.\n\n For more information, visit: " + "GUI for diffpy.srxplanar; subpart for xPDFsuite," + "a software for PDF transformation and visualization\n\n" + "For more information, visit: " "https://github.com/diffpy/diffpy.srxplanargui/" ), formatter_class=argparse.RawDescriptionHelpFormatter, diff --git a/src/diffpy/srxplanargui/version.py b/src/diffpy/srxplanargui/version.py index d278817..02f1eca 100644 --- a/src/diffpy/srxplanargui/version.py +++ b/src/diffpy/srxplanargui/version.py @@ -2,9 +2,10 @@ ############################################################################## # # (c) 2012-2025 The Trustees of Columbia University in the City of New York. +# (c) 2026 The DiffPy Team. # All rights reserved. # -# File coded by: Xiaohao Yang, Billinge Group members. +# File coded by: Xiaohao Yang, Billinge Group members and the DiffPy Team. # # See GitHub contributions for a more detailed list of contributors. # https://github.com/diffpy/diffpy.srxplanargui/graphs/contributors # noqa: E501 diff --git a/tests/conftest.py b/tests/conftest.py index 4fe17d4..e3b6313 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -12,10 +12,7 @@ def user_filesystem(tmp_path): cwd_dir = base_dir / "cwd_dir" cwd_dir.mkdir(parents=True, exist_ok=True) - home_config_data = { - "username": "home_username", - "email": "home@email.com", - } + home_config_data = {"username": "home_username", "email": "home@email.com"} with open(home_dir / "diffpyconfig.json", "w") as f: json.dump(home_config_data, f)