Skip to content
Open

v2 #56

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b525c5c
drop 2.7 and 3.9
hideaki-t Apr 19, 2025
598ee07
switch to ruff from flake8/isort, and update deps
hideaki-t Sep 9, 2025
ef5ab63
format and autofix by ruff
hideaki-t Sep 9, 2025
f7b287d
test
hideaki-t Sep 10, 2025
9a8f5a0
Merge remote-tracking branch 'origin/master' into v2_0
hideaki-t Oct 18, 2025
366cce0
use uv build backend
hideaki-t Oct 18, 2025
63e5723
update project configs
hideaki-t Oct 18, 2025
ab7834b
mark 3.14 is not experimental
hideaki-t Oct 18, 2025
286e128
add 3.14 into the classifiers
hideaki-t Oct 18, 2025
aab94d8
Update actions/checkout action to v6 (#54)
renovate[bot] Nov 22, 2025
88c960e
update deps
hideaki-t Mar 10, 2026
f6381e5
run tests against 3.15
hideaki-t Mar 10, 2026
37ad28d
update actions
hideaki-t Jun 12, 2026
ef17e2e
review project settings
hideaki-t Jun 12, 2026
2d23af1
fix minor and easily fixable linter issues
hideaki-t Jun 12, 2026
b5ee647
remove code for python 2
hideaki-t Jun 12, 2026
95e1c3e
fix ruff E722
hideaki-t Jun 12, 2026
51ed824
extract duplicated test data and db fixture to conftest.py
hideaki-t Jun 12, 2026
11fe640
simplify dependencies in tox after dropping python 2
hideaki-t Jun 12, 2026
f4b5629
simplify build matrix
hideaki-t Jun 12, 2026
dcdf5ab
Update actions/setup-python action to v6.3.0 (#61)
renovate[bot] Jun 24, 2026
220fef4
Update actions/checkout action to v7 (#60)
renovate[bot] Jun 24, 2026
2b342db
bump deps and uv
hideaki-t Aug 1, 2026
231be76
Update actions/checkout action to v7.0.1 (#64)
renovate[bot] Aug 1, 2026
2264bec
Update astral-sh/setup-uv action to v9 (#65)
renovate[bot] Aug 1, 2026
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
14 changes: 0 additions & 14 deletions .flake8

This file was deleted.

140 changes: 66 additions & 74 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,78 +6,70 @@ on: [push]
# pull_request:
# branches: [ master ]


jobs:
build:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version:
["3.10", "3.11", "3.12", "3.13", "pypy3.11"]
experimental: [false]
include:
- python-version: "3.13"
os: ubuntu-24.04-arm
experimental: false
- python-version: "3.13"
os: windows-11-arm
experimental: false
- python-version: "3.14"
os: ubuntu-latest
experimental: true
- python-version: "3.14"
os: ubuntu-24.04-arm
experimental: true
- python-version: "3.14"
os: windows-latest
experimental: true
- python-version: "3.14"
os: windows-11-arm
experimental: true
- python-version: "3.14"
os: macos-latest
experimental: true
- python-version: "3.14t"
os: ubuntu-latest
experimental: true
- python-version: "3.14t"
os: ubuntu-24.04-arm
experimental: true
- python-version: "3.14t"
os: windows-latest
experimental: true
- python-version: "3.14t"
os: windows-11-arm
experimental: true
- python-version: "3.14t"
os: macos-latest
experimental: true
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
cache: pip
- name: tox-gh workaround for freethreaded(!windows)
if: ${{ runner.os != 'Windows' && matrix.python-version == '3.14t' }}
run: echo "TOX_GH_MAJOR_MINOR=3.14t" >> $GITHUB_ENV
- name: tox-gh workaround for freethreaded(windows)
if: ${{ runner.os == 'Windows' && matrix.python-version == '3.14t' }}
run: echo "TOX_GH_MAJOR_MINOR=3.14t" >> $env:GITHUB_ENV
- name: Install dependencies
run: |
python3 -m pip install 'tox' 'tox-gh'
tox --version
- name: Install native deps (Linux)
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -y mecab libmecab-dev mecab-ipadic-utf8
- name: Test with tox
run: |
tox
build:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest, ubuntu-24.04-arm]
python-version:
[
"3.10",
"3.11",
"3.12",
"3.13",
"3.14",
"3.14t",
"pypy3.11",
]
experimental: [false]
include:
- python-version: "3.14"
os: windows-11-arm
experimental: false
- python-version: "3.14t"
os: windows-11-arm
experimental: false
- python-version: "3.15-dev"
os: ubuntu-latest
experimental: true
- python-version: "3.15-dev"
os: macos-latest
experimental: true
- python-version: "3.15-dev"
os: windows-latest
experimental: true
- python-version: "3.15-dev"
os: ubuntu-24.04-arm
experimental: true

steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
cache: pip
- name: tox-gh workaround for freethreaded(!windows)
if: ${{ runner.os != 'Windows' && endsWith(matrix.python-version, 't') }}
run: echo "TOX_GH_MAJOR_MINOR=${{ matrix.python-version }}" >> $GITHUB_ENV
- name: tox-gh workaround for freethreaded(windows)
if: ${{ runner.os == 'Windows' && endsWith(matrix.python-version, 't') }}
run: echo "TOX_GH_MAJOR_MINOR=${{ matrix.python-version }}" >> $env:GITHUB_ENV
- name: Install dependencies
run: |
python3 -m pip install 'tox' 'tox-gh'
tox --version
- name: Install native deps (Linux)
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -y mecab libmecab-dev mecab-ipadic-utf8
- name: Test with tox
run: |
tox
62 changes: 32 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,38 @@
name: Release

on:
push:
tags:
- test-v*
release:
types:
- "published"
push:
tags:
- test-v*
release:
types:
- "published"

jobs:
publish:
strategy:
matrix:
publish:
strategy:
matrix:
environment:
- pypi
- testpypi
exclude:
- environment: ${{ !startsWith(github.ref_name, 'v') && 'pypi' }}
- environment: ${{ contains(github.ref_name, 'test') && 'pypi' }}
- environment: ${{ github.event_name == 'release' && 'testpypi' }}
name: Publish to PyPI ${{ matrix.environment }} from ${{ github.ref_name }}
runs-on: ubuntu-latest
environment:
- pypi
- testpypi
exclude:
- environment: ${{ !startsWith(github.ref_name, 'v') && 'pypi' }}
- environment: ${{ contains(github.ref_name, 'test') && 'pypi' }}
- environment: ${{ github.event_name == 'release' && 'testpypi' }}
name: Publish to PyPI ${{ matrix.environment }} from ${{ github.ref_name }}
runs-on: ubuntu-latest
environment:
name: ${{ matrix.environment }}
permissions:
id-token: write
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v7
- run: uv build
- name: Smoke test (wheel)
run: uv run --isolated --no-project -p 3.13 --with dist/*.whl --with pytest pytest tests/test_base.py
- name: Smoke test (source distribution)
run: uv run --isolated --no-project -p 3.13 --with dist/*.tar.gz --with pytest pytest tests/test_base.py
- run: uv publish --trusted-publishing always ${{ matrix.environment == 'testpypi' && '--index testpypi' || '' }}
name: ${{ matrix.environment }}
permissions:
id-token: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
- run: uv build
- name: Smoke test (wheel)
run: uv run --isolated --no-project -p 3.13 --with dist/*.whl --with pytest pytest tests/test_base.py
- name: Smoke test (source distribution)
run: uv run --isolated --no-project -p 3.13 --with dist/*.tar.gz --with pytest pytest tests/test_base.py
- run: uv publish --trusted-publishing always ${{ matrix.environment == 'testpypi' && '--index testpypi' || '' }}
6 changes: 0 additions & 6 deletions .isort.cfg

This file was deleted.

7 changes: 0 additions & 7 deletions MANIFEST.in

This file was deleted.

83 changes: 45 additions & 38 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,72 +1,79 @@
[project]
name = "sqlitefts"
version = "1.0.1"
version = "2.0.dev"
description = "A Python binding for tokenizers of SQLite Full Text Search"
authors = [{ name = "Hideaki Takahashi", email = "mymelo@gmail.com" }]
dependencies = [
"cffi>=2.0.0; python_version >= '3.14'",
"cffi>=1.17.0; python_version >= '3.9'",
"cffi>=1.15.1 ; platform_python_implementation != 'PyPy'",
]
readme = "README.rst"
requires-python = ">=2.7,!=3.0,!=3.1,!=3.2,!=3.3,!=3.4,!=3.5,!=3.6,!=3.7,!=3.8"
license = { text = "MIT" }
requires-python = ">=3.10, <4"
license = "MIT"
license-files = ["LICENSE"]
authors = [{ name = "Hideaki Takahashi", email = "mymelo@gmail.com" }]
keywords = [
"SQLite",
"Full-text",
"search",
"FTS",
"SQLite3",
"FTS3",
"FTS4",
"FTS5",
"Full-text",
"SQLite",
"SQLite3",
"search",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Database",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"cffi>=1.17.0 ; platform_python_implementation != 'PyPy'",
"cffi>=2.0.0; python_version >= '3.14'",
]

[project.urls]
Homepage = "https://github.com/hideaki-t/sqlite-fts-python/"
Repository = "https://github.com/hideaki-t/sqlite-fts-python.git"
Issues = "https://github.com/hideaki-t/sqlite-fts-python/issues"
Repository = "https://github.com/hideaki-t/sqlite-fts-python"

[dependency-groups]
dev = [
"faker>=30.0.0 ; python_full_version >= '3.13'",
"pyrefly>=1.0.0",
"pytest>=8.3.2 ; python_version >= '3.13'",
"ruff>=0.6.2 ; python_version >= '3.13'",
"ty>=0.0.1a20 ; python_version >= '3.13'",
"types-cffi>=1.16.0.0 ; python_version >= '3.13'",
"zuban>=0.8.2",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
requires = ["uv_build>=0.11.21,<0.13.0"]
build-backend = "uv_build"

[tool.hatch.metadata]
allow-direct-references = true
[tool.ruff]
line-length = 120
preview = true

[tool.hatch.build.targets.wheel]
packages = ["sqlitefts"]
[tool.ruff.lint]
select = ["E", "F", "W", "C", "B", "I", "UP", "RUF"]
ignore = []
fixable = ["ALL"]

[tool.uv]
dev-dependencies = [
"mypy>=1.11.2 ; python_version >= '3.12'",
"faker>=30.0.0 ; python_full_version >= '3.12'",
"pytest>=8.3.2 ; python_version >= '3.12'",
"types-cffi>=1.16.0.0 ; python_version >= '3.12'",
"ruff>=0.6.2 ; python_version >= '3.12'",
]
[tool.ruff.lint.isort]
known-first-party = ["sqlitefts", "jajp_common"]

[tool.hatch.build]
include = [
"sqlitefts/*.py",
"sqlitefts/*.pyi",
"sqlitefts/py.typed",
"tests/**",
]
[tool.ruff.format]
line-ending = "lf"

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

[[tool.uv.index]]
name = "testpypi"
Expand Down
4 changes: 2 additions & 2 deletions sqlitefts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
from .fts3 import Tokenizer, make_tokenizer_module, register_tokenizer

__all__ = [
"Error",
"Tokenizer",
"make_tokenizer_module",
"ranking",
"register_tokenizer",
"tokenizer",
"ranking",
"Error",
]
Loading