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
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
- package-ecosystem: "uv" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
Expand Down
60 changes: 25 additions & 35 deletions .github/workflows/python-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,31 @@ on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:

run:
runs-on: ubuntu-latest

environment:
name: pypi
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -

- name: Update package version
run: |
VERSION=${{ github.event.release.tag_name }}
sed -i 's/__version__ = ".*"/__version__ = "'${VERSION}'"/' datastew/_version.py
sed -i "s/^version = \".*\"/version = \"${VERSION}\"/" pyproject.toml

- name: Install dependencies
run: |
poetry install

- name: Build package
run: |
poetry build

- name: Publish package
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
run: |
poetry publish --username __token__ --password $POETRY_PYPI_TOKEN_PYPI
- name: Checkout
uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Install Python 3.13
run: uv python install 3.13
- name: Update package version
run: |
VERSION=${{ github.event.release.tag_name }}
sed -i 's/__version__ = ".*"/__version__ = "'${VERSION}'"/' datastew/_version.py
uv version "$VERSION"
- name: Build
run: uv build
- name: Smoke test (wheel)
run: uv run --isolated --no-project --with dist/*.whl tests/smoke_test.py
- name: Smoke test (source distribution)
run: uv run --isolated --no-project --with dist/*.tar.gz tests/smoke_test.py
- name: Publish
run: uv publish
17 changes: 7 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,24 @@ jobs:
TEST_POSTGRES_URI: postgresql://testuser:testpass@localhost:5432/testdb

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
run: curl -sSL https://install.python-poetry.org | python3 -

- name: Configure Poetry environment
run: |
poetry config virtualenvs.create true
poetry env use python${{ matrix.python-version }}
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: poetry install
run: uv sync --locked --all-extras --dev

- name: Wait for PostgreSQL to become ready
run: |
until pg_isready -h localhost -U testuser -d testdb; do sleep 1; done

- name: Run tests
run: poetry run pytest
run: uv run pytest tests
3,779 changes: 0 additions & 3,779 deletions poetry.lock

This file was deleted.

103 changes: 50 additions & 53 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,72 +1,69 @@
[build-system]
requires = [
"poetry-core>=1.0.0",
"setuptools>=65.0",
"wheel",
]
build-backend = "poetry.core.masonry.api"
requires = ["uv_build>=0.9.10,<0.10.0"]
build-backend = "uv_build"

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

[tool.poetry]
[project]
name = "datastew"
version = "0.1.0"
description = "Datastew is a python library for intelligent data harmonization using Large Language Model (LLM) vector embeddings."
authors = ["Tim Adams <tim.adams@scai.fraunhofer.de>", "Mehmet Can Ay <mehmet.ay@scai.fraunhofer.de>"]
license = "Apache-2.0"
readme = "README.md"
homepage = "https://github.com/SCAI-BIO/datastew"
repository = "https://github.com/SCAI-BIO/datastew"
documentation = "https://github.com/SCAI-BIO/datastew#readme"
license = { file = "LICENSE" }
requires-python = ">=3.10,<3.14"
authors = [
{ name = "Tim Adams", email = "tim.adams@scai.fraunhofer.de" },
{ name = "Mehmet Can Ay", email = "mehmet.ay@scai.fraunhofer.de" },
]
keywords = ["data-harmonization", "LLM", "embeddings", "data-steward"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]

[tool.poetry.urls]
homepage = "https://github.com/SCAI-BIO/datastew"
repository = "https://github.com/SCAI-BIO/datastew"
documentation = "https://github.com/SCAI-BIO/datastew#readme"
tracker = "https://github.com/SCAI-BIO/datastew/issues"
dependencies = [
"matplotlib>=3.10.7,<4.0.0",
"numpy>=2.2.6,<3.0.0",
"openai>=2.7.1,<3.0.0",
"openpyxl>=3.1.5,<4.0.0",
"pandas>=2.3.3,<3.0.0",
"plotly>=6.4.0,<7.0.0",
"python-dateutil>=2.9.0.post0,<3.0.0",
"python-dotenv>=1.2.1,<2.0.0",
"pytz>=2025.2,<2026.0",
"seaborn>=0.13.2,<1.0.0",
"sentence-transformers>=5.1.2,<6.0.0",
"scikit-learn>=1.7.2,<2.0.0",
"six>=1.17.0,<2.0.0",
"thefuzz>=0.22.1,<1.0.0",
"tzdata>=2025.2,<2026.0",
"wheel>=0.45.1,<1.0.0",
"aiofiles>=25.1.0,<26.0.0",
"SQLAlchemy>=2.0.44,<3.0.0",
"scipy>=1.15.3,<2.0.0",
"pydantic>=2.12.4,<3.0.0",
"requests>=2.32.5,<3.0.0",
"uuid>=1.30,<2.0.0",
"weaviate-client>=4.17.0,<5.0.0",
"cachetools>=6.2.1,<7.0.0",
"ollama>=0.6.0,<1.0.0",
"pgvector>=0.4.1,<1.0.0",
"psycopg2-binary>=2.9.11,<3.0.0",
"torch>=2.9.0,<3.0.0",
]

[[tool.poetry.packages]]
include = "datastew"
[project.optional-dependencies]
dev = ["flake8>=7.3.0,<8.0.0", "pytest>=9.0.0,<10.0.0"]

[tool.poetry.dependencies]
python = ">=3.10,<3.14"
matplotlib = "^3.10.7"
numpy = "^2.2.6"
openai = "^2.7.1"
openpyxl = "^3.1.5"
pandas = "^2.3.3"
plotly = "^6.4.0"
python-dateutil = "^2.9.0.post0"
python-dotenv = "^1.2.1"
pytz = "^2025.2"
seaborn = "^0.13.2"
sentence-transformers = "^5.1.2"
scikit-learn = "^1.7.2"
six = "^1.17.0"
thefuzz = "^0.22.1"
tzdata = "^2025.2"
wheel = "^0.45.1"
aiofiles = "^25.1.0"
SQLAlchemy = "^2.0.44"
scipy = "^1.15.3"
pydantic = "^2.12.4"
requests = "^2.32.5"
uuid = "^1.30"
weaviate-client = "^4.17.0"
cachetools = "^6.2.1"
ollama = "^0.6.0"
pgvector = "^0.4.1"
psycopg2-binary = "^2.9.11"
torch = "^2.9.0"

[tool.poetry.group.dev.dependencies]
flake8 = "^7.3.0"
pytest = "^9.0.0"
[project.urls]
Homepage = "https://github.com/SCAI-BIO/datastew"
Repository = "https://github.com/SCAI-BIO/datastew"
Documentation = "https://github.com/SCAI-BIO/datastew#readme"
Tracker = "https://github.com/SCAI-BIO/datastew/issues"
17 changes: 17 additions & 0 deletions tests/smoke_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
def test_package_imports():
"""
Basic check that the installed wheel can be imported.
"""
import datastew

assert datastew is not None


def test_version_exists():
"""
Ensure version metadata is accessible.
"""
from datastew import __version__

assert isinstance(__version__, str)
assert len(__version__) > 0
Loading
Loading