Skip to content

Commit 724018c

Browse files
authored
Merge pull request #58 from cadenmyers13/skpkg-migration
skpkg: final skpkg migration of files
2 parents 4f3d0df + e4a2700 commit 724018c

21 files changed

+124
-48
lines changed

.codespell/ignore_words.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
;; abbreviation for "materials" often used in a journal title
55
mater
66

7-
;; alternative use of socioeconomic
8-
socio-economic
9-
107
;; Frobenius norm used in np.linalg.norm
118
fro
129

.github/ISSUE_TEMPLATE/release_checklist.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,30 @@ assignees: ""
1313
- [ ] License information is verified as correct. If you are unsure, please comment below.
1414
- [ ] Locally rendered documentation contains all appropriate pages, including API references (check no modules are
1515
missing), tutorials, and other human-written text is up-to-date with any changes in the code.
16-
- [ ] Installation instructions in the README, documentation, and the website (e.g., diffpy.org) are updated.
16+
- [ ] Installation instructions in the README, documentation, and the website are updated.
1717
- [ ] Successfully run any tutorial examples or do functional testing with the latest Python version.
1818
- [ ] Grammar and writing quality are checked (no typos).
1919
- [ ] 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.
2020

21-
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:
21+
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:
2222

2323
### PyPI/GitHub full-release preparation checklist:
2424

2525
- [ ] Create a new conda environment and install the rc from PyPI (`pip install <package-name>==??`)
2626
- [ ] License information on PyPI is correct.
27-
- [ ] Docs are deployed successfully to `https://www.diffpy.org/<package-name>`.
27+
- [ ] Docs are deployed successfully to `https://<github-username-or-orgname>/<package-name>`.
2828
- [ ] Successfully run all tests, tutorial examples or do functional testing.
2929

30-
Please let @sbillinge know that all checks are done and the package is ready for full release.
30+
Please let the maintainer know that all checks are done and the package is ready for full release.
3131

3232
### conda-forge release preparation checklist:
3333

34-
<!-- After @sbillinge releases the PyPI package, please check the following when creating a PR for conda-forge release.-->
34+
<!-- After the maintainer releases the PyPI package, please check the following when creating a PR for conda-forge release.-->
3535

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

4141
### Post-release checklist
4242

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### What problem does this PR address?
2+
3+
<!-- Provide a brief overview and link to the issue. Attach outputs, including screenshots (before/after), if helpful for the reviewer. -->
4+
5+
### What should the reviewer(s) do?
6+
7+
<!-- Merge the code, provide feedback, initiate a discussion, etc. -->
8+
9+
<!--
10+
Use the following checklist items when applicable (select only what applies):
11+
- [ ] This PR introduces a public-facing change (e.g., figures, CLI input/output, API).
12+
- [ ] Documentation (e.g., tutorials, examples, README) has been updated.
13+
- [ ] A tracking issue or plan to update documentation exists.
14+
- [ ] This PR affects internal functionality only (no user-facing change).
15+
-->

.github/workflows/build-wheel-release-upload.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ on:
88

99
jobs:
1010
release:
11-
uses: Billingegroup/release-scripts/.github/workflows/_build-wheel-release-upload.yml@v0
11+
uses: scikit-package/release-scripts/.github/workflows/_build-wheel-release-upload.yml@v0
1212
with:
1313
project: diffpy.srreal
1414
c_extension: true
15-
github_admin_username: sbillinge
15+
maintainer_GITHUB_username: sbillinge
1616
secrets:
1717
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
1818
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}

.github/workflows/check-news-item.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ on:
77

88
jobs:
99
check-news-item:
10-
uses: Billingegroup/release-scripts/.github/workflows/_check-news-item.yml@v0
10+
uses: scikit-package/release-scripts/.github/workflows/_check-news-item.yml@v0
1111
with:
1212
project: diffpy.srreal

.github/workflows/matrix-and-codecov-on-merge-to-main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212

1313
jobs:
1414
matrix-coverage:
15-
uses: Billingegroup/release-scripts/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml@v0
15+
uses: scikit-package/release-scripts/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml@v0
1616
with:
1717
project: diffpy.srreal
1818
c_extension: true

.github/workflows/publish-docs-on-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
jobs:
77
docs:
8-
uses: Billingegroup/release-scripts/.github/workflows/_publish-docs-on-release.yml@v0
8+
uses: scikit-package/release-scripts/.github/workflows/_publish-docs-on-release.yml@v0
99
with:
1010
project: diffpy.srreal
1111
c_extension: true

