Skip to content

Commit

Permalink
Merge pull request #17216 from jdavcs/dev_sqlalchemy_graphene_fix
Browse files Browse the repository at this point in the history
Fix usage of graphene-sqlalchemy, bump to 3.0.0rc1
  • Loading branch information
jmchilton authored Dec 22, 2023
2 parents fad51b1 + 52d7fa7 commit 39ad53c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/galaxy/dependencies/pinned-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ fsspec==2023.12.2 ; python_version >= "3.8" and python_version < "3.12"
future==0.18.3 ; python_version >= "3.8" and python_version < "3.12"
galaxy-sequence-utils==1.1.5 ; python_version >= "3.8" and python_version < "3.12"
galaxy2cwl==0.1.4 ; python_version >= "3.8" and python_version < "3.12"
graphene-sqlalchemy==3.0.0b3 ; python_version >= "3.8" and python_version < "3.12"
graphene-sqlalchemy==3.0.0rc1 ; python_version >= "3.8" and python_version < "3.12"
graphene==3.3 ; python_version >= "3.8" and python_version < "3.12"
graphql-core==3.2.3 ; python_version >= "3.8" and python_version < "3.12"
graphql-relay==3.2.0 ; python_version >= "3.8" and python_version < "3.12"
Expand Down
10 changes: 4 additions & 6 deletions lib/tool_shed/webapp/graphql/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
SQLAlchemyConnectionField,
SQLAlchemyObjectType,
)
from graphene_sqlalchemy.converter import (
convert_sqlalchemy_hybrid_property_type,
convert_sqlalchemy_type,
)
from graphene_sqlalchemy.converter import convert_sqlalchemy_type
from graphene_sqlalchemy.utils import column_type_eq
from graphql import GraphQLResolveInfo
from sqlalchemy.orm import scoped_session
from typing_extensions import TypedDict
Expand Down Expand Up @@ -67,12 +65,12 @@ class InfoDict(TypedDict):


# Map these Galaxy-ism to Graphene for cleaner interfaces.
@convert_sqlalchemy_type.register(TrimmedString)
@convert_sqlalchemy_type.register(column_type_eq(TrimmedString))
def convert_sqlalchemy_type_trimmed_string(*args, **kwd):
return graphene.String


@convert_sqlalchemy_hybrid_property_type.register(lambda t: t == TrimmedString)
@convert_sqlalchemy_type.register(column_type_eq(lambda t: t == TrimmedString))
def convert_sqlalchemy_hybrid_property_type_trimmed_string(arg):
return graphene.String

Expand Down
2 changes: 1 addition & 1 deletion packages/test_driver/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ install_requires =
galaxy-util
galaxy-web-apps
pytest
graphene-sqlalchemy==3.0.0b3 # these are only needed by tool shed - which we've split out but the test driver loads
graphene-sqlalchemy==3.0.0rc1 # these are only needed by tool shed - which we've split out but the test driver loads
starlette-graphene3
packages = find:
python_requires = >=3.8
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fastapi-utils = "*"
fs = "*"
future = "*"
galaxy_sequence_utils = "*"
graphene-sqlalchemy = "3.0.0b3" # need a beta release to be compat. with starlette plugin
graphene-sqlalchemy = "3.0.0rc1" # need a beta release to be compat. with starlette plugin
gravity = ">=1.0.4"
gunicorn = "*"
gxformat2 = "*"
Expand Down

0 comments on commit 39ad53c

Please sign in to comment.