Skip to content

Commit cd6d363

Browse files
authored
Merge pull request #140 from diffpy/migration
skpkg: pdffit2 up to scikit-package 0.1.0 standards
2 parents 94b53fc + edc5bd0 commit cd6d363

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+590
-180
lines changed

.codespell/ignore_words.txt

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,24 @@
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

1310
;; class name within distutils module
1411
ccompiler
1512

13+
;; dum as a C variable
14+
dum
15+
16+
;; gaus used for gaussian
17+
gaus
18+
1619
;; structure file format
17-
discus
20+
DISCUS
21+
22+
;; Periodic table elements
23+
Te
24+
Nd
25+
26+
;; Ois
27+
Ois

.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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +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.pdffit2
1414
c_extension: true
15-
github_admin_username: sbillinge
16-
15+
maintainer_GITHUB_username: sbillinge
1716
secrets:
1817
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
1918
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.pdffit2

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@ 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.pdffit2
18-
python_versions: "3.11, 3.12, 3.13"
1918
c_extension: true
2019
headless: false
2120
secrets:
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
name: Deploy Documentation on Release
22

33
on:
4-
release:
5-
types: [published]
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.pdffit2
1511
c_extension: true
1612
headless: false
17-
python_version: 3.13

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
name: Tests on PR
22

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

107
jobs:
11-
validate:
12-
uses: Billingegroup/release-scripts/.github/workflows/_tests-on-pr.yml@v0
8+
tests-on-pr:
9+
uses: scikit-package/release-scripts/.github/workflows/_tests-on-pr.yml@v0
1310
with:
14-
project: diffpy.pdffi2
11+
project: diffpy.pdffit2
1512
c_extension: true
1613
headless: false
17-
python_version: 3.13
1814
secrets:
1915
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.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/

.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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
=============
2-
Release Notes
2+
Release notes
33
=============
44

55
.. current developments
@@ -65,7 +65,7 @@ Release Notes
6565
* No notable functional changes from 1.4.1
6666

6767
1.4.4rc0
68-
=====
68+
========
6969

7070
**Fixed:**
7171

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

LICENSE.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ the following paper in your publication:
1313
in crystals (https://stacks.iop.org/0953-8984/19/335219), *J. Phys.: Condens. Matter*, 19, 335219 (2007)
1414

1515
Copyright 2006-2007, Board of Trustees of Michigan State University,
16-
Copyright 2008-2024, Board of Trustees of Columbia University in the
16+
Copyright 2008-2025, Board of Trustees of Columbia University in the
1717
city of New York. (Copyright holder indicated in each source file).
1818

1919
For more information please visit the project web-page:

README.rst

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
:target: https://diffpy.github.io/diffpy.pdffit2
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.pdffit2
29+
.. |PyPI| image:: https://img.shields.io/pypi/v/diffpy.pdffit2
3030
:target: https://pypi.org/project/diffpy.pdffit2/
3131

3232
.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/diffpy.pdffit2
@@ -87,19 +87,17 @@ The preferred method is to use `Miniconda Python
8787
<https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html>`_
8888
and install from the "conda-forge" channel of Conda packages.
8989

90-
Add the "conda-forge" channel by running the following command in a terminal: ::
90+
To add "conda-forge" to the conda channels, run the following in a terminal. ::
9191

9292
conda config --add channels conda-forge
9393

94-
Create a new environment named ``diffpy.pdffit2_env`` and install ``diffpy.pdffit2``: ::
94+
We want to install our packages in a suitable conda environment.
95+
The following creates and activates a new environment named ``diffpy.pdffit2_env`` ::
9596

9697
conda create -n diffpy.pdffit2_env diffpy.pdffit2
97-
98-
Activate the environment: ::
99-
10098
conda activate diffpy.pdffit2_env
10199

102-
Confirm that the installation was successful: ::
100+
To confirm that the installation was successful, type ::
103101

104102
python -c "import diffpy.pdffit2; print(diffpy.pdffit2.__version__)"
105103

@@ -118,25 +116,20 @@ Install pdffit2 using ``pip`` to download and install the latest version from `P
118116

119117
pip install diffpy.pdffit2
120118

121-
Confirm that the installation was successful: ::
119+
To confirm that the installation was successful, type ::
122120

123121
python -c "import diffpy.pdffit2; print(diffpy.pdffit2.__version__)"
124122

125-
Build from source
126-
~~~~~~~~~~~~~~~~~
123+
If you prefer to install from sources, after installing the dependencies, obtain the source archive from
124+
`GitHub <https://github.com/diffpy/diffpy.pdffit2/>`_. Once installed, ``cd`` into your ``diffpy.pdffit2`` directory
125+
and run the following ::
127126

128-
For advanced users, obtain the source archive, and in the ``diffpy.pdffit2`` directory, run ::
127+
pip install .
129128

130-
conda create -n diffpy.pdffit2_env python=3.13 \
131-
--file requirements/test.txt \
132-
--file requirements/conda.txt \
133-
--file requirements/build.txt
129+
Getting Started
130+
---------------
134131

135-
Activate the environment, build the package, and run unit tests by following commands sequentially: ::
136-
137-
conda activate diffpy.pdffit2_env
138-
pip install . --no-deps
139-
pytest
132+
You may consult our `online documentation <https://diffpy.github.io/diffpy.pdffit2>`_ for tutorials and API references.
140133

141134
Support and Contribute
142135
----------------------
@@ -182,4 +175,9 @@ Before contributing, please read our `Code of Conduct <https://github.com/diffpy
182175
Contact
183176
-------
184177

185-
For more information on diffpy.pdffit2 please visit the project `web-page <https://diffpy.github.io/>`_ or email Prof. Simon Billinge at [email protected].
178+
For more information on diffpy.pdffit2 please visit the project `web-page <https://diffpy.github.io/>`_ or email Simon Billinge at [email protected].
179+
180+
Acknowledgements
181+
----------------
182+
183+
``diffpy.pdffit2`` is built and maintained with `scikit-package <https://scikit-package.github.io/scikit-package/>`_.

doc/source/api/diffpy.pdffit2.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
:tocdepth: -1
22

3-
diffpy.pdffit2 package
4-
======================
3+
|title|
4+
=======
5+
6+
.. |title| replace:: diffpy.pdffit2 package
57

68
.. automodule:: diffpy.pdffit2
79
:members:

0 commit comments

Comments
 (0)