Skip to content

Commit 988f1f1

Browse files
authored
Merge pull request #346 from diffpy/migration
skpkg: merge `migration` branch into `main`
2 parents a51b553 + 86e59be commit 988f1f1

25 files changed

+167
-54
lines changed

.codespell/ignore_words.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,5 @@
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

.flake8

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# As of now, flake8 does not natively support configuration via pyproject.toml
2+
# https://github.com/microsoft/vscode-flake8/issues/135
13
[flake8]
24
exclude =
35
.git,

.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: 3 additions & 3 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.utils
14-
github_admin_username: sbillinge
15-
14+
c_extension: false
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.utils

.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.utils
1818
c_extension: false

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
name: Deploy Documentation on Release
22

33
on:
4-
release:
5-
types: [published, prereleased]
64
workflow_dispatch:
75

86
jobs:
97
docs:
10-
permissions:
11-
contents: write
12-
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
139
with:
1410
project: diffpy.utils
1511
c_extension: false

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
name: Tests on PR
22

33
on:
4-
push:
5-
branches:
6-
- main
74
pull_request:
85
workflow_dispatch:
96

107
jobs:
118
tests-on-pr:
12-
uses: Billingegroup/release-scripts/.github/workflows/_tests-on-pr.yml@v0
9+
uses: scikit-package/release-scripts/.github/workflows/_tests-on-pr.yml@v0
1310
with:
1411
project: diffpy.utils
1512
c_extension: false

.gitignore

Lines changed: 1 addition & 7 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/
@@ -90,10 +91,3 @@ target/
9091

9192
# Ipython Notebook
9293
.ipynb_checkpoints
93-
94-
# version information
95-
setup.cfg
96-
/src/diffpy/*/version.cfg
97-
98-
# Rever
99-
rever/

.isort.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[settings]
2+
# Keep import statement below line_length character limit
23
line_length = 79
34
multi_line_output = 3
45
include_trailing_comma = True

.pre-commit-config.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,20 @@ repos:
4444
name: Prevent Commit to Main Branch
4545
args: ["--branch", "main"]
4646
stages: [pre-commit]
47-
# codespell - spell checker for source code
4847
- repo: https://github.com/codespell-project/codespell
4948
rev: v2.3.0
5049
hooks:
5150
- id: codespell
5251
additional_dependencies:
5352
- tomli
54-
# prettier - multi formatter for json, yaml, md
53+
# prettier - multi formatter for .json, .yml, and .md files
5554
- repo: https://github.com/pre-commit/mirrors-prettier
5655
rev: f12edd9c7be1c20cfa42420fd0e6df71e42b51ea # frozen: v4.0.0-alpha.8
5756
hooks:
5857
- id: prettier
5958
additional_dependencies:
6059
- "prettier@^3.2.4"
61-
# docformatter - formats docstrings using PEP 257
60+
# docformatter - PEP 257 compliant docstring formatter
6261
- repo: https://github.com/s-weigand/docformatter
6362
rev: 5757c5190d95e5449f102ace83df92e7d3b06c6c
6463
hooks:

.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.utils
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.utils
29+
.. |PyPI| image:: https://img.shields.io/pypi/v/diffpy.utils
3030
:target: https://pypi.org/project/diffpy.utils/
3131

3232
.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/diffpy.utils
@@ -141,4 +141,9 @@ Before contributing, please read our `Code of Conduct <https://github.com/diffpy
141141
Contact
142142
-------
143143

144-
For more information on diffpy.utils please visit the project `web-page <https://diffpy.github.io/>`_ or email Prof. Simon Billinge at [email protected].
144+
For more information on diffpy.utils please visit the project `web-page <https://diffpy.github.io/>`_ or email Simon Billinge at [email protected].
145+
146+
Acknowledgements
147+
----------------
148+
149+
``diffpy.utils`` is built and maintained with `scikit-package <https://scikit-package.github.io/scikit-package/>`_.

doc/source/conf.py

Lines changed: 27 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.utils")
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

@@ -88,6 +95,11 @@
8895
# substitute YEAR in the copyright string
8996
copyright = copyright.replace("%Y", year)
9097

98+
# For sphinx_copybutton extension.
99+
# Do not copy "$" for shell commands in code-blocks.
100+
copybutton_prompt_text = r"^\$ "
101+
copybutton_prompt_is_regexp = True
102+
91103
# List of patterns, relative to source directory, that match files and
92104
# directories to ignore when looking for source files.
93105
exclude_patterns = ["build"]
@@ -123,6 +135,14 @@
123135
#
124136
html_theme = "sphinx_rtd_theme"
125137

138+
html_context = {
139+
"display_github": True,
140+
"github_user": "diffpy",
141+
"github_repo": "diffpy.utils",
142+
"github_version": "main",
143+
"conf_py_path": "/doc/source/",
144+
}
145+
126146
# Theme options are theme-specific and customize the look and feel of a theme
127147
# further. For a list of options available for each theme, see the
128148
# documentation.
@@ -256,7 +276,13 @@
256276
# One entry per manual page. List of tuples
257277
# (source start file, name, description, authors, manual section).
258278
man_pages = [
259-
("index", "diffpy.utils", "diffpy.utils Documentation", ab_authors, 1)
279+
(
280+
"index",
281+
"diffpy.utils",
282+
"diffpy.utils Documentation",
283+
ab_authors,
284+
1,
285+
)
260286
]
261287

262288
# If true, show URL addresses after external links.

environment.yml

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

news/doc-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>

news/news-and-misc.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**Added:**
2+
3+
* No news item needed, bringing package up to ``scikit-package 5v0.1.0`` standards.
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+
* <news item>
20+
21+
**Security:**
22+
23+
* <news item>

news/setup-CI.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+
* Update github CI to scikit-package standard
20+
21+
**Security:**
22+
23+
* <news item>

0 commit comments

Comments
 (0)