Skip to content

Commit 31419d0

Browse files
authored
Merge pull request #19 from metaodi/develop
Release 0.2.1
2 parents 97d3ba9 + 18daa4d commit 31419d0

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
lines changed

CHANGELOG.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
44

55
## [Unreleased]
66

7+
## [0.2.1] - 2022-01-31
8+
### Fixed
9+
- 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.
10+
711
## [0.2.0] - 2021-10-14
812
### Added
913
- Jupyter notebook with examples
@@ -49,7 +53,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
4953
- `Fixed` for any bug fixes.
5054
- `Security` to invite users to upgrade in case of vulnerabilities.
5155

52-
[Unreleased]: https://github.com/metaodi/swissparlpy/compare/v0.2.0...HEAD
56+
[Unreleased]: https://github.com/metaodi/swissparlpy/compare/v0.2.1...HEAD
57+
[0.2.1]: https://github.com/metaodi/swissparlpy/compare/v0.2.0...v0.2.1
5358
[0.2.0]: https://github.com/metaodi/swissparlpy/compare/v0.1.1...v0.2.0
5459
[0.1.1]: https://github.com/metaodi/swissparlpy/compare/v0.1.0...v0.1.1
5560
[0.1.0]: https://github.com/metaodi/swissparlpy/compare/v0.0.2...v0.1.0

README.md

+14-3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ This module provides easy access to the data of the [OData webservice](https://w
1919
* [Advanced filter](#advanced-filter)
2020
* [Large queries](#large-queries)
2121
* [Credits](#credits)
22+
* [Development](#development)
2223
* [Release](#release)
2324

2425
## Installation
@@ -144,23 +145,24 @@ To query for date ranges you can use the operators...
144145

145146
**Text query**
146147

147-
It's possible to write text queries using operators like `eq` (equals), `ne` (not equals), `lt`/`lte` (less than/less than or equals), `gt`/`gte` (greater than/greater than or equals), 'startswith()` and `contains`:
148+
It's possible to write text queries using operators like `eq` (equals), `ne` (not equals), `lt`/`lte` (less than/less than or equals), `gt` / `gte` (greater than/greater than or equals), `startswith()` and `contains`:
148149

149150
```python
150151
import swissparlpy as spp
151152
import pandas as pd
152153

153154
persons = spp.get_data(
154155
"Person",
155-
filter="(startswith(FirstName, 'Ste') or LastName eq 'Seiler') and Language='DE'"
156+
filter="(startswith(FirstName, 'Ste') or LastName eq 'Seiler') and Language eq 'DE'"
156157
)
157158

158159
df = pd.DataFrame(persons)
159160
print(df[['FirstName', 'LastName']])
160161
```
162+
161163
**Callable Filter**
162164

163-
You can provide a callable as a filter which allows for more advanved filters.
165+
You can provide a callable as a filter which allows for more advanced filters.
164166

165167
`swissparlpy.filter` provides `or_` and `and_`.
166168

@@ -224,6 +226,15 @@ df_voting50 = pd.concat([pd.read_pickle(os.path.join(path, x)) for x in os.listd
224226
This library is inspired by the R package [swissparl](https://github.com/zumbov2/swissparl) of [David Zumbach](https://github.com/zumbov2).
225227
[Ralph Straumann](https://twitter.com/rastrau) initial [asked about a Python version of `swissparl` on Twitter](https://twitter.com/rastrau/status/1441048778740432902), which led to this project.
226228

229+
## Development
230+
231+
To develop on this project, install `flit`:
232+
233+
```
234+
pip install flit
235+
flit install -s
236+
```
237+
227238
## Release
228239

229240
To create a new release, follow these steps (please respect [Semantic Versioning](http://semver.org/)):

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ classifiers = ["License :: OSI Approved :: MIT License"]
1111
dynamic = ["version", "description"]
1212
dependencies = [
1313
"requests",
14-
"pyodata",
14+
"pyodata>=1.9.0",
1515
]
1616

1717
[project.optional-dependencies]

swissparlpy/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Client for Swiss parliament API"""
22

3-
__version__ = '0.2.0'
3+
__version__ = '0.2.1'
44
__all__ = ['client', 'errors']
55

66
from .errors import SwissParlError # noqa

0 commit comments

Comments
 (0)