Skip to content

skpkg: pdffit2 up to scikit-package 0.1.0 standards #140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Jun 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
eabf170
skpkg: fix misspelled words
cadenmyers13 Jun 11, 2025
43a80f5
skpkg: update to ignore words
cadenmyers13 Jun 11, 2025
51263ea
skpkg: fix socioeconomic spelling
cadenmyers13 Jun 11, 2025
2346bbf
skpkg: misspelling of word recipes
cadenmyers13 Jun 11, 2025
a9c5498
skpkg: change lengths to length
cadenmyers13 Jun 11, 2025
504c711
skpkg: remove environment.yml
cadenmyers13 Jun 11, 2025
25fe3cc
chore: news
cadenmyers13 Jun 11, 2025
d47b719
Merge pull request #135 from cadenmyers13/pre-commit-codespell
sbillinge Jun 11, 2025
d81642c
skpkg: add necessary dependencies to requirements
cadenmyers13 Jun 12, 2025
9bf31f2
skpkg: gh workflows updated by skpkg
cadenmyers13 Jun 12, 2025
4e85186
skpkg: setup.py and pyproject.toml files
cadenmyers13 Jun 12, 2025
4197455
skpkg: update copyrights in init files
cadenmyers13 Jun 12, 2025
b87f9af
skpkg: linelength fixes and some copyright updates
cadenmyers13 Jun 12, 2025
e129280
skpkg: remove noqa
cadenmyers13 Jun 12, 2025
74add76
chore: news
cadenmyers13 Jun 12, 2025
8bab2cf
Merge pull request #136 from cadenmyers13/setup-CI
sbillinge Jun 12, 2025
11fb165
skpkg: gitignore update
cadenmyers13 Jun 12, 2025
106ffb7
remove numpy from dependencies
cadenmyers13 Jun 12, 2025
ae4906e
Merge pull request #138 from cadenmyers13/rm-numpy
sbillinge Jun 12, 2025
c6d13b0
skpkg: small changes to rst file formating in docs, changelog, and re…
cadenmyers13 Jun 13, 2025
1aef091
skpkg: change copyright to 2025 in LICENSE.rst
cadenmyers13 Jun 13, 2025
a921646
docs: autodoc mock imports for doc rendering
cadenmyers13 Jun 13, 2025
4f5d7a7
skpkg: update copyright to 2025 in license.rst
cadenmyers13 Jun 13, 2025
edc5bd0
Merge pull request #139 from cadenmyers13/rst-migration
sbillinge Jun 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions .codespell/ignore_words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,24 @@
;; abbreviation for "materials" often used in a journal title
mater

;; alternative use of socioeconomic
socio-economic

;; Frobenius norm used in np.linalg.norm
fro

;; class name within distutils module
ccompiler

;; dum as a C variable
dum

;; gaus used for gaussian
gaus

;; structure file format
discus
DISCUS

;; Periodic table elements
Te
Nd

;; Ois
Ois
14 changes: 7 additions & 7 deletions .github/ISSUE_TEMPLATE/release_checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <package-name>==??`)
- [ ] License information on PyPI is correct.
- [ ] Docs are deployed successfully to `https://www.diffpy.org/<package-name>`.
- [ ] Docs are deployed successfully to `https://<github-username-or-orgname>/<package-name>`.
- [ ] 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:

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

- [ ] 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

Expand Down
15 changes: 15 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
### What problem does this PR address?

<!-- Provide a brief overview and link to the issue. Attach outputs, including screenshots (before/after), if helpful for the reviewer. -->

### What should the reviewer(s) do?

<!-- Merge the code, provide feedback, initiate a discussion, etc. -->

<!--
Use the following checklist items when applicable (select only what applies):
- [ ] This PR introduces a public-facing change (e.g., figures, CLI input/output, API).
- [ ] Documentation (e.g., tutorials, examples, README) has been updated.
- [ ] A tracking issue or plan to update documentation exists.
- [ ] This PR affects internal functionality only (no user-facing change).
-->
5 changes: 2 additions & 3 deletions .github/workflows/build-wheel-release-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +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.pdffit2
c_extension: true
github_admin_username: sbillinge

maintainer_GITHUB_username: sbillinge
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/check-news-item.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.pdffit2
3 changes: 1 addition & 2 deletions .github/workflows/matrix-and-codecov-on-merge-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ 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.pdffit2
python_versions: "3.11, 3.12, 3.13"
c_extension: true
headless: false
secrets:
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/publish-docs-on-release.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
name: Deploy Documentation on Release

