Commit graph

3398 commits

Author SHA1 Message Date
Lance Edgar 2c221a6fb9 Add Importer.prioritize_2() method. 2016-02-08 14:24:52 -06:00
Lance Edgar a4b00bd9f4 Tweak some ORM mappings, to support cascading deletes. 2016-02-08 14:24:11 -06:00
Lance Edgar e46803dfbc Add Subdepartment.products relationship.
For the sake of clearing FK's when deleting a subdepartment.
2016-02-07 21:36:12 -06:00
Lance Edgar 4d7f7adae4 Various tweaks to new importer system.
* Add `args` to `ImportSubcommand.get_handler_factory()`.
* Add `Importer.cache_model()` method.
* Add `Importer.get_deletion_keys()` method.
* Add `Importer.int_()` method.
2016-02-07 19:09:39 -06:00
Lance Edgar 44e06ab5ec Fix support for 'full_name' field in employee data importer. 2016-02-06 21:28:11 -06:00
Lance Edgar f9a5473f0e Let importers define their key attribute as a simple string. 2016-02-06 21:27:37 -06:00
Lance Edgar 6fd6e62d54 Add new base class for SQLAlchemy import handlers. 2016-02-06 21:27:11 -06:00
Lance Edgar b4d63d9236 Add new importing framework, yay! 2016-02-06 18:54:04 -06:00
Lance Edgar 000b795fb0 Add Message.has_recipient() method. 2016-02-05 14:41:32 -06:00
Lance Edgar 30a84767c9 Update changelog. 2016-02-04 17:50:27 -06:00
Lance Edgar 4f950c6954 Add metadata kwarg to the topographical sortkey function maker. 2016-02-04 17:48:20 -06:00
Lance Edgar 30e968b980 Tweak how changes are sorted by class name, in Rattail datasync consumer. 2016-02-04 17:48:01 -06:00
Lance Edgar 9ad3c8e312 Update changelog. 2016-02-02 19:53:28 -06:00
Lance Edgar b8ebe65f15 Tweak how Person.display_name is handled during data import.
Also optimize some queries, etc.
2016-02-02 19:04:10 -06:00
Lance Edgar 9e15c9e3c6 Change how we sort dependencies when processing datasync changes for rattail.
Now hopefully this works...  This makes use of SQLAlchemy's own topological
sort logic, which it maintains for its "unit of work" pattern.  Surely this
will be safe, but it hasn't seen much testing yet...
2016-02-02 19:02:36 -06:00
Lance Edgar 275f70755d Update changelog. 2016-02-02 12:08:21 -06:00
Lance Edgar 4411f83e2b Add recursion support to table dependency sorter function.
The main problem scenario we came up against was that given a starting
sequence of ('ProductPrice', 'Subdepartment') the previous sort logic was
not able to recognize the dependency since it was indirect.  This change
should be good enough for some time, but may still need some improvement...
2016-02-02 12:05:50 -06:00
Lance Edgar 4a13dfb2bb Check for null password before attempting bcrypt authentication. 2016-02-01 16:15:07 -06:00
Lance Edgar 4dee8beace Update changelog. 2016-02-01 11:24:55 -06:00
Lance Edgar ece3d8218a Increase field size for Change.class_name. 2016-02-01 11:23:57 -06:00
Lance Edgar 40c27deaf4 Fix import bug in fablib. 2016-01-31 18:04:41 -06:00
Lance Edgar 5cb3cd4540 Update changelog. 2016-01-30 16:33:33 -06:00
Lance Edgar 0529ae705b Record change on employee when store/dept association are deleted. 2016-01-30 15:13:13 -06:00
Lance Edgar 41bbb6070b Add EmployeeStore association model, with import. 2016-01-30 15:12:18 -06:00
Lance Edgar b5d073fe2b Sort department associations by name, by default. 2016-01-30 15:11:22 -06:00
Lance Edgar be2f7dd241 Fix log message bug, if instance has no UUID. 2016-01-30 15:10:29 -06:00
Lance Edgar d2f5a1fff6 Update changelog. 2016-01-22 14:47:52 -06:00
Lance Edgar e7a59fe9f3 Make upgrade of pip optional when doing mkvirtualenv() via fabric. 2016-01-21 20:50:52 -06:00
Lance Edgar c91219d549 Change how a vendor catalog batch gets its vendor, etc.
The parser no longer is required to declare a vendor "key", which means
something "above" the handler layer (i.e. tailbone) must provide the
vendor.  Also set a friendly status text when there's a cost update.
2016-01-21 19:58:07 -06:00
Lance Edgar 3b8aaa0c5b Tweak how vendor catalog parsers interpret decimal values. 2016-01-21 19:57:13 -06:00
Lance Edgar c28b6b065b Give vendor catalog rows a default description of empty string. 2016-01-21 19:56:18 -06:00
Lance Edgar 9f8c7184a4 Update changelog. 2016-01-18 19:15:56 -06:00
Lance Edgar 272fe76ce5 Add new EmployeeDepartment model, and importer.
Also update some convenience properties, i.e. `User.employee` and such.
2016-01-17 19:41:14 -06:00
Lance Edgar ada704250f Add import normalizers for Department and Employee models. 2016-01-17 19:40:25 -06:00
Lance Edgar 53cfef1f5f Only update Employee fields which are officially part of the import.
Probably still have a lot of other models which need this...
2016-01-17 19:37:02 -06:00
Lance Edgar 9476c1abbe Refactor some usage of sqlalchemy.orm.joinedload etc.
Just trying to be consistent.
2016-01-17 19:34:54 -06:00
Lance Edgar 326921eb75 Only compare 'effective' fields when checking data diff during import. 2016-01-17 19:29:23 -06:00
Lance Edgar 191e648642 Add temp hack to avoid Person.modified when doing a data dump.
This 'dump' idea probably needs to be replaced with a proper and
configurable 'export' instead, at some point.
2016-01-17 18:00:59 -06:00
Lance Edgar d66b10a202 Update changelog. 2016-01-17 12:59:34 -06:00
Lance Edgar 3ecfd810c2 Remove progress kwarg from importing setup() method.
Dang, missed this one earlier..
2016-01-17 12:57:52 -06:00
Lance Edgar 2ea0680e3e Update changelog. 2016-01-13 16:41:54 -06:00
Lance Edgar cb34af518f Add Importer.normalizer_class attribute.
So subclasses don't have to define.
2016-01-13 15:14:53 -06:00
Lance Edgar 0ed5cc4b2f Update changelog. 2016-01-13 13:18:04 -06:00
Lance Edgar 5375b96821 Add initial rattail->rattail data importer.
This has a long way to go yet...
2016-01-13 02:34:15 -06:00
Lance Edgar 0312941b04 Add initial 'messages' support in schema/import. 2016-01-13 02:34:15 -06:00
Lance Edgar 63b9f25aaf Add 'normalizer' concept to data importer. 2016-01-13 02:34:10 -06:00
Lance Edgar ace54ef4ee Change how 'ignored' models are handled for rattail datasync consumers. 2016-01-13 02:29:35 -06:00
Lance Edgar 07c91a6732 Remove progress kwarg from db importing setup() methods. 2016-01-13 02:29:30 -06:00
Lance Edgar b6854ea684 Don't use db when fetching timezone from config. 2016-01-13 02:06:00 -06:00
Lance Edgar 7216586225 Remove Python 2.6 from supported versions in trove classifiers. 2016-01-13 02:05:19 -06:00