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
12 changes: 6 additions & 6 deletions .github/workflows/pypi-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: 1.8.5
version: "0.7.12"
- name: Compare tag and project version
run: |
if [ "v$(poetry version | cut -d' ' -f2)" != "${{ github.ref_name }}" ]; then echo "Version mismatch"; exit 1; fi
- name: Poetry Build
if [ "v$(uv version | cut -d' ' -f2)" != "${{ github.ref_name }}" ]; then echo "Version mismatch"; exit 1; fi
- name: Build package
run: |
poetry build
uv build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
8 changes: 6 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.7.12"

- name: Check install local
run: |
pip install ".[test]"
Expand All @@ -35,8 +40,7 @@ jobs:

- name: Check build
run: |
pip install poetry
poetry build
uv build

- name: Check install sdist
run: |
Expand Down
9 changes: 0 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

.vscode
poetry.lock

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down Expand Up @@ -98,13 +96,6 @@ ipython_config.py
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
Expand Down
16 changes: 3 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
# Contributor Guidance

## Development

Note: this project is explicitly meant to support Python versions as old
as 3.8. This (unfortunately) means it requires Poetry 1.8.x to install
and build correctly.

```
$ brew install pipx
$ pipx ensurepath
$ pipx install poetry==1.8.5
$ poetry update
```
This project uses `uv`. Run `uv sync` after checking out the repository
to initialize your virtualenv with the project's dependencies.

## Publish package to PyPI

When we are ready to release a new version `vx.y.z`, one of the maintainers should:

1. Execute `poetry version {minor,patch}` to update the project version
1. Execute `uv version {minor,patch}` to update the project version
1. Commit the version change and any release-related changes
1. Create a new tag with `git tag -s -m "Version x.y.z" vx.y.z`.
If the tag doesn't match with the project version, step 4 validation will fail.
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ runtime and execute Spatial SQL queries.

## Installation

If you use [Poetry](https://python-poetry.org) in your project, add the
dependency with `poetry add`:
To add this library as a dependency in your Python project, use `uv add`
or `poetry add` as appropriate:

```
# For uv-managed projects
$ uv add wherobots-python-dbapi

# For poetry-managed projects
$ poetry add wherobots-python-dbapi
```

Expand Down
3 changes: 0 additions & 3 deletions poetry.toml

This file was deleted.

61 changes: 32 additions & 29 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,44 +1,47 @@
[project]
name = "wherobots-python-dbapi"

[tool.poetry]
name = "wherobots-python-dbapi"
version = "0.15.0"
description = "Python DB-API driver for Wherobots DB"
authors = ["Maxime Petazzoni <max@wherobots.com>"]
license = "Apache 2.0"
authors = [{ name = "Maxime Petazzoni", email = "max@wherobots.com" }]
requires-python = "~=3.8"
readme = "README.md"
packages = [{ include = "wherobots" }]
license = "Apache-2.0"
dependencies = [
"packaging",
"requests>=2.31.0",
"websockets>=13.0",
"tenacity>=8.2.3",
"cbor2>=5.6.3",
"StrEnum>=0.4.15,<0.5",
"pyarrow>=14.0.2",
"pandas",
]

[project.optional-dependencies]
test = ["pytest>=8.0.2"]

[project.urls]
Homepage = "https://github.com/wherobots/wherobots-python-dbapi-driver"
Tracker = "https://github.com/wherobots/wherobots-python-dbapi-driver/issues"

[tool.poetry.dependencies]
python = "^3.8"
packaging = "*"
requests = ">=2.31.0"
websockets = ">=13.0"
tenacity = ">=8.2.3"
cbor2 = ">=5.6.3"
StrEnum = "^0.4.15"
pyarrow = { version = ">=14.0.2" }
pandas = { version = "*" }
pytest = { version = ">=8.0.2", optional = true }

[tool.poetry.extras]
test = [ "pytest" ]

[tool.poetry.group.dev.dependencies]
pre-commit = "*"
pytest = ">=8.0.2"
pyarrow = ">=14.0.2"
pandas = "*"
rich = ">=13.7.1"
[dependency-groups]
dev = [
"pre-commit",
"pytest>=8.0.2",
"pyarrow>=14.0.2",
"pandas",
"rich>=13.7.1",
]

[tool.hatch.build.targets.sdist]
include = ["wherobots"]

[tool.hatch.build.targets.wheel]
include = ["wherobots"]

[build-system]
requires = ["poetry-core>=1.9.1"]
build-backend = "poetry.core.masonry.api"
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.pylint.format]
max-line-length = "88"
Expand Down
Loading