Skip to content

Commit 74b5fc9

Browse files
author
Adib Kabir
committed
skpkg: updated labpdfproc to latest version according to skpkg standard
1 parent b9f9b35 commit 74b5fc9

7 files changed

Lines changed: 107 additions & 58 deletions

File tree

Lines changed: 61 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,76 @@
1-
name: Build Wheel, Release on GitHub/PyPI, and Deploy Docs
1+
name: Build Wheel and Release
22

3+
# Trigger on tag push or manual dispatch.
4+
# Tag and release privilege are verified inside the reusable workflow.
35
on:
46
workflow_dispatch:
57
push:
68
tags:
7-
- "*" # Trigger on all tags initially, but tag and release privilege are verified in _build-wheel-release-upload.yml
9+
- "*"
10+
11+
# ── Release modality ──────────────────────────────────────────────────────────
12+
# Three options are provided below. Only ONE job should be active at a time.
13+
# To switch: comment out the active job and uncomment your preferred option,
14+
# then commit the change to main before tagging a release.
15+
# ─────────────────────────────────────────────────────────────────────────────
816

917
jobs:
18+
# Option 1 (default): Release to GitHub, publish to PyPI, and deploy docs.
19+
#
20+
# The wheel is uploaded to PyPI so users can install with `pip install`.
21+
# A GitHub release is created with the changelog as the release body, and
22+
# the Sphinx documentation is rebuilt and deployed to GitHub Pages.
23+
#
24+
# Choose this for open-source packages distributed via PyPI and/or
25+
# conda-forge where broad public availability is the goal.
1026
build-release:
1127
uses: scikit-package/release-scripts/.github/workflows/_build-wheel-release-upload.yml@v0
1228
with:
1329
project: diffpy.labpdfproc
1430
c_extension: false
15-
maintainer_GITHUB_username: sbillinge
31+
maintainer_github_username: sbillinge
1632
secrets:
1733
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
1834
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
35+
36+
# Option 2: Release to GitHub and deploy docs, without publishing to PyPI.
37+
#
38+
# A GitHub release is created and the Sphinx docs are deployed, but the
39+
# wheel is not uploaded to PyPI. The source code remains publicly visible
40+
# on GitHub and can be installed directly from there.
41+
#
42+
# Choose this when the package is public but you prefer to keep it off the
43+
# default pip index — for example, if you distribute via conda-forge only,
44+
# or if the package is not yet ready for a permanent PyPI presence.
45+
#
46+
# To use: comment out Option 1 above and uncomment the lines below.
47+
# build-release-no-pypi:
48+
# uses: scikit-package/release-scripts/.github/workflows/_build-release-github-no-pypi.yml@v0
49+
# with:
50+
# project: diffpy.labpdfproc
51+
# c_extension: false
52+
# maintainer_github_username: sbillinge
53+
# secrets:
54+
# PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
55+
56+
# Option 3: Release to GitHub with wheel, license, and instructions bundled
57+
# as a downloadable zip attached to the GitHub release asset.
58+
#
59+
# The wheel is built and packaged together with INSTRUCTIONS.txt and the
60+
# LICENSE file into a zip that is attached directly to the GitHub release.
61+
# Users with access to the (private) repo download the zip, follow the
62+
# instructions inside, and install locally with pip. No PyPI or conda-forge
63+
# upload occurs, and no docs are deployed.
64+
#
65+
# Choose this for private or restricted packages where distribution must be
66+
# controlled: only users with repo access can download the release asset,
67+
# making the GitHub release itself the distribution channel.
68+
#
69+
# To use: comment out Option 1 above and uncomment the lines below.
70+
# build-release-private:
71+
# uses: scikit-package/release-scripts/.github/workflows/_build-release-github-private-pure.yml@v0
72+
# with:
73+
# project: diffpy.labpdfproc
74+
# maintainer_github_username: sbillinge
75+
# secrets:
76+
# 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
@@ -3,7 +3,7 @@ name: Check for News
33
on:
44
pull_request_target:
55
branches:
6-
- main
6+
- main # GitHub does not evaluate expressions in trigger filters; edit this value if your base branch is not main
77

88
jobs:
99
check-news-item:

‎.pre-commit-config.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
default_language_version:
2-
python: python3
2+
python: python3.14
33
ci:
44
autofix_commit_msg: |
55
[pre-commit.ci] auto fixes from pre-commit hooks
@@ -52,7 +52,7 @@ repos:
5252
- tomli
5353
# prettier - multi formatter for .json, .yml, and .md files
5454
- repo: https://github.com/pre-commit/mirrors-prettier
55-
rev: f12edd9c7be1c20cfa42420fd0e6df71e42b51ea # frozen: v4.0.0-alpha.8
55+
rev: v4.0.0-alpha.8
5656
hooks:
5757
- id: prettier
5858
additional_dependencies:

