diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b1bb41e..8dedd729 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,8 @@ -# Changelog +## 0.57.2 (2024-03-11) -All notable changes to this project will be documented in this file. +### Fix -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +- model generator refactored (#569) ## 0.57.1 (2024-02-22) @@ -91,12 +90,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## 0.51.0 (2023-09-20) -### BREAKING CHANGE +### Feat - **pydantic-v2**: First steps to support pydantic v2. Namespace dataclasses_avroschame.pydantic added. All AvroModel fields now are private (#427) -*Migration guide for pydantic users*: https://marcosschroh.github.io/dataclasses-avroschema/migration_guide/#migration-from-previous-versions-to-0510 - ## 0.50.2 (2023-09-19) ### Fix @@ -306,24 +303,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fix - correctly generate enum default values (#275) -- correctly generate type annotations - -fix: do not generate default dataclass docstrings - -fix: datetime model generation - -the previous implementation did not roundtrip - -feat: render docstrings in generated classes - -fix: correct union and optional conversion - -test: add avsc -> python -> avsc roundtrip test - -fix: properly handle aliases in the model generator - -tests: add coverage for single-type unions model generation - +- correctly generate type annotations + +fix: do not generate default dataclass docstrings + +fix: datetime model generation + +the previous implementation did not roundtrip + +feat: render docstrings in generated classes + +fix: correct union and optional conversion + +test: add avsc -> python -> avsc roundtrip test + +fix: properly handle aliases in the model generator + +tests: add coverage for single-type unions model generation + Co-authored-by: Maximilian Hils ## 0.39.3 (2023-03-29) @@ -358,633 +355,580 @@ Co-authored-by: Maximilian Hils ## 0.38.0 (2023-03-22) -- First release added with `commitizen` +## v0.37.5 (2023-03-17) -## [0.37.5] - 2023-03-17 +### Fix -- Avro schema generation should always return the same result. Close #254 (#255) +- avro schema generation should always return the same result. Close #254 (#255) -### Fixed +## v0.37.4 (2023-03-06) -## [0.37.4] - 2023-03-06 +### Fix -- Exception `NameSpaceRequiredException` removed. Close #246 (#253) +- release v0.37.3 -> v0.37.4 +- exception NameSpaceRequiredException removed. Close #246 (#253) -### Fixed +## v0.37.3 (2023-03-06) -## [0.37.3] - 2023-03-06 +### Fix -- Dependencies and documentation (#252) +- dependencies and documentation (#252) -### Fixed +## v0.37.2 (2023-03-02) -## [0.37.2] - 2023-03-02 +### Fix -- Use `UUID` type instead of function `uuid4` on model generation (#251) +- use UUID type instead of function uuid4 (#251) -### Fixed +## v0.37.1 (2023-02-24) -## [0.37.1] - 2023-02-24 +### Fix -- Use `pydantic UUID4` when generating pydantic models. (#247) +- use pydantic UUID4 when generating pydantic models. (#247) -### Added +## v0.37.0 (2023-02-22) -## [0.37.0] - 2023-02-22 +### Feat -- Dacite custom config added to class Meta. Closes #242 (#245) +- dacite custom config added to class Meta. Closes #242 (#245) -### Fixed +## v0.36.3 (2023-02-16) -## [0.36.3] - 2023-02-16 +### Fix - ListField fake generation when it contains Optional. Closes #232 (#244) -### Fixed - -## [0.36.2] - 2023-02-14 - -- Do not persist the schema when the parent class is not an AvroModel. Closes #241 - -### Fixed - -## [0.36.1] - 2023-01-19 - -- Model generator with only decimal fields. -- Use `pydantic.condecimal` instead of the custom `Decimal` as default value when generate `pydantic` models - -### Added - -## [0.36.0] - 2023-01-18 - -- Generate a Python module from multiple schemas [235](https://github.com/marcosschroh/dataclasses-avroschema/pull/235) - -### Added +## v0.36.2 (2023-02-14) -## [0.35.0] - 2023-01-10 - -- Convert python models from `avsc` schemas [227](https://github.com/marcosschroh/dataclasses-avroschema/pull/227) - -### Fixed - -## [0.34.6] - 2023-01-06 - -- Use namespaces when an enum is used multiple times in a class. Cases should not apply to enum names. Closes [221](https://github.com/marcosschroh/dataclasses-avroschema/issues/221) - -### Fixed - -## [0.34.5] - 2023-01-06 - -- Schema generation with optional enum when using pydantic. Closes [229](https://github.com/marcosschroh/dataclasses-avroschema/issues/229) +### Fix -### Fixed +- do not persist the schema when the parent class is not an AvroModel. Closes #241 (#243) -## [0.34.4] - 2023-01-04 +### Perf -- Fake generation with optional user defined types [228](https://github.com/marcosschroh/dataclasses-avroschema/pull/228) +- ruff added in order to replace isort and flake8 (#238) -### Fixed +## v0.36.1 (2023-01-19) -## [0.34.3] - 2022-12-15 +### Fix -- `Decimal` fields serialization [222](https://github.com/marcosschroh/dataclasses-avroschema/issues/222) +- use pydantic condecimal when generating pydantic models. Closes #234 (#237) +- model generator with only decimal fields. Closes #233 (#236) -### Fixed +## v0.36.0 (2023-01-18) -## [0.34.2] - 2022-11-18 +### Feat -- pydantic `fake` and nested json serialization [219](https://github.com/marcosschroh/dataclasses-avroschema/issues/219) +- Generate a Python module from multiple schemas (#235) -### Fixed +## v0.35.0 (2023-01-10) -## [0.34.1] - 2022-11-11 +### Feat -- include field `metadata` when using `faust` records [218](https://github.com/marcosschroh/dataclasses-avroschema/issues/218) +- model generator added (#227) +- self relationship schema generation + +feat: logicalTypes model generation + +feat: logical types model generator + +fix: field order, pascal case for class names + +fix: add class Meta support + +Co-authored-by: Marcos Schroh -### Added +## v0.34.6 (2023-01-06) -## [0.34.0] - 2022-11-01 +### Fix -- `typing.UnionType` support added [212](https://github.com/marcosschroh/dataclasses-avroschema/issues/212) +- use namespaces when an enum is used multiple times in a class. Cases should not apply to enum names. Closes #221 (#231) -### Added +## v0.34.5 (2023-01-06) -## [0.33.0] - 2022-11-01 +### Fix -- python 3.11 support added [215](https://github.com/marcosschroh/dataclasses-avroschema/pull/215) +- schema generation with optional enum when using pydantic. Closes #229 (#230) -### Fixed +## v0.34.4 (2023-01-04) -## [0.32.3] - 2022-10-31 +### Fix -- Logial types fixed. Update to `fastavro` 1.7.0 [214](https://github.com/marcosschroh/dataclasses-avroschema/pull/214) +- fake generation with optional user defined types (#228) -### Fixed +## v0.34.3 (2022-12-15) -## [0.32.2] - 2022-10-25 +### Fix -- Nested enums serialization [211](https://github.com/marcosschroh/dataclasses-avroschema/pull/211) +- serialize decimal fields. Closes #222 (#224) -### Fixed +## v0.34.2 (2022-11-18) -## [0.32.1] - 2022-10-13 +### Fix -- Use python __slots__ +- pydantic fake and nested json serialization (#219) -### Added +## v0.34.1 (2022-11-11) -## [0.32.0] - 2022-10-13 +### Fix -- Provide data to the fake functionality [205](https://github.com/marcosschroh/dataclasses-avroschema/pull/205) +- include field metadata when using faust records. Closes #217 (#218) -### Fixed +## v0.34.0 (2022-11-01) -## [0.31.3] - 2022-10-07 +### Feat -- utils refactor. @dataclass decorator included in all code examples. Inheritance example added. +- types.UnionType support added (#213) -### Fixed +## v0.33.0 (2022-11-01) -## [0.31.2] - 2022-10-03 +## v0.32.3 (2022-10-31) -- UnknownType on serialization with intermediates schemas [201](https://github.com/marcosschroh/dataclasses-avroschema/pull/201) +### Fix -### Fixed +- update to latest fastavro. logical types fixed (#214) -## [0.31.1] - 2022-09-30 +## v0.32.2 (2022-10-25) -- Name collision on splittes schema usage [198](https://github.com/marcosschroh/dataclasses-avroschema/pull/198). +### Fix -### Added +- nested enums serialization. Closes #208 (#211) -## [0.31.0] - 2022-09-23 +## v0.32.1 (2022-10-13) -- Micro precision added to time and datetime [197](https://github.com/marcosschroh/dataclasses-avroschema/pull/197). `TimeMicro` and `DateTimeMicro` field types added. +### Perf -### Fixed +- use python __slots__ (#206) -## [0.30.3] - 2022-08-05 +## v0.32.0 (2022-10-13) -- `typing` issues fixed [186](https://github.com/marcosschroh/dataclasses-avroschema/issues/186) +### Feat -### Fixed +- provide data to the fake functionality (#205) -## [0.30.2] - 2022-08-04 +## v0.31.3 (2022-10-07) -- Do not use name and type from metadata in avro schema [189](https://github.com/marcosschroh/dataclasses-avroschema/issues/189) +### Fix -### Fixed +- utils refactor. @dataclass decorator included in all code examples. Inheritance example added. Closes #202 (#204) -## [0.30.1] - 2022-08-02 +## v0.31.2 (2022-10-03) -- Dependency `fastavro` updated to close [184](https://github.com/marcosschroh/dataclasses-avroschema/issues/184) +### Fix -### Added +- UnknownType on serialization with intermediates schemas. Closes #199 (#201) -## [0.30.0] - 2022-05-18 +## v0.31.1 (2022-09-30) -- Raise `InvalidMap` exception when a `Dict` has not `string` keys -- Now it is possible to use `Meta.schema_doc` to set the `schema documentation` +### Fix -### Fixed +- name collision on splittes schema usage. Close #196 (#198) -## [0.29.2] - 2022-05-06 +## v0.31.0 (2022-09-23) -- Priority ordering for record field naming fixed [176](https://github.com/marcosschroh/dataclasses-avroschema/pull/176). `alias_nested_items` must have priority order - 1. Check if exists an alias_nested_items in parent class or Meta class of own model - 2. Check if the schema_name is present in the Meta class of own model - 3. Use the default class Name (self.type.__name__) +### Feat -### Fixed +- micro precision added to time and datetime types (#197) -## [0.29.1] - 2022-04-15 +## v0.30.3 (2022-08-05) -- Generate correct schema name [172](https://github.com/marcosschroh/dataclasses-avroschema/pull/172): - 1. Check if the schema_name is present in the Meta class of own model - 2. Check if exists an alias_nested_items in parent class or Meta class of own model - 3. Use the default class Name (self.type.__name__) +### Fix -## [0.29.0] - 2022-04-08 +- mypy issues (#186) -### Added +## v0.30.2 (2022-08-04) -- Created nested schema resolution directly from dictionaries using `parse_obj` [90](https://github.com/marcosschroh/dataclasses-avroschema/issues/90) +### Fix -## [0.28.1] - 2022-04-05 +- Do not use name and type from metadata in avro schema (#188) (#189) -### Fixed +## v0.30.1 (2022-08-02) -- `alias_nested_items` for `ListField` and `DictField` [158](https://github.com/marcosschroh/dataclasses-avroschema/issues/158) +### Fix -## [0.28.0] - 2022-03-23 +- fastavro dependency updated. Close #184 (#187) -### Added +## v0.30.0 (2022-05-18) -- [pydantic](https://pydantic-docs.helpmanual.io/) support added [163](https://github.com/marcosschroh/dataclasses-avroschema/pull/163) +## v0.29.2 (2022-05-06) -## [0.27.2] - 2022-03-23 +## v0.29.1 (2022-04-15) -### Fixed +### Fix -- Generate wheel package [162](https://github.com/marcosschroh/dataclasses-avroschema/pull/162) +- nested metadata not respected. closes #171 (#172) -## [0.27.1] - 2022-03-22 +## v0.29.0 (2022-04-08) -### Fixed +### Fix -- bump `fastavro` from 1.4.9 to 1.4.10 -- bump `inflect` from 5.3.0 to 5.4.0 +- create nested schema resolution directly from dictionaries (#170) -## [0.27.0] - 2022-02-18 +## v0.28.1 (2022-04-05) -### Added +### Fix -- `types.Enum` replaced by `enum.Enum` [153](https://github.com/marcosschroh/dataclasses-avroschema/pull/153/files) +- alias for nested items (#169) -## [0.26.1] - 2021-12-07 +## v0.28.0 (2022-03-23) -### Fixed +### Feat -- Use root reference to generate valid schemas in multiple inheritance levels [148](https://github.com/marcosschroh/dataclasses-avroschema/pull/148) +- pydantic support added (#163) -## [0.26.0] - 2021-12-06 +## v0.27.2 (2022-03-23) -### Added +### Fix -- `validate` method added to `AvroModel` [144](https://github.com/marcosschroh/dataclasses-avroschema/pull/144) +- rebuild cache (#164) -## [0.25.3] - 2021-11-26 +## v0.27.1 (2022-03-22) -### Fixed +## v0.27.0 (2022-02-18) -- Generate valid avro schemas when inheritance has multiple levels [140](https://github.com/marcosschroh/dataclasses-avroschema/pull/140) +### Feat -## [0.25.2] - 2021-10-09 +- add enum support (#153) -### Fixed +## v0.26.1 (2021-12-07) -- api `get_fields` now returns all rendered fields [134](https://github.com/marcosschroh/dataclasses-avroschema/pull/134) +### Feat -## [0.25.1] - 2021-10-09 +- manual job trigger (#146) -### Fixed +### Fix -- Support for default `null` decimals added [130](https://github.com/marcosschroh/dataclasses-avroschema/pull/130) +- use root reference to generate valid schemas in multiple inheritance levels (#148) +- cache and release expresion (#147) -## [0.25.0] - 2021-09-27 +## v0.26.0 (2021-12-06) -### Added +### Feat -- New style type annotations support added (`tuple`, `list` and `dict`) [122](https://github.com/marcosschroh/dataclasses-avroschema/pull/122) -- Case schemas added [95](https://github.com/marcosschroh/dataclasses-avroschema/pull/95) +- validate method added (#144) -Available cases: +### Fix -|Case| Example| -|----|--------| -|camelcase |'foo_bar_baz' # => "fooBarBaz"| -|capitalcase|'foo_bar_baz' # => "Foo_bar_baz"| -|constcase|'FooBarBaz' # => "_FOO_BAR_BAZ"| -|lowercase|'FooBarBaz' # => "foobarbaz"| -|pascalcase|'FooBarBaz' # => "FooBarBaz"| -|pathcase|'foo_bar_baz' # => "foo/bar/baz"| -|snakecase|'FooBarBaz' # => "foo_bar_baz"| -|spinalcase|'FooBarBaz' # => "-foo-bar-baz"| -|trimcase|'FooBarBaz' # => "FooBarBaz"| -|uppercase|'FooBarBaz' # => "FOOBARBAZ| -|alphanumcase|'Foo_123 Bar!' # =>'Foo123Bar'| +- some type checks (#143) +- mkdocs styles (#141) -## [0.24.0] - 2021-09-24 +## v0.25.3 (2021-11-26) -### Added +### Fix -- `int` and `float` Avro type support [119](https://github.com/marcosschroh/dataclasses-avroschema/pull/119) +- generate valid avro schemas when inheritance has multiple levels (#140) +- api get_fields now returns all rendered fields (#134) -## [0.23.2] - 2021-09-04 +## v0.25.1 (2021-10-06) -### Fixed +## v0.25.0 (2021-09-27) -- Use `namespaces` on repeated user types with complex types [117](https://github.com/marcosschroh/dataclasses-avroschema/pull/117) +### Feat -## [0.23.1] - 2021-09-03 +- case schemas. Closes #79 (#95) -### Fixed +### Fix -- Use `namespaces` for repeated types in arrays and maps [116](https://github.com/marcosschroh/dataclasses-avroschema/pull/116) +- new style type annotations don't work for containers and maps (#122) +- possible crash if no docs (#123) -## [0.23.0] - 2021-08-26 +## v0.24.0 (2021-09-24) -### Added +### Feat -- Use `namespaces` for repeated types [115](https://github.com/marcosschroh/dataclasses-avroschema/pull/115) -- Record names now are generated using `class.__name__` instead of `class.__name__.lower()_record` +- add `int` and `float` Avro type support (#119) -## [0.22.1] - 2021-07-05 +## v0.23.2 (2021-09-04) -### Fixed +### Fix -- Cleanup [112](https://github.com/marcosschroh/dataclasses-avroschema/pull/112) +- use namespaces on repeated user types with complex types (#117) -## [0.22.0] - 2021-07-01 +## v0.23.1 (2021-09-03) -### Added +### Fix -- Alias for nested items (`nested records`, `arrays` and `maps`) [110](https://github.com/marcosschroh/dataclasses-avroschema/pull/110) -- Improve type annotations [109](https://github.com/marcosschroh/dataclasses-avroschema/pull/109) +- using namespaces for repeated nested types in arrays and maps (#116) -## [0.21.0] - 2021-06-17 +## v0.23.0 (2021-08-26) -### Added +### Feat -- Mitration to GithubCI -- `GenericAlias` test in Python `3.9` -- Add Python `3.8` and `3.9` in the `CI build` -- Add `schema_name` attribute to `SchemaMetadata` -- Add optional writer_schema in `deserialization` +- use namespaces for repeated types (#115) -### Added +## v0.22.1 (2021-07-05) -## [0.20.4] - 2021-05-05 +## v0.22.0 (2021-06-30) -### Fixed +### Feat -- Unpin install_requires with version ranges [99](https://github.com/marcosschroh/dataclasses-avroschema/pull/99) +- alias nested schemas added (#110) -## [0.20.3] - 2021-04-29 +## v0.21.0 (2021-06-17) -### Fixed +### Fix -- Improve error message in unknown type: https://github.com/marcosschroh/dataclasses-avroschema/issues/88 -- dependencies updated +- github CI added (#106) -## [0.20.2] - 2021-01-27 +## v0.20.4 (2021-05-05) -### Fixed +## v0.20.3 (2021-04-29) -- avro-json serialization with defaults [89](https://github.com/marcosschroh/dataclasses-avroschema/pull/89) +### Fix -## [0.20.1] - 2020-12-04 +- dependencies updated (#97) +- Improve error message in unknown type (#94) +- generators fixtures replaced with container. Close #70 (#91) -### Fixed +## v0.20.2 (2021-01-27) -- Correct out-of-spec Avro schemas with typing.Union [#87](https://github.com/marcosschroh/dataclasses-avroschema/pull/87) +### Fix -## [0.20.0] - 2020-11-24 +- avro-json serialization with defaults (#89) -### Added +## v0.20.1 (2020-12-04) -- Support for decimal logical type added [#86](https://github.com/marcosschroh/dataclasses-avroschema/pull/86) +## v0.20.0 (2020-11-24) -## [0.19.0] - 2020-11-12 +## v0.19.0 (2020-11-12) -### Added +### Fix -- Default Avro type for Python ints has been changed from `int` to `long` and `float` to `double` [83](https://github.com/marcosschroh/dataclasses-avroschema/pull/83). Reason: - - [Integers have unlimited precision](https://docs.python.org/3.4/library/stdtypes.html#typesnumeric) - - Floating point numbers are usually implemented using `double` in C - - [almost all platforms map Python floats to IEEE-754 `double` precision](https://docs.python.org/3/tutorial/floatingpoint.html#representation-error) +- doc updated -## [0.18.0] - 2020-10-10 +## v0.18.0 (2020-10-10) -### Added +### Fix -- Allow multiple references to the same class in record relationships -- Correct name generation for nested records [81](https://github.com/marcosschroh/dataclasses-avroschema/pull/81) +- correct name generation for nested records (#81) -## [0.17.0] - 2020-09-04 +## v0.17.0 (2020-09-04) -### Added +### Feat -- Fake instances generation added +- fake class instances generation added (#77) -## [0.16.0] - 2020-08-27 +## v0.16.0 (2020-08-27) -### Added +### Fix -- Deserialization process generate class instances instead a pythn dict -- In order to get a python dict in the deserialiation process the flag `create_instance=False` should be used -- Example with usage with kafka drivers added +- isort (#71) -## [0.15.2] - 2020-08-25 +## v0.15.2 (2020-08-25) -### Fixed +### Fix -- `pytz` added as requirement +- pytz added as requirement (#69) -## [0.15.1] - 2020-08-22 +## v0.15.1 (2020-08-22) -### Fixed +### Fix -- `UUID` type fixed +- include UUID as field type (#68) -## [0.15.0] - 2020-08-16 +## v0.15.0 (2020-08-16) -### Added +### Fix -- replaced `null` string with `avro null` (json) -- code improvement +- use generic to_avro method for logical types (#66) +- replace 'null' str with avro null (json) (#65) -## [0.14.6] - 2020-07-11 +### Perf -### Changed +- check for dataclass.MISSING removed. coverage increased up to 99% (#61) -- `SelfReferenceField` when is used inn `array` and `maps` -- `SelfReferenceField` default value fixed +## v0.14.6 (2020-07-11) -## [0.14.5] - 2020-07-09 +### Fix -### Changed +- field SelfReference fixed (#59) -- `null` should not be included when a default value is defined for premitive types +## v0.14.5 (2020-07-09) -## [0.14.4] - 2020-07-03 +### Fix -### Changed +- null should not be included when a default value is defined (#58) -- `typing.Optional` union fixed -- `typing.Union` with complex types (sequeces and Dict) fixed +## v0.14.4 (2020-07-03) -## [0.14.3] - 2020-06-29 +### Fix -### Changed +- union with complex type fixed. union with optional types fixed. close #51. (#56) -- documentation of `dataclasses.field` descriptor added -- support for aware datetime added -- `serialization` fixed for complex types +## v0.14.3 (2020-06-29) -## [0.14.2] - 2020-06-16 +### Fix -### Changed +- refactor logical types (#54) +- support for aware datetime added (#53) +- serialization for complex types (#49) -- `to_json` method fixed. [issue 47](https://github.com/marcosschroh/dataclasses-avroschema/issues/47) +## v0.14.2 (2020-06-16) -## [0.14.1] - 2020-06-09 +### Fix -### Changed +- pytest dependency updated (#46) -- bytes type fixed -- null with Schema Logical Types and Relationships supported +## v0.14.1 (2020-06-09) -## [0.14.0] - 2020-06-01 +### Fix -### Added +- bytes type fixed (#42) -- inheritance approach adopted over composition +## v0.14.0 (2020-06-01) -### Removed +## v0.13.1 (2020-05-28) -- SchemaGenerator class +### Fix -## [0.13.1] - 2020-05-29 +- enum field refactored in order to include other enum attributes (#37) -### Changed +## v0.13.0 (2020-05-25) -- `enum` type now is represented by `types.Enum` +### Feat -## [0.13.0] - 2020-05-28 +- generate json payload from class instance accroding to the avro schema generated (#36) -### Added +## v0.12.0 (2020-05-25) -- json payload generated from class instance +### Fix -## [0.12.0] - 2020-05-25 +- schema-generator import improved (#35) -### Added +## v0.11.1 (2020-05-20) -- import of SchemaGenetor improved -- Documentation updated +### Feat -## [0.11.0] - 2020-05-20 +- serialization added (#34) -### Added +### Fix -- Serialization/deserialization added +- fastavro included as dependencie +- development scripts updated. (#33) -## [0.10.0] - 2020-02-16 +## v0.10.0 (2020-02-16) -### Added +### Feat -- fixed type support +- fixed type support added (#32) -## [0.9.0] - 2020-01-24 +## v0.9.0 (2020-01-24) -### Added +### Fix -- Ability to store metadata into fields -- More type checks -- isort package added +- isort added. more mypy types added. WIP mypy checks (#30) +- Correct license to MIT in setup.py (#29) -## [0.8.0] - 2020-01-06 +## v0.8.0 (2020-01-06) -### Added +## v0.7.4 (2019-11-21) -- Support `typing.Optional` added +### Fix -## [0.7.4] - 2019-11-21 +- **Avro-Array**: Handle union inside array field. Closes #21 -### Changed +## v0.7.3 (2019-11-16) -- Union types can be included in sequences types +### Fix -## [0.7.3] - 2019-11-16 +- **typing.Dict**: Include LogicalTypes as values +- **typing.List**: Include LogicalTypes as items +- Code refactor and first steps to support logicaltypes in sequences and maps -### Changed +## v0.7.2 (2019-11-07) -- Logical types now are allowed in Sequences and Maps +### Fix -## [0.7.2] - 2019-11-07 +- Union type allow logical and primitive types -### Changed +## v0.7.1 (2019-10-25) -- Union type now allows logical and primitive types +### Fix -## [0.7.1] - 2019-10-21 +- Support for Sequences and Mapping added -### Changed +## v0.7.0 (2019-10-23) -- Support for Sequences and Mappings added +### Feat -| Avro Type | Python Type | -|-----------|-------------| -| arrays | typing.Sequence, typing.MutableSequence | -| maps | typing.Mapping, typing.MutableMapping | +- Generate Avro Schemas from Faust Records -## [0.7.0] - 2019-10-23 +## v0.6.1 (2019-10-21) -### Added +### Fix -- Faust support: Now is possible to generate Avro Schemas from a Faust Records +- Validate default values when the avro schema is generated -## [0.6.1] - 2019-10-21 +## v0.6.0 (2019-10-17) -### Changed +### Feat -- Now default values are validated according to the field type +- Union support added -## [0.6.0] - 2019-10-17 +### Fix -### Added +- mkdocs fixed -- Avro Union support added +## v0.5.0 (2019-10-13) -## [0.5.0] - 2019-10-13 +### Feat -### Added +- **LogicalTypes**: Support for Date, Time, Datetime and UUID added -- Support for some logical types +## v0.4.1 (2019-10-11) -| Avro Type | Logical Type |Python Type | -|-----------|--------------|-------------| -| int | date | datetime.date -| int | time-millis | datetime.time | -| long | timestamp-millis | datetime.datetime | -| string | uuid | uuid.uuid4 | +### Fix -## [0.4.1] - 2019-10-11 +- Fields refactor -### Changed +## v0.4.0 (2019-10-05) -- Code refactor: Field have been devided into several field classes to make the code more redeable +### Feat -## [0.4.0] - 2019-09-02 +- Self relationship OneToOne added +- Self relationship OneToMany added +- Self relationship OneToMany finished. Factory Pattern used in SchemaGenarator and AvroSchemaDefinition -### Added +## v0.3.1 (2019-09-05) -- Recursive Schema Relationships: - - Recursive OneToOne relationship added - - Recursive OneToMany relationship added +## v0.3.0 (2019-09-03) -## [0.3.0] - 2019-09-05 +### Feat -### Changed +- Singular names are generated for array, map chilndren's namea nd enum -- Code refator and improvements +## v0.2.0 (2019-09-02) -## [0.3.0] - 2019-09-03 +### Feat -### Added +- OneToMany schema relationship added. -- Singular name for array's child name -- Singular name for map's child name -- Singular name for nested relationship OneToMany +## v0.1.1 (2019-09-02) -## [0.2.0] - 2019-09-02 +### Feat -### Added +- One To Many relationship added +- One to One schema relationship added +- Travis added -- Schema Relationships: - - OneToOne relationship added - - OneToMany relationship added (array and map) +### Fix -## [0.1.1] - 2019-09-02 +- Default values for Map and Array +- Map, Array and Enum types fixed. Schema Parse tests added with fastavro +- License added +- mkdocs links updated -### Added +## v0.1.0 (2019-08-29) -- Enum, Array and Map fields fixed -- Schema Parse tests added using fastavro +### Feat -## [0.1.0] - 2019-08-29 +- clean & publish scrips added. Docs added +- avro_schema method added to SchemaGenerator class. Doc added. +- Aliases and Namespaces avro check added -### Added +### Fix -- First release +- clean & publish scripts should be executables +- Exclude default type only when is a tuple +- The avro schema returned should be string, not a python dict. +- Package renamed to dataclasses_avroschema diff --git a/pyproject.toml b/pyproject.toml index 46f6c04b..f0db53e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "dataclasses-avroschema" -version = "0.57.1" +version = "0.57.2" description = "Generate Avro Schemas from Python classes. Serialize/Deserialize python instances with avro schemas" authors = ["Marcos Schroh "] license = "MIT" @@ -98,7 +98,7 @@ unfixable = [] "tests/model_generator/test_model_generator.py" = ["E501"] [tool.commitizen] -version = "0.57.1" +version = "0.57.2" tag_format = "$version" version_files = [ "pyproject.toml:version",