Commit graph

3860 commits

Author SHA1 Message Date
Lance Edgar d3c2744193 Tweak repr(BatchMixin) output.
Not real sure why, just felt like it I guess.
2016-02-14 16:29:53 -06:00
Lance Edgar f7d18987ee Update changelog. 2016-02-11 21:20:30 -06:00
Lance Edgar 98da38980e Tweak some wording on data import warnings email template. 2016-02-11 21:19:12 -06:00
Lance Edgar 7adcdba3f3 Make sure message recipients are unique. 2016-02-11 18:48:41 -06:00
Lance Edgar a93045c74c Update changelog. 2016-02-10 15:20:03 -06:00
Lance Edgar eda662ae6f Tweak logging, warning template for new data importers.
This hopefully makes things clearer, since we now have so many of these
things in so many directions...
2016-02-10 15:18:37 -06:00
Lance Edgar a5fdaf6d44 Update changelog. 2016-02-08 19:44:27 -06:00
Lance Edgar 49bd4b7c40 Make config object's db session somewhat configurable.
This is for the sake of Tailbone, so it can leverage its scoped sessions
instead of creating a bunch of new ones and exhausting the pool...
2016-02-08 19:42:44 -06:00
Lance Edgar 7ceee98d46 Update changelog. 2016-02-08 15:36:37 -06:00
Lance Edgar ae33303d89 Fix bug in Rattail->Rattail import handler. 2016-02-08 15:35:56 -06:00
Lance Edgar b84c4c0c39 Update changelog. 2016-02-08 14:32:02 -06:00
Lance Edgar 7d5a8e1a3d Tweak "import changes" email warnings, so deleted instances are in context. 2016-02-08 14:25:19 -06:00
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