Skip to content

Latest commit

 

History

History
124 lines (100 loc) · 6.91 KB

File metadata and controls

124 lines (100 loc) · 6.91 KB

Changelog

All notable changes to this project will be documented in this file. The format is based on Keep a Changelog and this project follows Semantic Versioning.

2.1.0 - 2026-08-11

Added

  • Add support for the Gever (Geschäftsverwaltungssystem) APIs of the canton and the city of Zurich as a backend, based on goifer
  • Gever backend: with a usable schema, records are now fully flattened at any depth (e.g. a mitglieder record's person -> kontakt wrapper), instead of only a curated set of hardcoded field names
  • Gever backend: detect repeatable fields whose schema declares maxOccurs on the wrapping choice/sequence/all instead of on the element itself, fixing inconsistent dict-vs-list shapes for such fields (e.g. mitglieder's Behoerdenmandat/Parteizugehoerigkeit)
  • Gever backend: GeverResponse.explode() turns a list field into its own DataFrame, one row per item, with the parent record's obj_guid carried along as parent_obj_guid to join back
  • Gever backend: explode() is available on the result of the module level functions and SwissParlClient as well, not only on the backend response, and resolves a nested list field by its name (e.g. behoerdenmandate for person_kontakt_behoerdenmandate)
  • Gever backend: get_glimpse() only loads the rows it was asked for, instead of paging through the whole table as soon as the result is iterated over or converted to a DataFrame

Fixed

  • Gever backend: string values of keyword arguments are quoted and escaped in the generated CQL query, e.g. get_data('mitglieder', vorname='Hans Peter') searches for vorname adj "Hans Peter". Before, a value with a space was rejected by the API with an HTTP 406
  • Gever backend: a record with two containers of the same element no longer fails with ValueError: duplicated key, e.g. the city's geschaeft, which holds a Departement below both FederfuehrendesDepartement and MitbeteiligteDepartemente. A list field now keeps the name of its container, so those columns are federfuehrendesdepartement_departement_* and mitbeteiligtedepartemente (BC-Break for list fields that were named after the element they hold, e.g. behoerdenmandat is now person_kontakt_behoerdenmandate and dokument of sitzungendetail is now sitzungsdokumente)
  • Gever backend: a nested element whose name is only a part of the name of its parent keeps that parent as a prefix, e.g. End of SitzungsEnde is sitzungsende_end instead of a plain end that collided with other columns

2.0.0 - 2026-07-30

Changed

  • BC-Break: Python 3.10 is now required (Python 3.9 reached its end of life)
  • BC-Break: OpenParlData backend: search_scope and search_mode are no longer overridden, the API defaults (metadata and partial) apply. Pass search_scope="all" explicitly to search the full-text indexes (Issue #52)
  • OpenParlData backend: an empty search parameter is no longer sent for unfiltered queries (Issue #52)
  • Improved __repr__ of ODataResponse and OpenParlDataResponse and added more logging when parsing responses

Added

  • Add more tests for edge cases and previously uncovered code paths
  • Test Python 3.13 and 3.14 in the build matrix
  • Document in the README and on the website that limit is a page size (not a cap) and that search_mode="exact" is case-sensitive in practice

Fixed

  • OpenParlData backend: don't send lang="en" by default, which made tables like bodies appear empty (Issue #52)
  • OpenParlData backend: only warn about unknown query attributes, the documented query parameters (limit, offset, sort_by, fields, ...) no longer produce false positives (Issue #52)
  • OpenParlData backend: interpolate the table name in the unknown attribute warning (Issue #52)
  • OpenParlData backend: get_variables() and get_glimpse() now use the same language parameters as get_data(), so the variables match the returned columns
  • Fix type errors reported by mypy 2.x and pandas-stubs 3.x
  • Run the OData backend tests again: the file name did not match the pytest pattern, so they were never collected

1.0.0 - 2026-02-25

Changed

  • BC-Break: Python 3.9 is now required
  • BC-Break: Renamed the callable filter from swissparlpy.filter to swissparlpy.Filter
  • Switched from flit to uv to install dependencies, build and publish the package

Added

  • Added the plotting functionality from ggswissparl (Issue #9)
  • Added type hints in the library
  • Add to_dataframe() convenience method to SwissParlResponse to directly transform a result to a DataFrame
  • Detect server timeout and raise SwissParlTimeoutError if necessary
  • Add support for multiple backends
  • Add support for OpenParlData.ch as a backend (Issue #40)

0.3.0 - 2023-08-31

Added

  • Support for server-side pagination (transparent to the user)
  • ResultVeryLargeWarning to warn developers about very large queries
  • Logging to help with debugging
  • Add pre-commit configuration

Changed

  • Use black code style

0.2.1 - 2022-01-31

Fixed

  • In order to fix issue #17 a bug in pyodata had to be fixed. pyodata 1.9.0 contains the bugfix and is now specified as the minimum version.

0.2.0 - 2021-10-14

Added

  • Jupyter notebook with examples
  • New examples for advanced filters
  • Support for more advanced filters

Changed

  • Update README with examples

0.1.1 - 2021-09-27

Fixed

  • Typo in publish workflow

0.1.0 - 2021-09-27

Added

  • Test with fixtures
  • Linter for all code
  • Usage example in README

Fixed

  • Fixed get_variables call
  • Make sure get_tables returns a list

0.0.2 - 2021-09-27

Added

  • Added CHANGELOG file

Changed

  • Use flit to manage pypi package

0.0.1 - 2021-09-26

Added

  • Initial release of swissparlpy

Categories

  • Added for new features.
  • Changed for changes in existing functionality.
  • Deprecated for once-stable features removed in upcoming releases.
  • Removed for deprecated features removed in this release.
  • Fixed for any bug fixes.
  • Security to invite users to upgrade in case of vulnerabilities.