From 39a9a838a64837cda48e09966e51525ad4f21f73 Mon Sep 17 00:00:00 2001 From: James Stevenson Date: Tue, 16 Jul 2024 09:12:56 -0400 Subject: [PATCH 1/2] build: fix setuptools-scm build (#289) --- server/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/pyproject.toml b/server/pyproject.toml index c9456bda..c7a67021 100644 --- a/server/pyproject.toml +++ b/server/pyproject.toml @@ -21,7 +21,6 @@ classifiers = [ ] requires-python = ">=3.10" description = "Curation tool for gene fusions" -license = {file = "../LICENSE"} dependencies = [ "fastapi >= 0.72.0", "aiofiles", @@ -64,6 +63,7 @@ build-backend = "setuptools.build_meta" where = ["src"] [tool.setuptools_scm] +root = "../." [tool.pytest.ini_options] addopts = "--cov=src --cov-report term-missing" From c00194ffd639f3d1c78fd0ca62e1b20a8a14a239 Mon Sep 17 00:00:00 2001 From: James Stevenson Date: Mon, 5 Aug 2024 11:18:37 -0400 Subject: [PATCH 2/2] refactor: address config deprecation (#299) --- server/src/curfu/schemas.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/server/src/curfu/schemas.py b/server/src/curfu/schemas.py index 73cf5996..5976d939 100644 --- a/server/src/curfu/schemas.py +++ b/server/src/curfu/schemas.py @@ -19,7 +19,7 @@ UnknownGeneElement, ) from ga4gh.vrsatile.pydantic.vrsatile_models import CURIE -from pydantic import BaseModel, Extra, Field, StrictInt, StrictStr, validator +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, validator ResponseWarnings = list[StrictStr] | None @@ -88,10 +88,7 @@ class ClientFunctionalDomain(FunctionalDomain): domain_id: str - class Config: - """Configure class.""" - - extra = Extra.forbid + model_config = ConfigDict(extra="forbid") class ClientRegulatoryElement(RegulatoryElement): @@ -106,10 +103,7 @@ class Response(BaseModel): warnings: ResponseWarnings - class Config: - """Configure class""" - - extra = Extra.forbid + model_config = ConfigDict(extra="forbid") class GeneElementResponse(Response):