‎docs/make.bat‎

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
@ECHO OFF
2-
3-
pushd %~dp0
4-
5-
REM Command file for Sphinx documentation
6-
7-
if "%SPHINXBUILD%" == "" (
8-
set SPHINXBUILD=sphinx-build
9-
)
10-
set SOURCEDIR=source
11-
set BUILDDIR=build
12-
set SPHINXPROJ=PackagingScientificPython
13-
14-
if "%1" == "" goto help
15-
16-
%SPHINXBUILD% >NUL 2>NUL
17-
if errorlevel 9009 (
18-
echo.
19-
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
20-
echo.installed, then set the SPHINXBUILD environment variable to point
21-
echo.to the full path of the 'sphinx-build' executable. Alternatively you
22-
echo.may add the Sphinx directory to PATH.
23-
echo.
24-
echo.If you don't have Sphinx installed, grab it from
25-
echo.http://sphinx-doc.org/
26-
exit /b 1
27-
)
28-
29-
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
30-
goto end
31-
32-
:help
33-
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
34-
35-
:end
36-
popd
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
set SPHINXPROJ=PackagingScientificPython
13+
14+
if "%1" == "" goto help
15+
16+
%SPHINXBUILD% >NUL 2>NUL
17+
if errorlevel 9009 (
18+
echo.
19+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
20+
echo.installed, then set the SPHINXBUILD environment variable to point
21+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
22+
echo.may add the Sphinx directory to PATH.
23+
echo.
24+
echo.If you don't have Sphinx installed, grab it from
25+
echo.http://sphinx-doc.org/
26+
exit /b 1
27+
)
28+
29+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
30+
goto end
31+
32+
:help
33+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
34+
35+
:end
36+
popd

‎docs/source/conf.py‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
#
4-
# diffpy.labpdfproc documentation build configuration file, created by
4+
# diffpy.labpdfproc documentation build configuration file, created by # noqa: E501
55
# sphinx-quickstart on Thu Jan 30 15:49:41 2014.
66
#
77
# This file is execfile()d with the current directory set to its
@@ -22,14 +22,11 @@
2222
try:
2323
fullversion = version("diffpy.labpdfproc")
2424
except Exception:
25-
fullversion = (
26-
"No version found. "
27-
"The correct version will appear in the released version."
28-
)
25+
fullversion = "No version found. The correct version will appear in the released version." # noqa: E501
2926

3027
# If extensions (or modules to document with autodoc) are in another directory,
3128
# add these directories to sys.path here. If the directory is relative to the
32-
# documentation root, use Path().resolve() to make it absolute, like shown here
29+
# documentation root, use Path().resolve() to make it absolute, like shown here. # noqa: E501
3330
# sys.path.insert(0, str(Path(".").resolve()))
3431
sys.path.insert(0, str(Path("../..").resolve()))
3532
sys.path.insert(0, str(Path("../../src").resolve()))
@@ -108,9 +105,6 @@
108105
# directories to ignore when looking for source files.
109106
exclude_patterns = ["build"]
110107

111-
# Mock imports so API docs render without installing dependencies.
112-
autodoc_mock_imports = ["diffpy.utils"]
113-
114108
# The reST default role (used for this markup: `text`) to use for all
115109
# documents.
116110
# default_role = None

‎pyproject.toml‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,14 @@ template = "{tag}"
4545
dev_template = "{tag}"
4646
dirty_template = "{tag}"
4747

48-
[project.scripts]
49-
labpdfproc = "diffpy.labpdfproc.labpdfprocapp:main"
50-
5148
[tool.setuptools.packages.find]
5249
where = ["src"] # list of folders that contain the packages (["."] by default)
5350
include = ["*"] # package names should match these glob patterns (["*"] by default)
54-
exclude = ["diffpy.labpdfproc.tests*"] # exclude packages matching these glob patterns (empty by default)
51+
exclude = [] # exclude packages matching these glob patterns (empty by default)
5552
namespaces = false # to disable scanning PEP 420 namespaces (true by default)
5653

57-
[tool.setuptools.package-data]
58-
"diffpy.labpdfproc" = ["data/*"]
54+
[project.scripts]
55+
diffpy-labpdfproc = "diffpy.labpdfproc.app:main"
5956

6057
[tool.setuptools.dynamic]
6158
dependencies = {file = ["requirements/pip.txt"]}

‎tests/test_version.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Unit tests for __version__.py."""
22

3-
import diffpy.labpdfproc
3+
import diffpy.labpdfproc # noqa
44

55

66
def test_package_version():

0 commit comments

Comments
 (0)