diff --git a/dynamicannotationdb/annotation.py b/dynamicannotationdb/annotation.py index 0032d07..635ceb1 100644 --- a/dynamicannotationdb/annotation.py +++ b/dynamicannotationdb/annotation.py @@ -257,6 +257,7 @@ def insert_annotations(self, table_name: str, annotations: List[dict], user_id=N that meet the schema user_id : str, optional user id to fill in any auto_user_id fields in the schema, by default None + note: if user_id is None, auto_user_id fields will not be filled and will need to be provided in the annotation dicts Returns ------- diff --git a/dynamicannotationdb/database.py b/dynamicannotationdb/database.py index bf1ed60..76e87bc 100644 --- a/dynamicannotationdb/database.py +++ b/dynamicannotationdb/database.py @@ -5,7 +5,7 @@ from sqlalchemy import create_engine, func, inspect, or_ from sqlalchemy.ext.automap import automap_base -from sqlalchemy.ext.declarative.api import DeclarativeMeta +from sqlalchemy.orm import DeclarativeMeta from sqlalchemy.orm import Session, scoped_session, sessionmaker from sqlalchemy.orm.exc import NoResultFound from sqlalchemy.schema import MetaData diff --git a/pyproject.toml b/pyproject.toml index 25d046f..040ba19 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,8 +20,8 @@ classifiers = [ requires-python = ">=3.8" dependencies = [ "marshmallow==3.5.1", - "emannotationschemas>=5.26.0", - "sqlalchemy<1.4", + "emannotationschemas>=5.26.3", + "sqlalchemy>=1.4,<2", "psycopg2-binary", "geoalchemy2", "pytz", diff --git a/requirements.txt b/requirements.txt index 9d75790..b965900 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ marshmallow==3.5.1 -emannotationschemas>=5.26.0 -sqlalchemy<1.4 +emannotationschemas>=5.26.3 +sqlalchemy>=1.4,<2 psycopg2-binary geoalchemy2 pytz diff --git a/tests/test_database.py b/tests/test_database.py index f39935b..d9a65c7 100644 --- a/tests/test_database.py +++ b/tests/test_database.py @@ -3,7 +3,7 @@ import pytest from sqlalchemy import Table -from sqlalchemy.ext.declarative.api import DeclarativeMeta +from sqlalchemy.orm import DeclarativeMeta from emannotationschemas import type_mapping from dynamicannotationdb.errors import TableAlreadyExists diff --git a/tests/test_schema.py b/tests/test_schema.py index 719ee86..be7fd3d 100644 --- a/tests/test_schema.py +++ b/tests/test_schema.py @@ -1,7 +1,7 @@ import marshmallow from emannotationschemas.errors import UnknownAnnotationTypeException import pytest -from sqlalchemy.ext.declarative.api import DeclarativeMeta +from sqlalchemy.orm import DeclarativeMeta def test_get_schema(dadb_interface): diff --git a/uv.lock b/uv.lock index 1b944b0..1e2d993 100644 --- a/uv.lock +++ b/uv.lock @@ -574,7 +574,7 @@ wheels = [ [[package]] name = "dynamicannotationdb" -version = "5.13.1" +version = "5.14.1" source = { editable = "." } dependencies = [ { name = "alembic" }, @@ -601,7 +601,7 @@ dev = [ [package.metadata] requires-dist = [ { name = "alembic" }, - { name = "emannotationschemas", specifier = ">=5.4.0" }, + { name = "emannotationschemas", specifier = ">=5.26.0" }, { name = "geoalchemy2" }, { name = "jsonschema", specifier = "<4.0" }, { name = "marshmallow", specifier = "==3.5.1" }, @@ -620,7 +620,7 @@ dev = [ [[package]] name = "emannotationschemas" -version = "5.24.12" +version = "5.26.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "flask-cors" }, @@ -633,7 +633,7 @@ dependencies = [ { name = "shapely" }, { name = "sqlalchemy" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/8d/60/2ccf0c3aa7d47f2fbda5d02ba023df5d88788ec1c579d7597702fca982f6/emannotationschemas-5.24.12.tar.gz", hash = "sha256:bd36cf0db1570e5098e3701c714ca1be20bb1de777f7624a9d37f0c805d3a5d0", size = 38327, upload-time = "2025-08-29T16:59:05.613Z" } +sdist = { url = "https://files.pythonhosted.org/packages/43/14/78090dfcc1ceef8abc207438fe768b15697db08655e55c642c0aeb71c7df/emannotationschemas-5.26.0.tar.gz", hash = "sha256:ab4ce6b699762396b5f0ad3f2134015fc4e4085f41292b14e598aeaeda9437b5", size = 39568, upload-time = "2026-04-28T16:24:13.056Z" } [[package]] name = "exceptiongroup"