Releases: GetmeUK/MongoFrames
Fixed issue where empty dictionaries were not converted to SubFrame instances
1.2.12 Version bump
Fix to allow $meta projections
1.2.11 Fix to allow $meta projections
Fix for pymongo version in dependencies
As Collation is now passed through the standard mongoframes import the pymongo dependency need to be updated (thanks to the @TheGent for flagging this).
Additional pymongo pass-throughs in the base __init__
Added additional pymongo pass-thoughs in the base init for convenience: Collation, GEOSPHERE, TEXT.
Fixes for nullify and pull
Nullify and pull now work as documented (and intended).
Support for sorting shortcuts
New features
- The
$sub.
projection keyword now supports for dictionaries containing list values not just dictionary values. - New functionality added to make sort by instructions easier to define, e.g:
articles = Article.many(Q.published == True, sort=SortBy(Q.published_date.desc, Q.title))
Requirements update
Updated the setup requirements to use Faker which was renamed from fake-factory.
Lambda maker now receives current document as first argument
1.2.5 Lambda maker now receives the current document as the first argument.
Target document support
This really should have been a minor release instead of a bug fix version increment as it breaks compatibility with previous releases - however since the changes relate entirely to the factory model which is not currently documented or promoted we should be safe as I believe that's only being used internally at Getme.
Changes:
- Presets have been removed as a concept from factories (with hindsight they were more trouble than they were worth).
- Added
document
property to makers which is set to the current target document when blueprints are using makers to assemble or finish a document.
Reassemble
Support for reassembling fields in previously assembled documents/dictionaries has been added to the Factory
and Blueprint
classes. This helps make it simpler to update fake data with new instructions without having to assemble everything from scratch which is more time consuming and can break existing tests.