.github/workflows/tests-on-pr.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,25 @@ jobs:
2828
- name: Initialize miniconda
2929
uses: conda-incubator/setup-miniconda@v3
3030
with:
31-
activate-environment: test
3231
auto-update-conda: true
33-
environment-file: environment.yml
3432
auto-activate-base: false
3533
python-version: ${{ matrix.python-version }}
36-
3734
- name: Conda config
38-
run: >-
39-
conda config --set always_yes yes
40-
--set changeps1 no
41-
35+
run: |
36+
conda config --add channels conda-forge
4237
- name: Install diffpy.srreal and requirements
4338
run: |
44-
conda install --file requirements/conda.txt
45-
conda install --file requirements/test.txt
39+
conda create -n test python=${{ matrix.python-version }} -y
40+
source $(conda info --base)/etc/profile.d/conda.sh
41+
conda activate test
42+
conda install pip -y
43+
conda config --set always_yes yes --set changeps1 no
44+
conda install --file requirements/conda.txt -y
45+
conda install --file requirements/test.txt -y
4646
python -m pip install . --no-deps
4747
4848
- name: Validate diffpy.pdfgui
49-
run: pytest tests
49+
run: |
50+
source $(conda info --base)/etc/profile.d/conda.sh
51+
conda activate test
52+
pytest tests

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ __pycache__/
1010
.Python
1111
env/
1212
build/
13+
_build/
1314
develop-eggs/
1415
dist/
1516
downloads/

.prettierignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.readthedocs.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
3+
build:
4+
os: "ubuntu-22.04"
5+
tools:
6+
python: "latest"
7+
8+
python:
9+
install:
10+
- requirements: requirements/docs.txt
11+
12+
sphinx:
13+
configuration: doc/source/conf.py

CHANGELOG.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
=============
2-
Release Notes
2+
Release notes
33
=============
44

55
.. current developments

CODE_OF_CONDUCT.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Our Pledge
88
We as members, contributors, and leaders pledge to make participation in our
99
community a harassment-free experience for everyone, regardless of age, body
1010
size, visible or invisible disability, ethnicity, sex characteristics, gender
11-
identity and expression, level of experience, education, socio-economic status,
11+
identity and expression, level of experience, education, socioeconomic status,
1212
nationality, personal appearance, race, caste, color, religion, or sexual
1313
identity and orientation.
1414

README.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
:target: https://diffpy.github.io/diffpy.srreal
99
:height: 100px
1010

11-
|PyPi| |Forge| |PythonVersion| |PR|
11+
|PyPI| |Forge| |PythonVersion| |PR|
1212

1313
|CI| |Codecov| |Black| |Tracking|
1414

@@ -26,7 +26,7 @@
2626

2727
.. |PR| image:: https://img.shields.io/badge/PR-Welcome-29ab47ff
2828

29-
.. |PyPi| image:: https://img.shields.io/pypi/v/diffpy.srreal
29+
.. |PyPI| image:: https://img.shields.io/pypi/v/diffpy.srreal
3030
:target: https://pypi.org/project/diffpy.srreal/
3131

3232
.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/diffpy.srreal
@@ -149,4 +149,9 @@ Before contributing, please read our `Code of Conduct <https://github.com/diffpy
149149
Contact
150150
-------
151151

152-
For more information on diffpy.srreal please visit the project `web-page <https://diffpy.github.io/>`_ or email Prof. Simon Billinge at sb2896@columbia.edu.
152+
For more information on diffpy.srreal please visit the project `web-page <https://diffpy.github.io/>`_ or email Simon Billinge at sb2896@columbia.edu.
153+
154+
Acknowledgements
155+
----------------
156+
157+
``diffpy.srreal`` is built and maintained with `scikit-package <https://scikit-package.github.io/scikit-package/>`_.

doc/source/conf.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@
1818
from importlib.metadata import version
1919
from pathlib import Path
2020

21+
# Attempt to import the version dynamically from GitHub tag.
22+
try:
23+
fullversion = version("diffpy.srreal")
24+
except Exception:
25+
fullversion = "No version found. The correct version will appear in the released version." # noqa: E501
26+
2127
# If extensions (or modules to document with autodoc) are in another directory,
2228
# add these directories to sys.path here. If the directory is relative to the
2329
# documentation root, use Path().resolve() to make it absolute, like shown here.
@@ -43,6 +49,7 @@
4349
"sphinx.ext.viewcode",
4450
"sphinx.ext.intersphinx",
4551
"sphinx_rtd_theme",
52+
"sphinx_copybutton",
4653
"m2r",
4754
]
4855

@@ -68,7 +75,6 @@
6875
# |version| and |release|, also used in various other places throughout the
6976
# built documents.
7077

