Skip to content
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
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: release

on:
release:
types: [published]

permissions:
contents: read
id-token: write

jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Install uv
uses: astral-sh/setup-uv@v6

- name: Ensure Python (uses your .python-version / requires-python)
run: uv python install

- name: Verify version matches release tag
shell: bash
run: |
TAG="${GITHUB_EVENT_NAME:-release}"
# On release event, the tag name is here:
TAG_NAME="${{ github.event.release.tag_name }}"
VERSION="$(uv version --short)"
echo "tag=${TAG_NAME} pyproject=${VERSION}"
# Accept tags like v1.2.3 -> 1.2.3
TAG_STRIPPED="${TAG_NAME#v}"
if [ "${VERSION}" != "${TAG_STRIPPED}" ]; then
echo "::error::Version mismatch detected!"
echo "Release tag: ${TAG_NAME}"
echo "pyproject.toml version: ${VERSION}"
echo ""
echo "To fix:"
echo " - Ensure the release tag matches the version in pyproject.toml (e.g., tag 'v${VERSION}')"
echo " - If the tag is incorrect, delete and recreate the release with the correct tag."
exit 1
fi

- name: Build distributions
run: uv build --no-sources

- name: Publish to PyPI
run: uv publish
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup NOX
uses: wntrblm/nox@2025.10.16
with:
python-versions: "3.9, 3.10, 3.11, 3.12, 3.13, 3.14"
python-versions: "3.10, 3.11, 3.12, 3.13, 3.14"
- name: Test with NOX
run: |
nox --session tests
2 changes: 1 addition & 1 deletion .sourcery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ ignore:
- docs/build

rule_settings:
python_version: '3.9'
python_version: '3.10'
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- Modified the header image url to be an absolute url so that it hopefully shows up in PyPI correctly.
- Switched package build and publish tool from flit to uv.
- Updated GitHub Actions workflow to use uv for building and publishing to PyPI.

### Removed

Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The pythonbible library serves several purposes related to the Christian Bible a
<tr>
<td>Latest Version</td>
<td>
<a href="https://pypi.org/project/pythonbible/"><img src="https://img.shields.io/pypi/v/pythonbible?color=gold&logo=pypi&logoColor=lightgray"></a>
<a href="https://pypi.org/project/pythonbible/"><img src="https://img.shields.io/pypi/v/pythonbible?color=gold&logo=pypi&logoColor=lightgray"></a><br />
<img src="https://img.shields.io/pypi/dm/pythonbible?color=gold">
</td>
</tr>
Expand All @@ -15,20 +15,20 @@ The pythonbible library serves several purposes related to the Christian Bible a
<td><a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/license-MIT-orange.svg"></a></td>
</tr>
<tr>
<td>Tests</td>
<td>Workflows</td>
<td>
<img src="https://github.com/avendesora/pythonbible/actions/workflows/tests.yml/badge.svg">
<img src="https://github.com/avendesora/pythonbible/actions/workflows/python-package.yml/badge.svg"><br/>
<a href="https://www.codacy.com/gh/avendesora/pythonbible/dashboard?utm_source=github.com&utm_medium=referral&utm_content=avendesora/pythonbible&utm_campaign=Badge_Coverage"><img src="https://app.codacy.com/project/badge/Coverage/dc1333c64b434f7bb813d08750462921"></a>
<img src="https://github.com/avendesora/pythonbible/workflows/CodeQL/badge.svg"><br />
<img src="https://github.com/avendesora/pythonbible/actions/workflows/tests.yml/badge.svg">
</td>
</tr>
<tr>
<td>Code Quality</td>
<td>
<img src="https://github.com/avendesora/pythonbible/workflows/CodeQL/badge.svg">
<a href="https://www.codacy.com/gh/avendesora/pythonbible/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=avendesora/pythonbible&amp;utm_campaign=Badge_Grade"><img src="https://app.codacy.com/project/badge/Grade/dc1333c64b434f7bb813d08750462921"></a><br/>
<a href="https://results.pre-commit.ci/latest/github/avendesora/pythonbible/main"><img src="https://results.pre-commit.ci/badge/github/avendesora/pythonbible/main.svg"></a>
<a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
<a href="https://app.codacy.com/gh/avendesora/pythonbible/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage"><img src="https://app.codacy.com/project/badge/Coverage/dc1333c64b434f7bb813d08750462921"></a><br />
<a href="https://results.pre-commit.ci/latest/github/avendesora/pythonbible/main"><img src="https://results.pre-commit.ci/badge/github/avendesora/pythonbible/main.svg"></a><br />
<a href="https://sourcery.ai"><img src="https://img.shields.io/badge/Sourcery-enabled-brightgreen"></a>
</td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SPHINXBUILD ?= uv run --project=.. --group docs --locked sphinx-build
SOURCEDIR = source
BUILDDIR = build

Expand Down
1 change: 0 additions & 1 deletion docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Requirements

**pythonbible** requires Python and is tested with the following versions:

* 3.9
* 3.10
* 3.11
* 3.12
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
nox.options.default_venv_backend = "uv"


@nox.session(python=["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"])
@nox.session(python=["3.10", "3.11", "3.12", "3.13", "3.14"])
def tests(session: nox.Session) -> None:
session.install(PYTEST)
session.run(PYTEST)
Expand Down
50 changes: 36 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
[build-system]
requires = ["flit_core >=2,<4"]
build-backend = "flit_core.buildapi"
requires = ["uv_build>=0.8.9,<0.9.0"]
build-backend = "uv_build"

[tool.flit.metadata]
module = "pythonbible"
author = "Nathan Patton"
author-email = "npatton@gmail.com"
home-page = "https://docs.python.bible"
[tool.uv]
default-groups = ["dev", "docs", "test"]

[tool.uv.build-backend]
module-root = ""
module-name = "pythonbible"

[project]
name = "pythonbible"
version = "0.14.0"
description-file = "README.md"
requires-python = ">=3.10"
authors = [
{ name = "Nathan Patton", email = "npatton@gmail.com" }
]
readme = "README.md"
license = "MIT"
classifiers = [
"Intended Audience :: Information Technology",
"Intended Audience :: Developers",
Expand All @@ -17,21 +29,31 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"License :: OSI Approved :: MIT License"
]
requires = []
description-file = "README.md"
requires-python = ">=3.9"
urls = { Documentation = "https://docs.python.bible", Source = "https://github.com/avendesora/pythonbible" }
dependencies = []

[tool.flit.metadata.urls]
Documentation = "https://docs.python.bible"
Source = "https://github.com/avendesora/pythonbible"
[dependency-groups]
dev = [
"pre-commit>=4.3.0",
]
docs = [
"furo>=2025.7.19",
"jupyter>=1.1.1",
"sphinx>=7.4.7",
"sphinx-copybutton>=0.5.2",
"sphinx-toolbox>=4.0.0",
]
test = [
"nox[uv]>=2025.10.14",
"pytest-cov>=7.0.0",
]

[tool.ruff.lint]
select = [
Expand Down
1 change: 0 additions & 1 deletion requirements-dev.txt

This file was deleted.

5 changes: 0 additions & 5 deletions requirements-docs.txt

This file was deleted.

2 changes: 0 additions & 2 deletions requirements-test.txt

This file was deleted.

1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

Loading
Loading