on:
release:
types: [published]
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.pdffit2
c_extension: true
headless: false
python_version: 3.13
10 changes: 3 additions & 7 deletions .github/workflows/tests-on-pr.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
name: Tests on PR

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
validate:
uses: Billingegroup/release-scripts/.github/workflows/_tests-on-pr.yml@v0
tests-on-pr:
uses: scikit-package/release-scripts/.github/workflows/_tests-on-pr.yml@v0
with:
project: diffpy.pdffi2
project: diffpy.pdffit2
c_extension: true
headless: false
python_version: 3.13
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
8 changes: 1 addition & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ __pycache__/
.Python
env/
build/
_build/
develop-eggs/
dist/
downloads/
Expand Down Expand Up @@ -90,10 +91,3 @@ target/

# Ipython Notebook
.ipynb_checkpoints

# version information
setup.cfg
/src/diffpy/*/version.cfg

# Rever
rever/
13 changes: 13 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2

build:
os: "ubuntu-22.04"
tools:
python: "latest"

python:
install:
- requirements: requirements/docs.txt

sphinx:
configuration: doc/source/conf.py
4 changes: 2 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
=============
Release Notes
Release notes
=============

.. current developments
Expand Down Expand Up @@ -65,7 +65,7 @@ Release Notes
* No notable functional changes from 1.4.1

1.4.4rc0
=====
========

**Fixed:**

Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
identity and expression, level of experience, education, socioeconomic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

Expand Down
2 changes: 1 addition & 1 deletion LICENSE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ the following paper in your publication:
in crystals (https://stacks.iop.org/0953-8984/19/335219), *J. Phys.: Condens. Matter*, 19, 335219 (2007)

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

For more information please visit the project web-page:
Expand Down
42 changes: 20 additions & 22 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
:target: https://diffpy.github.io/diffpy.pdffit2
:height: 100px

|PyPi| |Forge| |PythonVersion| |PR|
|PyPI| |Forge| |PythonVersion| |PR|

|CI| |Codecov| |Black| |Tracking|

Expand All @@ -26,7 +26,7 @@

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

.. |PyPi| image:: https://img.shields.io/pypi/v/diffpy.pdffit2
.. |PyPI| image:: https://img.shields.io/pypi/v/diffpy.pdffit2
:target: https://pypi.org/project/diffpy.pdffit2/

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

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

conda config --add channels conda-forge

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

conda create -n diffpy.pdffit2_env diffpy.pdffit2

Activate the environment: ::

conda activate diffpy.pdffit2_env

Confirm that the installation was successful: ::
To confirm that the installation was successful, type ::

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

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

pip install diffpy.pdffit2

Confirm that the installation was successful: ::
To confirm that the installation was successful, type ::

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

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

For advanced users, obtain the source archive, and in the ``diffpy.pdffit2`` directory, run ::
pip install .

conda create -n diffpy.pdffit2_env python=3.13 \
--file requirements/test.txt \
--file requirements/conda.txt \
--file requirements/build.txt
Getting Started
---------------

Activate the environment, build the package, and run unit tests by following commands sequentially: ::

conda activate diffpy.pdffit2_env
pip install . --no-deps
pytest
You may consult our `online documentation <https://diffpy.github.io/diffpy.pdffit2>`_ for tutorials and API references.

Support and Contribute
----------------------
Expand Down Expand Up @@ -182,4 +175,9 @@ Before contributing, please read our `Code of Conduct <https://github.com/diffpy
Contact
-------

For more information on diffpy.pdffit2 please visit the project `web-page <https://diffpy.github.io/>`_ or email Prof. Simon Billinge at [email protected].
For more information on diffpy.pdffit2 please visit the project `web-page <https://diffpy.github.io/>`_ or email Simon Billinge at [email protected].

Acknowledgements
----------------

``diffpy.pdffit2`` is built and maintained with `scikit-package <https://scikit-package.github.io/scikit-package/>`_.
6 changes: 4 additions & 2 deletions doc/source/api/diffpy.pdffit2.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
:tocdepth: -1

diffpy.pdffit2 package
======================
|title|
=======

.. |title| replace:: diffpy.pdffit2 package

.. automodule:: diffpy.pdffit2
:members:
Expand Down
Loading
Loading