humlab-swedeb / swedeb-api

1 stars 0 forks source link

Performance fixes and refactorings #57

Closed roger-mahler closed 1 month ago

roger-mahler commented 1 month ago

New features

class CommonQueryParams(SpeakerQueryParams):
    def __init__(...),
        ...
        speech_id: List[str] = Query(None, description="List of speech ids to filter by"),

How to use in call:

    speech_ids: list[str] = [ ... ]
    url: str = f"{version}/tools/speeches"
    json: dict = {'speech_id': speech_ids}
    response: Response = fastapi_client.post(url, json=json)

Breaking Changes:

    name: str = Field(None, description="Name of speaker")
    year: int = Field(None, description="Year of speech", examples=[1960])
    gender: str = Field(None, description="Gender of speaker")
    **gender_abbrev**: str = Field(None, description="Gender of speaker")
    party_abbrev: str = Field(None, description="Party of speaker")
    speech_link: str = Field(None, description="Source of speech")
    document_name: str = Field(None, description="Unique id of speech")
    link: str = Field(None, description="Link to the speaker")
    **speech_name**: str = Field(None, description="Formatted speech id")
    **chamber_abbrev**: str = Field(None, description="Chamber of speech")
    **speech_id**: str = Field(None, description="Unique id of speech")
    **wiki_id**: str = Field(None, description="Wiki id of speaker")
    **document_id**: int = Field(None, description="Document system id")

Refactorings and changes

Performance fixes

Bug fixes