diff --git a/therapy/etl/drugsatfda.py b/therapy/etl/drugsatfda.py index ea149bc0..4959f968 100644 --- a/therapy/etl/drugsatfda.py +++ b/therapy/etl/drugsatfda.py @@ -41,7 +41,9 @@ def get_latest_version(self) -> str: raise DownloadException(msg) return date else: - raise requests.HTTPError("Unable to retrieve version from FDA API") + raise requests.HTTPError( + "Unable to retrieve version from FDA API", response=requests.Response() + ) def _load_meta(self) -> None: """Add Drugs@FDA metadata.""" diff --git a/therapy/schemas.py b/therapy/schemas.py index c33dd49d..38fb9733 100644 --- a/therapy/schemas.py +++ b/therapy/schemas.py @@ -6,7 +6,7 @@ from ga4gh.vrsatile.pydantic import return_value from ga4gh.vrsatile.pydantic.vrs_models import CURIE from ga4gh.vrsatile.pydantic.vrsatile_models import ValueObjectDescriptor -from pydantic import BaseModel, StrictBool, validator +from pydantic import BaseModel, StrictBool, StrictStr, validator from therapy.version import __version__ @@ -395,10 +395,12 @@ class TherapyDescriptor(ValueObjectDescriptor): class ServiceMeta(BaseModel): """Metadata regarding the therapy-normalization service.""" - name = "thera-py" - version = __version__ + name: Literal["thera-py"] = "thera-py" + version: StrictStr = __version__ response_datetime: datetime - url = "https://github.com/cancervariants/therapy-normalization" + url: Literal[ + "https://github.com/cancervariants/therapy-normalization" + ] = "https://github.com/cancervariants/therapy-normalization" class Config: """Configure OpenAPI schema"""