Skip to content

Commit 5839102

Browse files
authored
Merge pull request #282 from ycexiao/config
skpkg: add configuration files for pre-commit, readthedocs, codecov.
2 parents a4582ee + 4027429 commit 5839102

File tree

7 files changed

+42
-63
lines changed

7 files changed

+42
-63
lines changed

.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,
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 & 2 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.pdfgui
1414
c_extension: false
15-
github_admin_username: sbillinge
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.pdfgui

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

Lines changed: 8 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -11,62 +11,11 @@ on:
1111
workflow_dispatch:
1212

1313
jobs:
14-
coverage:
15-
defaults:
16-
run:
17-
shell: bash -l {0}
18-
19-
runs-on: ${{ matrix.os }}
20-
strategy:
21-
fail-fast: false
22-
matrix:
23-
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
24-
python-version: ["3.11", "3.12", "3.13"]
25-
env:
26-
LATEST_PYTHON_VERSION: "3.13"
27-
steps:
28-
- name: Check out diffpy.pdfgui
29-
uses: actions/checkout@v4
30-
31-
- name: Initialize miniconda
32-
uses: conda-incubator/setup-miniconda@v3
33-
with:
34-
activate-environment: test
35-
miniforge-version: latest
36-
environment-file: environment.yml
37-
auto-activate-base: false
38-
python-version: ${{ matrix.python-version }}
39-
40-
- name: Conda config
41-
run: >-
42-
conda config --set always_yes yes
43-
--set changeps1 no
44-
45-
- name: Install diffpy.pdfgui and requirements
46-
run: |
47-
conda install --file requirements/test.txt
48-
conda install wxpython diffpy.utils matplotlib-base
49-
pip install diffpy.pdffit2==1.5.0rc1
50-
python -m pip install . --no-deps
51-
52-
- name: Start Xvfb for ubuntu-latest only
53-
if: matrix.os == 'ubuntu-latest'
54-
run: |
55-
sudo apt-get install -y xvfb
56-
export DISPLAY=:99
57-
Xvfb :99 -screen 0 1024x768x16 &
58-
59-
- name: Validate diffpy.pdfgui
60-
run: |
61-
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
62-
export DISPLAY=:99
63-
fi
64-
pytest --cov
65-
coverage report -m
66-
codecov
67-
68-
- name: Upload coverage to Codecov
69-
if: matrix.os == 'ubuntu-latest' && matrix.python-version == env.LATEST_PYTHON_VERSION
70-
uses: codecov/codecov-action@v4
71-
env:
72-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
14+
matrix-coverage:
15+
uses: scikit-package/release-scripts/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml@v0
16+
with:
17+
project: diffpy.pdfgui
18+
c_extension: false
19+
headless: true
20+
secrets:
21+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
docs:
10-
uses: Billingegroup/release-scripts/.github/workflows/_publish-docs-on-release.yml@v0
10+
uses: scikit-package/release-scripts/.github/workflows/_publish-docs-on-release.yml@v0
1111
with:
1212
project: diffpy.pdfgui
1313
c_extension: false

.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

0 commit comments

Comments
 (0)