pas.utils ========= .. py:module:: pas.utils Functions --------- .. autoapisummary:: pas.utils.format_swiss_number pas.utils.get_parliamentarians_with_settlements pas.utils.get_parties_with_settlements pas.utils.debug_party_export pas.utils.debug_party_export2 Module Contents --------------- .. py:function:: format_swiss_number(value: decimal.Decimal | int) -> str .. py:function:: get_parliamentarians_with_settlements(session: sqlalchemy.orm.Session, start_date: datetime.date, end_date: datetime.date) -> list[onegov.pas.models.parliamentarian.Parliamentarian] Get all parliamentarians who were active and had settlements during the specified period. .. py:function:: get_parties_with_settlements(session: sqlalchemy.orm.Session, start_date: datetime.date, end_date: datetime.date) -> list[onegov.pas.models.party.Party] Get all parties that had active members with attendances during the specified period. This function ensures accurate party filtering by checking that parliamentarians were active members of their party at the time of each attendance, properly handling cases where parliamentarians switch parties or have changing membership dates. .. py:function:: debug_party_export(settlement_run: onegov.pas.models.SettlementRun, request: onegov.town6.request.TownRequest, party: onegov.pas.models.party.Party) -> None Debug function to trace party export data retrieval .. py:function:: debug_party_export2(request: onegov.town6.request.TownRequest, party: onegov.pas.models.party.Party) -> None