71-
fullversion = version(project)
7278
# The short X.Y version.
7379
version = "".join(fullversion.split(".post")[:1])
7480
# The full version, including alpha/beta/rc tags.
@@ -88,6 +94,11 @@
8894
# substitute YEAR in the copyright string
8995
copyright = copyright.replace("%Y", year)
9096

97+
# For sphinx_copybutton extension.
98+
# Do not copy "$" for shell commands in code-blocks.
99+
copybutton_prompt_text = r"^\$ "
100+
copybutton_prompt_is_regexp = True
101+
91102
# List of patterns, relative to source directory, that match files and
92103
# directories to ignore when looking for source files.
93104
exclude_patterns = ["build"]
@@ -123,6 +134,14 @@
123134
#
124135
html_theme = "sphinx_rtd_theme"
125136

137+
html_context = {
138+
"display_github": True,
139+
"github_user": "diffpy",
140+
"github_repo": "diffpy.srreal",
141+
"github_version": "main",
142+
"conf_py_path": "/doc/source/",
143+
}
144+
126145
# Theme options are theme-specific and customize the look and feel of a theme
127146
# further. For a list of options available for each theme, see the
128147
# documentation.

doc/source/index.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
.. |title| replace:: diffpy.srreal documentation
66

7-
diffpy.srreal - Calculators for PDF, bond valence sum, and other quantities based on atom pair interaction.
7+
``diffpy.srreal`` - Calculators for PDF, bond valence sum, and other quantities based on atom pair interaction.
88

9-
| Software version |release|.
9+
| Software version |release|
1010
| Last updated |today|.
1111
1212
The diffpy.srreal package provides calculators for atomic pair distribution
@@ -66,6 +66,12 @@ Installation
6666
See the `README <https://github.com/diffpy/diffpy.srreal#installation>`_
6767
file included with the distribution.
6868

69+
================
70+
Acknowledgements
71+
================
72+
73+
``diffpy.srreal`` is built and maintained with `scikit-package <https://scikit-package.github.io/scikit-package/>`_.
74+
6975
=================
7076
Table of contents
7177
=================

doc/source/license.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Copyright (c) 2008-2012, The Trustees of Columbia University in the City of New
2222

2323
Copyright (c) 2014-2019, Brookhaven Science Associates, Brookhaven National Laboratory
2424

25-
Copyright (c) 2024, The Trustees of Columbia University in the City of New York.
25+
Copyright (c) 2025, The Trustees of Columbia University in the City of New York.
2626
All rights reserved.
2727

2828
The "DiffPy-CMI" is distributed subject to the following license conditions:

environment.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

news/skpkg-migration.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**Added:**
2+
3+
* <news item>
4+
5+
**Changed:**
6+
7+
* <news item>
8+
9+
**Deprecated:**
10+
11+
* <news item>
12+
13+
**Removed:**
14+
15+
* <news item>
16+
17+
**Fixed:**
18+
19+
* Support ``scikit-package`` Level 5 standard (https://scikit-package.github.io/scikit-package/).
20+
21+
**Security:**
22+
23+
* <news item>

pyproject.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ build-backend = "setuptools.build_meta"
66
name = "diffpy.srreal"
77
dynamic=['version', 'dependencies']
88
authors = [
9-
{ name="Simon J.L. Billinge group", email="simon.billinge@gmail.com" },
9+
{ name="Simon Billinge", email="sb2896@columbia.edu" },
1010
]
1111
maintainers = [
12-
{ name="Simon J.L. Billinge group", email="simon.billinge@gmail.com" },
12+
{ name="Simon Billinge", email="sb2896@columbia.edu" },
1313
]
1414
description = "Calculators for PDF, bond valence sum, and other quantities based on atom pair interaction."
1515
keywords = ['PDF', 'BVS', 'atom', 'overlap', 'calculator', 'real-space']
@@ -56,6 +56,11 @@ exclude-file = ".codespell/ignore_lines.txt"
5656
ignore-words = ".codespell/ignore_words.txt"
5757
skip = "*.cif,*.dat"
5858

59+
[tool.docformatter]
60+
recursive = true
61+
wrap-summaries = 72
62+
wrap-descriptions = 72
63+
5964
[tool.black]
6065
line-length = 79
6166
include = '\.pyi?$'
@@ -78,8 +83,3 @@ exclude = '''
7883
| tests/data
7984
)/
8085
'''
81-
82-
[tool.docformatter]
83-
recursive = true
84-
wrap-summaries = 72
85-
wrap-descriptions = 72

requirements/docs.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
sphinx
22
sphinx_rtd_theme
3+
sphinx-copybutton
34
doctr
45
m2r

0 commit comments

Comments
 (0)