Releases: kaiba-tech/kaiba
3.0.1
Mypy support
- Add py.typed file to enable typing downstream by @thomasborgen in #162
V3.0.0 @dataclass bug fixed and no more callable objcets
Version 3.0.0 @DataClass from attr bug and no more callable objects.
We were using @dataclass
decorator from attr, which caused kaiba not to run when used in an environment that did not have attr installed. Thanks to @ChameleonTartu for finding and reporting the bug.
Non-private code has been changed which is why this is a major version. In the future we will make sure to have clearer line between what is private internal kaiba code and what is the interface that users will use.
Internal
- We are now callable object free. From now on, we will only use functions.
Python 3.10, 3.11 Support and dependency updates
Version 2.0.0 Upgrade dependencies, support python 3.10, 3.11
This major version bump is needed because we upgrade pydantic
to version 2 from version 1. This changed many error messages in schema validation. If anyone was depending on those, it would break their code. In the same update we are updating a lot of other dependencies too. Most importantly going from returns
0.14 to 0.22. This might mean we can make the functional code look better in the future. We are also now support python 3.10 and 3.11 and test them like we do 3.8 and 3.9.
Breaking
- Upgrades to
pydantic
version 2. This is a breaking change because it changes the output of validation errors.
Upgrades
- Bump returns from 0.14 to 0.22 by @thomasborgen in #130
- Bump pydantic to 2.4.2 by @thomasborgen in #131
- Bump pycountry from 20.7.3 to 22.3.5 by @dependabot in #81
Internal
- CI - Github workflow tests now targets
main
branch instead ofmaster
- Add dependabot.yml by @thomasborgen in #28
- Update poetry version by @thomasborgen in #125
- Enable safety checks by @thomasborgen in #134
Dev dependencies
- Bump importlib-metadata from 4.8.1 to 4.8.2 by @dependabot in #41
- Bump pre-commit from 2.15.0 to 2.16.0 by @dependabot in #45
- Bump wemake-python-styleguide from 0.15.3 to 0.18.0
- Bump mypy to 1.5 @thomasborgen in #132
- Bump simplejson from 3.18.1 to 3.19.2 by @dependabot in #133
- Bump isort from 5.11.4 to 5.12.0 by @dependabot in #126
New Contributors
- @dependabot made their first contribution in #33
Full Changelog: 1.0.0...2.0.0
Kaiba
Kaiba is a data transformation tool written in Python that uses a DTL(Data Transformation Language) expressed in normal JSON to govern output structure, data fetching and data transformation.
Kaiba version 1.0.0 brings pydantic to kaiba land and also renames a few configuration keys so that they are easier to understand.
Features
- Mapping by configuration File.
- Looping/Iterating data from multiple places to create 1 or many objects
- Combine multiple values to one.
- Default values
- If statements
- conditions: is, not, in, contains
- can match any valid json value including objects and lists
- Casting
- integer, decimal, iso date
- Regular Expressions
- get whole regex result
- choose matching groups
- Slicing
- Slice/Substring strings or arrays
Changelog
- Restructures pydantic models
- Rename Mapping->DataFetcher
- Rename Attribute.mappings->Attribute.data_fetchers
- Rename Regexp->Regex
- Rename Regex.search to Regex.expression
- Rename Iterable->Iterator
- Rename iterables->iterators
- Simplify typing
Migrate to Pydantic
This version changes how we validate our json configuration and also how we parse it. Using pydantic it is much easier to handle to handle typing and the code in general.
- Removes json schema adds pydantic for config validation
Patch - Schema troubles
Fixes problems with Schema validation
- In attribute make sure either name + mappings or name + default is required
- In mappings make sure that length of path is above 1 if default is not provided.
Kaiba 誕生
Kaiba forked from greenbird/piri
This is where I will continue to develop the JSON data transformation tool