Skip to content

skpkg: final skpkg migration of files #58

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 15 commits into from
Jun 26, 2025
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
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
3 changes: 0 additions & 3 deletions .codespell/ignore_words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
;; abbreviation for "materials" often used in a journal title
mater

;; alternative use of socioeconomic
socio-economic

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

Expand Down
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).
-->
4 changes: 2 additions & 2 deletions .github/workflows/build-wheel-release-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.srreal
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.srreal
2 changes: 1 addition & 1 deletion .github/workflows/matrix-and-codecov-on-merge-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.srreal
c_extension: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-docs-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
docs:
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.srreal
c_extension: true
Expand Down
23 changes: 13 additions & 10 deletions .github/workflows/tests-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,25 @@ jobs:
- name: Initialize miniconda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
auto-update-conda: true
environment-file: environment.yml
auto-activate-base: false
python-version: ${{ matrix.python-version }}

- name: Conda config
run: >-
conda config --set always_yes yes
--set changeps1 no

run: |
conda config --add channels conda-forge
- name: Install diffpy.srreal and requirements
run: |
conda install --file requirements/conda.txt
conda install --file requirements/test.txt
conda create -n test python=${{ matrix.python-version }} -y
source $(conda info --base)/etc/profile.d/conda.sh
conda activate test
conda install pip -y
conda config --set always_yes yes --set changeps1 no
conda install --file requirements/conda.txt -y
conda install --file requirements/test.txt -y
python -m pip install . --no-deps

- name: Validate diffpy.pdfgui
run: pytest tests
run: |
source $(conda info --base)/etc/profile.d/conda.sh
conda activate test
pytest tests
1 change: 1 addition & 0 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
1 change: 0 additions & 1 deletion .prettierignore

This file was deleted.

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
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
=============
Release Notes
Release notes
=============

.. current developments
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
11 changes: 8 additions & 3 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.srreal
: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.srreal
.. |PyPI| image:: https://img.shields.io/pypi/v/diffpy.srreal
:target: https://pypi.org/project/diffpy.srreal/

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

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

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

``diffpy.srreal`` is built and maintained with `scikit-package <https://scikit-package.github.io/scikit-package/>`_.
21 changes: 20 additions & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
from importlib.metadata import version
from pathlib import Path

# Attempt to import the version dynamically from GitHub tag.
try:
fullversion = version("diffpy.srreal")
except Exception:
fullversion = "No version found. The correct version will appear in the released version." # noqa: E501

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use Path().resolve() to make it absolute, like shown here.
Expand All @@ -43,6 +49,7 @@
"sphinx.ext.viewcode",
"sphinx.ext.intersphinx",
"sphinx_rtd_theme",
"sphinx_copybutton",
"m2r",
]

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

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

# For sphinx_copybutton extension.
# Do not copy "$" for shell commands in code-blocks.
copybutton_prompt_text = r"^\$ "
copybutton_prompt_is_regexp = True

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ["build"]
Expand Down Expand Up @@ -123,6 +134,14 @@
#
html_theme = "sphinx_rtd_theme"

html_context = {
"display_github": True,
"github_user": "diffpy",
"github_repo": "diffpy.srreal",
"github_version": "main",
"conf_py_path": "/doc/source/",
}

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
Expand Down
79 changes: 79 additions & 0 deletions doc/source/getting-started.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
:tocdepth: -1

.. index:: getting-started

.. _getting-started:

================
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we may want to leave this here as a stub or remove it. If we leave it, the wording could change to something like "getting started information will appear here shortly" and make an issue to do it.

On the whole, it may be better to just delete it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sbillinge yeah we can remove it. If we want to use the format later we can just pull it from skpkg.

Getting started
================

Here are some example templates provided to help you get started with writing your documentation. You can use these templates to create your own documentation.

Reuse ``.rst`` files across multiple pages
------------------------------------------

Here is how you can reuse a reusable block of ``.rst`` files across multiple pages:

.. include:: snippets/example-table.rst

.. warning::

Ensure that the ``.rst`` file you are including is not too long. If it is too long, it may be better to split it into multiple files and include them separately.

Refer to a specific section in the documentation
------------------------------------------------

You can use the ``ref`` tag to refer to a specific section in the documentation. For example, you can refer to the section below using the ``:ref:`` tag as shown :ref:`here <attach-image>`.

.. note::

Please check the raw ``.rst`` file of this page to see the exact use of the ``:ref:`` tag.

Embed your code snippets in the documentation
---------------------------------------------

Here is how you can write a block of code in the documentation. You can use the ``code-block`` directive to write a block of code in the documentation. For example, you can write a block of code as shown below:

.. code-block:: bash

# Create a new environment, without build dependencies (pure Python package)
conda create -n <package_name>-env python=3.13 \
--file requirements/test.txt \
--file requirements/conda.txt

# Create a new environment, with build dependencies (non-pure Python package)
conda create -n <package_name>-env python=3.13 \
--file requirements/test.txt \
--file requirements/conda.txt \
--file requirements/build.txt

# Activate the environment
conda activate <package_name>_env

# Install your package locally
# `--no-deps` to NOT install packages again from `requirements.pip.txt`
pip install -e . --no-deps

# Run pytest locally
pytest

# ... run example tutorials

.. _attach-image:

Attach an image to the documentation
------------------------------------

Here is how you attach an image to the documentation. The ``/doc/source/img/scikit-package-logo-text.png`` example image is provided in the template.

.. image:: ./img/scikit-package-logo-text.png
:alt: codecov-in-pr-comment
:width: 400px
:align: center


Other useful directives
-----------------------

Here is how you can do menu selection :menuselection:`Admin --> Settings` and display labels for buttons like :guilabel:`Privacy level`.
10 changes: 8 additions & 2 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

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

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

| Software version |release|.
| Software version |release|
| Last updated |today|.

The diffpy.srreal package provides calculators for atomic pair distribution
Expand Down Expand Up @@ -66,6 +66,12 @@ Installation
See the `README <https://github.com/diffpy/diffpy.srreal#installation>`_
file included with the distribution.

================
Acknowledgements
================

``diffpy.srreal`` is built and maintained with `scikit-package <https://scikit-package.github.io/scikit-package/>`_.

=================
Table of contents
=================
Expand Down
2 changes: 1 addition & 1 deletion doc/source/license.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Copyright (c) 2008-2012, The Trustees of Columbia University in the City of New

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

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

The "DiffPy-CMI" is distributed subject to the following license conditions:
Expand Down
6 changes: 0 additions & 6 deletions environment.yml

This file was deleted.

Loading
Loading