Skip to content

Commit 2398871

Browse files
Merge branch 'main' into fix-completeness-text
2 parents 3bfb2d5 + 78bdfd5 commit 2398871

16 files changed

+2099
-311
lines changed

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
# Changelog
22

3-
## Current Main
3+
## Current Main
4+
5+
## Release 1.8.2
46

57
- PR template: Hurl maintenance is mentioned and wording with respect to mergeability is clarified ([#860])
68

9+
### Bug Fixes
10+
11+
- attribute-completeness: custom filters are now correctly combined with topic filter ([#865])
12+
13+
[#865]: https://github.com/GIScience/ohsome-quality-api/pull/865
14+
715
[#860]: https://github.com/GIScience/ohsome-quality-api/issues/860
816

917

ohsome_quality_api/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "1.8.1"
1+
__version__ = "1.8.2"
22
__title__ = "ohsome quality API"
33
__description__ = "Data quality estimations for OpenStreetMap"
44
__author__ = "ohsome team"

ohsome_quality_api/attributes/definitions.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,12 @@ def get_attribute_preset(topic_key: str) -> List[Attribute]:
5252
) from error
5353

5454

55-
def build_attribute_filter(attribute_key: List[str], topic_key: str) -> str:
55+
def build_attribute_filter(attribute_key: List[str] | str, topic_key: str) -> str:
5656
"""Build attribute filter for ohsome API query."""
5757
attributes = get_attributes()
5858
try:
5959
if isinstance(attribute_key, str):
60-
return (
61-
get_topic_preset(topic_key).filter
62-
+ " and "
63-
+ attributes[topic_key][attribute_key].filter
64-
)
60+
return get_topic_preset(topic_key).filter + " and (" + attribute_key + ")"
6561
else:
6662
attribute_filter = get_topic_preset(topic_key).filter
6763
for key in attribute_key:

ohsome_quality_api/indicators/attribute_completeness/indicator.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ def __init__(
6767
for k in self.attribute_keys
6868
]
6969
)
70+
else:
71+
self.attribute_filter = build_attribute_filter(
72+
self.attribute_filter,
73+
self.topic.key,
74+
)
7075

7176
async def preprocess(self) -> None:
7277
# Get attribute filter

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "ohsome_quality_api"
3-
version = "1.8.1"
3+
version = "1.8.2"
44
description = "Data quality estimations for OpenStreetMap."
55
authors = ["ohsome team <ohsome@heigit.org>"]
66
homepage = "https://api.quality.ohsome.org"

scripts/release.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66

77
# please adjust these version names first
8-
export OLD_VERSION=1.8.0
9-
export NEW_VERSION=1.8.1
8+
export OLD_VERSION=1.8.1
9+
export NEW_VERSION=1.8.2
1010

1111

1212
# exit immediately if a command exits with a non-zero status
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Querying the ohsome API failed! Invalid filter syntax. Please look at the additional info and examples about the filter parameter at https://docs.ohsome.org/ohsome-api. Detailed error message: line 1, column 9: whitespaces, EQUALS (=), NOT_EQUALS (!=) or in expected, f encountered.
1+
Querying the ohsome API failed! Invalid filter syntax. Please look at the additional info and examples about the filter parameter at https://docs.ohsome.org/ohsome-api. Detailed error message: line 1, column 63: whitespaces, EQUALS (=), NOT_EQUALS (!=) or in expected, f encountered.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Querying the ohsome API failed! Invalid filter syntax. Please look at the additional info and examples about the filter parameter at https://docs.ohsome.org/ohsome-api. Detailed error message: line 1, column 9: whitespaces, EQUALS (=), NOT_EQUALS (!=) or in expected, f encountered.
1+
Querying the ohsome API failed! Invalid filter syntax. Please look at the additional info and examples about the filter parameter at https://docs.ohsome.org/ohsome-api. Detailed error message: line 1, column 63: whitespaces, EQUALS (=), NOT_EQUALS (!=) or in expected, f encountered.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Querying the ohsome API failed! Invalid filter syntax. Please look at the additional info and examples about the filter parameter at https://docs.ohsome.org/ohsome-api. Detailed error message: line 1, column 9: whitespaces, EQUALS (=), NOT_EQUALS (!=) or in expected, f encountered.
1+
Querying the ohsome API failed! Invalid filter syntax. Please look at the additional info and examples about the filter parameter at https://docs.ohsome.org/ohsome-api. Detailed error message: line 1, column 63: whitespaces, EQUALS (=), NOT_EQUALS (!=) or in expected, f encountered.

0 commit comments

Comments
 (0)