From 03effc390a65fc88f27d58d936c4a5b346aca99a Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Tue, 10 Jun 2025 17:13:00 -0400 Subject: [PATCH 1/5] skpkg: update .github dir with skpkg --- .github/ISSUE_TEMPLATE/release_checklist.md | 14 +++++++------- .../pull_request_template.md | 15 +++++++++++++++ .github/workflows/build-wheel-release-upload.yml | 6 +++--- .github/workflows/check-news-item.yml | 2 +- .../matrix-and-codecov-on-merge-to-main.yml | 2 +- .github/workflows/publish-docs-on-release.yml | 6 +----- .github/workflows/tests-on-pr.yml | 5 +---- 7 files changed, 29 insertions(+), 21 deletions(-) create mode 100644 .github/PULL_REQUEST_TEMPLATE/pull_request_template.md diff --git a/.github/ISSUE_TEMPLATE/release_checklist.md b/.github/ISSUE_TEMPLATE/release_checklist.md index fa94779e..6107962c 100644 --- a/.github/ISSUE_TEMPLATE/release_checklist.md +++ b/.github/ISSUE_TEMPLATE/release_checklist.md @@ -13,30 +13,30 @@ assignees: "" - [ ] 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. -- [ ] Installation instructions in the README, documentation, and the website (e.g., diffpy.org) are updated. +- [ ] 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. -Please mention @sbillinge here when you are ready for PyPI/GitHub release. Include any additional comments necessary, such as version information and details about the pre-release here: +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: ### PyPI/GitHub full-release preparation checklist: - [ ] Create a new conda environment and install the rc from PyPI (`pip install ==??`) - [ ] License information on PyPI is correct. -- [ ] Docs are deployed successfully to `https://www.diffpy.org/`. +- [ ] Docs are deployed successfully to `https:///`. - [ ] Successfully run all tests, tutorial examples or do functional testing. -Please let @sbillinge know that all checks are done and the package is ready for full release. +Please let the maintainer know that all checks are done and the package is ready for full release. ### conda-forge release preparation checklist: - + - [ ] 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. -- [ ] Close any open issues on the feedstock. Reach out to @bobleesj if you have questions. -- [ ] Tag @sbillinge and @bobleesj for conda-forge release. +- [ ] Close any open issues on the feedstock. Reach out to the maintainer if you have questions. +- [ ] Tag the maintainer for conda-forge release. ### Post-release checklist diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md new file mode 100644 index 00000000..1099d862 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -0,0 +1,15 @@ +### What problem does this PR address? + + + +### What should the reviewer(s) do? + + + + diff --git a/.github/workflows/build-wheel-release-upload.yml b/.github/workflows/build-wheel-release-upload.yml index db92d9d7..485aa356 100644 --- a/.github/workflows/build-wheel-release-upload.yml +++ b/.github/workflows/build-wheel-release-upload.yml @@ -8,11 +8,11 @@ on: jobs: release: - uses: Billingegroup/release-scripts/.github/workflows/_build-wheel-release-upload.yml@v0 + uses: scikit-package/release-scripts/.github/workflows/_build-wheel-release-upload.yml@v0 with: project: diffpy.utils - github_admin_username: sbillinge - + c_extension: false + maintainer_GITHUB_username: sbillinge secrets: PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} PAT_TOKEN: ${{ secrets.PAT_TOKEN }} diff --git a/.github/workflows/check-news-item.yml b/.github/workflows/check-news-item.yml index aa040f09..9e0f9f16 100644 --- a/.github/workflows/check-news-item.yml +++ b/.github/workflows/check-news-item.yml @@ -7,6 +7,6 @@ on: jobs: check-news-item: - uses: Billingegroup/release-scripts/.github/workflows/_check-news-item.yml@v0 + uses: scikit-package/release-scripts/.github/workflows/_check-news-item.yml@v0 with: project: diffpy.utils diff --git a/.github/workflows/matrix-and-codecov-on-merge-to-main.yml b/.github/workflows/matrix-and-codecov-on-merge-to-main.yml index 8543c786..a6a0d7cf 100644 --- a/.github/workflows/matrix-and-codecov-on-merge-to-main.yml +++ b/.github/workflows/matrix-and-codecov-on-merge-to-main.yml @@ -12,7 +12,7 @@ on: jobs: matrix-coverage: - uses: Billingegroup/release-scripts/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml@v0 + uses: scikit-package/release-scripts/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml@v0 with: project: diffpy.utils c_extension: false diff --git a/.github/workflows/publish-docs-on-release.yml b/.github/workflows/publish-docs-on-release.yml index e222ac53..a2dd338c 100644 --- a/.github/workflows/publish-docs-on-release.yml +++ b/.github/workflows/publish-docs-on-release.yml @@ -1,15 +1,11 @@ name: Deploy Documentation on Release on: - release: - types: [published, prereleased] workflow_dispatch: jobs: docs: - permissions: - contents: write - uses: Billingegroup/release-scripts/.github/workflows/_publish-docs-on-release.yml@v0 + uses: scikit-package/release-scripts/.github/workflows/_publish-docs-on-release.yml@v0 with: project: diffpy.utils c_extension: false diff --git a/.github/workflows/tests-on-pr.yml b/.github/workflows/tests-on-pr.yml index baac1aeb..5e4b8fec 100644 --- a/.github/workflows/tests-on-pr.yml +++ b/.github/workflows/tests-on-pr.yml @@ -1,15 +1,12 @@ name: Tests on PR on: - push: - branches: - - main pull_request: workflow_dispatch: jobs: tests-on-pr: - uses: Billingegroup/release-scripts/.github/workflows/_tests-on-pr.yml@v0 + uses: scikit-package/release-scripts/.github/workflows/_tests-on-pr.yml@v0 with: project: diffpy.utils c_extension: false From 6cb227380e87859b7f5df7059600c08a5bcf790a Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Tue, 10 Jun 2025 17:13:37 -0400 Subject: [PATCH 2/5] skpkg: gitignore file from skpkg --- .gitignore | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index a25212ea..099e2948 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ __pycache__/ .Python env/ build/ +_build/ develop-eggs/ dist/ downloads/ @@ -90,10 +91,3 @@ target/ # Ipython Notebook .ipynb_checkpoints - -# version information -setup.cfg -/src/diffpy/*/version.cfg - -# Rever -rever/ From f70eaa0ada15b4fa610571177b19be627fcf87e2 Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Tue, 10 Jun 2025 17:16:56 -0400 Subject: [PATCH 3/5] skpkg: small modifications to files in src --- src/diffpy/utils/__init__.py | 6 ++++-- src/diffpy/utils/version.py | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/diffpy/utils/__init__.py b/src/diffpy/utils/__init__.py index 12f4a49d..9b9f7a69 100644 --- a/src/diffpy/utils/__init__.py +++ b/src/diffpy/utils/__init__.py @@ -1,10 +1,10 @@ #!/usr/bin/env python ############################################################################## # -# (c) 2024 The Trustees of Columbia University in the City of New York. +# (c) 2025 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: Simon Billinge, Billinge Group members. # # See GitHub contributions for a more detailed list of contributors. # https://github.com/diffpy/diffpy.utils/graphs/contributors @@ -19,3 +19,5 @@ # silence the pyflakes syntax checker assert __version__ or True + +# End of file \ No newline at end of file diff --git a/src/diffpy/utils/version.py b/src/diffpy/utils/version.py index e74c47bd..07d612a3 100644 --- a/src/diffpy/utils/version.py +++ b/src/diffpy/utils/version.py @@ -1,10 +1,10 @@ #!/usr/bin/env python ############################################################################## # -# (c) 2024 The Trustees of Columbia University in the City of New York. +# (c) 2025 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: Simon Billinge, Billinge Group members. # # See GitHub contributions for a more detailed list of contributors. # https://github.com/diffpy/diffpy.utils/graphs/contributors @@ -21,3 +21,5 @@ from importlib.metadata import version __version__ = version("diffpy.utils") + +# End of file \ No newline at end of file From 629141bdd6c9b5e9400d77861ed3a5376fbd9eb2 Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Tue, 10 Jun 2025 17:20:43 -0400 Subject: [PATCH 4/5] precommit: end of file fixer --- src/diffpy/utils/__init__.py | 2 +- src/diffpy/utils/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/diffpy/utils/__init__.py b/src/diffpy/utils/__init__.py index 9b9f7a69..c8aad4a1 100644 --- a/src/diffpy/utils/__init__.py +++ b/src/diffpy/utils/__init__.py @@ -20,4 +20,4 @@ # silence the pyflakes syntax checker assert __version__ or True -# End of file \ No newline at end of file +# End of file diff --git a/src/diffpy/utils/version.py b/src/diffpy/utils/version.py index 07d612a3..a17ccb5c 100644 --- a/src/diffpy/utils/version.py +++ b/src/diffpy/utils/version.py @@ -22,4 +22,4 @@ __version__ = version("diffpy.utils") -# End of file \ No newline at end of file +# End of file From 21c9220b90a1beb194b34c1b7d91ab646795238b Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Tue, 10 Jun 2025 17:24:04 -0400 Subject: [PATCH 5/5] chore: news and pre-commit file --- .pre-commit-config.yaml | 5 ++--- news/setup-CI.rst | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 news/setup-CI.rst diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6dca6f1e..0e4a84d1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -44,21 +44,20 @@ repos: name: Prevent Commit to Main Branch args: ["--branch", "main"] stages: [pre-commit] - # codespell - spell checker for source code - repo: https://github.com/codespell-project/codespell rev: v2.3.0 hooks: - id: codespell additional_dependencies: - tomli - # prettier - multi formatter for json, yaml, md + # prettier - multi formatter for .json, .yml, and .md files - repo: https://github.com/pre-commit/mirrors-prettier rev: f12edd9c7be1c20cfa42420fd0e6df71e42b51ea # frozen: v4.0.0-alpha.8 hooks: - id: prettier additional_dependencies: - "prettier@^3.2.4" - # docformatter - formats docstrings using PEP 257 + # docformatter - PEP 257 compliant docstring formatter - repo: https://github.com/s-weigand/docformatter rev: 5757c5190d95e5449f102ace83df92e7d3b06c6c hooks: diff --git a/news/setup-CI.rst b/news/setup-CI.rst new file mode 100644 index 00000000..bf692d68 --- /dev/null +++ b/news/setup-CI.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* Update github CI to scikit-package standard + +**Security:** + +*