Skip to content

Commit 49d3bf4

Browse files
committed
Further improvements to exception messages
1 parent 47979af commit 49d3bf4

File tree

5 files changed

+14
-5
lines changed

5 files changed

+14
-5
lines changed

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
- 1.1.3: Improving exception error messages to be more helpful.
2+
- 1.1.2: Fixes for `CATEGORY` parser for ambiguous term names.
3+
- 1.1.1: Fixes for action parser where field names contain ambiguous characters.
4+
- 1.1.0: Fixes to tests
5+
- 1.0.9: New `COLLATE` action, and a tutorial to demonstrate it.
16
- 1.0.8: CategoryModel terms now use StrictBool to avoid Pydantic's liberal interpretation of booleans.
27
- 1.0.7: Minor fix.
38
- 1.0.6: Minor fix.

docs/changelog.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ tags: wrangling, crosswalks, versions
88
---
99
# Change log
1010

11+
## Version 1.1.3 (2024-03-08)
12+
13+
- Continuing to improve exception error messages to be more helpful.
14+
1115
## Version 1.1.2 (2024-03-08)
1216

13-
- Improved CATEGORISE action parser to handle greater variety of text edge cases (especially comma-separated terms).
14-
- More helpful error messages for TypeError coercision problems where a specified type mismatch occurs.
17+
- Improved `CATEGORISE` action parser to handle greater variety of text edge cases (especially comma-separated terms).
18+
- More helpful error messages for `TypeError` coercion problems where a specified type mismatch occurs.
1519

1620
## Version 1.1.1 (2024-02-12)
1721

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 = "whyqd"
3-
version = "1.1.2"
3+
version = "1.1.3"
44
description = "data wrangling simplicity, complete audit transparency, and at speed"
55
authors = ["Gavin Chait <gchait@whythawk.com>"]
66
license = "BSD-3-Clause"

whyqd/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.2
1+
1.1.3

whyqd/parsers/datasource.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def coerce_to_schema(self, *, df: pd.DataFrame, schema: Type[SchemaDefinition])
247247
df[c.name] = self.coerce_column_to_dtype(column=_pd.Series(df[c.name].to_numpy()), coerce=prospect.dtype)
248248
validate["coerced"].append(c.name)
249249
df[c.name] = _pd.Series(df[c.name].to_numpy()).astype(FieldType(prospect.dtype).astype)
250-
except TypeError:
250+
except (TypeError, SyntaxError, ValueError):
251251
from_type = c.dtype
252252
if isinstance(df[c.name][0], list):
253253
from_type = "array"

0 commit comments

Comments
 (0)