Skip to content

skpkg: add configuration files for pre-commit, readthedocs, codecov. #282

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 2 commits into from
Jun 10, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# As of now, flake8 does not natively support configuration via pyproject.toml
# https://github.com/microsoft/vscode-flake8/issues/135
[flake8]
exclude =
.git,
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.pdfgui
c_extension: false
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.pdfgui
67 changes: 8 additions & 59 deletions .github/workflows/matrix-and-codecov-on-merge-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,62 +11,11 @@ on:
workflow_dispatch:

jobs:
coverage:
defaults:
run:
shell: bash -l {0}

runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
python-version: ["3.11", "3.12", "3.13"]
env:
LATEST_PYTHON_VERSION: "3.13"
steps:
- name: Check out diffpy.pdfgui
uses: actions/checkout@v4

- name: Initialize miniconda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
miniforge-version: latest
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

- name: Install diffpy.pdfgui and requirements
run: |
conda install --file requirements/test.txt
conda install wxpython diffpy.utils matplotlib-base
pip install diffpy.pdffit2==1.5.0rc1
python -m pip install . --no-deps

- name: Start Xvfb for ubuntu-latest only
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install -y xvfb
export DISPLAY=:99
Xvfb :99 -screen 0 1024x768x16 &

- name: Validate diffpy.pdfgui
run: |
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
export DISPLAY=:99
fi
pytest --cov
coverage report -m
codecov

- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.python-version == env.LATEST_PYTHON_VERSION
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
matrix-coverage:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Save the deleted content temporarily.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Try to see if the green one passes the tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And we can also check scikit-package/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.pdfgui
c_extension: false
headless: true
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
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 @@ -7,7 +7,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.pdfgui
c_extension: false
Expand Down
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
Loading