Skip to content
Closed
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
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: setup.py
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
pip install -e '.[test]'
Expand All @@ -35,14 +35,14 @@ jobs:
with:
python-version: '3.13'
cache: pip
cache-dependency-path: setup.py
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
pip install setuptools wheel twine
pip install build twine
- name: Publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python setup.py sdist bdist_wheel
python -m build
twine upload dist/*
2 changes: 1 addition & 1 deletion .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
with:
python-version: "3.12"
cache: pip
cache-dependency-path: setup.py
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
pip install -e '.[docs]'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
python-version: "3.11"
cache: pip
cache-dependency-path: setup.py
cache-dependency-path: pyproject.toml
- name: Install SpatiaLite
run: sudo apt-get install libsqlite3-mod-spatialite
- name: Install Python dependencies
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test-sqlite-support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ jobs:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
cache: pip
cache-dependency-path: setup.py
cache-dependency-path: setup.py
cache-dependency-path: pyproject.toml
- name: Set up SQLite ${{ matrix.sqlite-version }}
uses: asg017/sqlite-versions@71ea0de37ae739c33e447af91ba71dda8fcf22e6
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
cache: pip
cache-dependency-path: setup.py
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
pip install -e '.[test,mypy,flake8]'
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ venv
.hypothesis
Pipfile
Pipfile.lock
pyproject.toml
tests/*.dylib
tests/*.so
tests/*.dll
2 changes: 1 addition & 1 deletion docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ We increment ``minor`` for new features.

We increment ``patch`` for bugfix releass.

To release a new version, first create a commit that updates the version number in ``setup.py`` and the :ref:`the changelog <changelog>` with highlights of the new version. An example `commit can be seen here <https://github.com/simonw/sqlite-utils/commit/b491f22d817836829965516983a3f4c3c72c05fc>`__::
To release a new version, first create a commit that updates the version number in ``pyproject.toml`` and the :ref:`the changelog <changelog>` with highlights of the new version. An example `commit can be seen here <https://github.com/simonw/sqlite-utils/commit/b491f22d817836829965516983a3f4c3c72c05fc>`__::

# Update changelog
git commit -m " Release 3.29
Expand Down
81 changes: 81 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
[project]
name = "sqlite-utils"
version = "4.0a0"
description = "CLI tool and Python library for manipulating SQLite databases"
readme = { file = "README.md", content-type = "text/markdown" }
authors = [
{ name = "Simon Willison" },
]
license = "Apache-2.0"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Science/Research",
"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",
"Topic :: Database",
]

dependencies = [
"click",
"click-default-group>=1.2.3",
"pluggy",
"python-dateutil",
"sqlite-fts4",
"tabulate",
]

[project.urls]
Homepage = "https://github.com/simonw/sqlite-utils"
Documentation = "https://sqlite-utils.datasette.io/en/stable/"
Changelog = "https://sqlite-utils.datasette.io/en/stable/changelog.html"
Issues = "https://github.com/simonw/sqlite-utils/issues"
CI = "https://github.com/simonw/sqlite-utils/actions"

[project.scripts]
sqlite-utils = "sqlite_utils.cli:cli"

[project.optional-dependencies]
test = [
"black>=24.1.1",
"cogapp",
"hypothesis",
"pytest",
]
docs = [
"beanbag-docutils>=2.0",
"codespell",
"furo",
"pygments-csv-lexer",
"sphinx-autobuild",
"sphinx-copybutton",
]
mypy = [
"data-science-types",
"mypy",
"types-click",
"types-pluggy",
"types-python-dateutil",
"types-tabulate",
]
flake8 = [
"flake8",
"flake8-pyproject",
]

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.flake8]
max-line-length = 160
# Black compatibility, E203 whitespace before ':':
extend-ignore = ["E203"]

[tool.setuptools.package-data]
sqlite_utils = ["py.typed"]
4 changes: 0 additions & 4 deletions setup.cfg

This file was deleted.

83 changes: 0 additions & 83 deletions setup.py

This file was deleted.

2 changes: 1 addition & 1 deletion tests/test_extracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_extracts(fresh_db, kwargs, expected_table, use_table_factory):
{"id": 2, "species_id": "Oak"},
{"id": 3, "species_id": "Palm"},
],
**insert_kwargs
**insert_kwargs,
)
# Should now have two tables: Trees and Species
assert {expected_table, "Trees"} == set(fresh_db.table_names())
Expand Down
Loading