Commit graph

2622 commits

Author SHA1 Message Date
Lance Edgar ee2055e1bd Avoid data type bug for customer order batch row refresh 2021-01-27 08:49:50 -06:00
Lance Edgar d6f004376d Initial support for adding items to, executing customer order batch 2021-01-26 20:09:43 -06:00
Lance Edgar 137b52ee37 Update changelog 2021-01-25 11:39:03 -06:00
Lance Edgar 7c8746fc8b Fix some discrepancies in primary vs. version table schema 2021-01-23 19:26:40 -06:00
Lance Edgar 780c179ee4 Add webapi.conf file for use with rattail make-config 2021-01-23 14:10:17 -06:00
Lance Edgar a7f150e3b5 Fix syntax bug in docstring 2021-01-21 19:26:49 -06:00
Lance Edgar 98a70f8825 Fix typo 2021-01-21 17:52:55 -06:00
Lance Edgar 27af5e8937 Add "Units of Measure" table, and mapping logic in products handler 2021-01-21 17:36:45 -06:00
Lance Edgar 9ebc910636 Add generic FromRattailConsumer base class for datasync 2021-01-20 20:28:30 -06:00
Lance Edgar 011f256008 Set self.model when constructing a DataSyncConsumer 2021-01-20 20:27:36 -06:00
Lance Edgar 24745516bb Don't use list for Product.shopfoo_product type relationships
surely a list would never make sense here?
2021-01-20 20:26:48 -06:00
Lance Edgar 8d355fb89c Avoid meaningless flushes within importer main loop
previously, if there were 0 created/updated, it would flush.  now it will only
flush if created or updated are nonempty
2021-01-20 20:25:45 -06:00
Lance Edgar e1f5285e9b Set self.model when constructing new Importer 2021-01-20 20:25:21 -06:00
Lance Edgar f60a717efc Show import vs. export direction in warnings/diff email 2021-01-20 20:24:00 -06:00
Lance Edgar 89e4355d85 Add new batch type for deleting products 2021-01-19 12:18:38 -06:00
Lance Edgar d4d82fa802 Add basic dev bootstrap for new projects 2021-01-19 11:23:35 -06:00
Lance Edgar 760a0ef72c Fix nullable bug when generating new table feature 2021-01-18 01:15:34 -06:00
Lance Edgar 511edac568 Add basic support for defining columns when generating new table feature 2021-01-18 00:32:04 -06:00
Lance Edgar 37eb1ec564 Add feature to generate new features...
at least that's the idea.  probably requires a web UI to be useful
2021-01-17 12:07:56 -06:00
Lance Edgar fd043c4c2f Fix tox config for building docs 2021-01-15 15:20:29 -06:00
Lance Edgar 129934d1c8 Add AppHandler.get_report_handler() and improve related docs a bit 2021-01-15 15:14:22 -06:00
Lance Edgar 585b00475b Tweak borg requirement for 'backup' extra
per latest borg docs.  i had encountered an issue with pip 20.3.3 and its "new
resolver" although not real clear how related that was.
2021-01-13 13:06:30 -06:00
Lance Edgar b97ffd2cc2 Add some default logic to FromFile importer base
for sake of identifying the input file
2021-01-01 09:52:41 -06:00
Lance Edgar 84c130be46 Update changelog 2020-12-15 20:06:17 -06:00
Lance Edgar 006203b3ba Add basic model, importer for IFPS PLU Codes 2020-12-06 19:34:38 -06:00
Lance Edgar b4efa5f4b5 Update changelog 2020-12-04 17:50:13 -06:00
Lance Edgar 28302b4afd Add 'datadir' to sample config files 2020-12-04 15:35:49 -06:00
Lance Edgar ff4149b989 Add basic structure for "Board Handler" feature 2020-12-02 14:12:20 -06:00
Lance Edgar 37fa532a5c Add phone_number_is_invalid() method to app handler 2020-12-02 11:09:06 -06:00
Lance Edgar 46367a6bc4 Update changelog 2020-12-01 20:04:24 -06:00
Lance Edgar 130c9d4df5 Add new "app handler" concept, w/ handlers for employment, clientele
more to come for this, but should be a reasonable starting point
2020-11-30 18:46:11 -06:00
Lance Edgar c0d4721dfb Update changelog 2020-11-24 10:31:19 -06:00
Lance Edgar 04578b4b11 Refresh product record, when attaching new price via importer 2020-11-23 11:19:14 -06:00
Lance Edgar 562ea54b31 Add vendor catalog parser for Equal Exchange 2020-10-23 22:08:12 -05:00
Lance Edgar 498130b27f Update changelog 2020-10-14 19:05:13 -05:00
Lance Edgar 8be4fd7b0a Simplify how certain "list" data is cleared, when importing to Rattail
this is the 2nd commit which tries to "fix" this use case, since apparently the
last "fix" didn't quite do it.  i wish i'd done a better job with its commit
message b/c now i don't recall the details behind that code diff..  anyway here
are the notes for this one:

i had an importer for Person which included 'email_address' field, and source
data had no email for a certain person, which meant it was to be cleared out of
the target (Rattail) side.  with the most recent changes in place, this was
sometimes working (it seemed?) but definitely sometimes not, in which case was
seeing an error like:

      File "/srv/envs/milo/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2533, in _flush
        assert _reg, "Failed to add object to the flush context!"
    AssertionError: Failed to add object to the flush context!

searching for that ultimately led me to this old ticket:
https://github.com/sqlalchemy/sqlalchemy/issues/4040

so then it looked like my approach to clearing out the list must be
wrong (since it was the only recent change which could explain the new error),
and i searched for "how it should be done" which sort of led me to this:
https://stackoverflow.com/a/29908201

and here we are
2020-10-14 18:57:32 -05:00
Lance Edgar 207aaf4419 Update changelog 2020-10-13 17:03:00 -05:00
Lance Edgar d36fd56e4b Allow datasync to export to rattail but *not* record changes
sometimes the "record changes" feature is desirable in all but 1 case, which is
real-time datasync, when such changes are "one way only" and have no need to
boomerang back to the originating system, and trying to do so can result in
misc. race conditions which are better avoided
2020-10-13 17:02:57 -05:00
Lance Edgar a2fd5fca23 Stop creating separate 'batch' folder for rattail make-appdir
that needs to exist underneath 'data' folder instead
2020-10-06 22:24:33 -05:00
Lance Edgar 8f1b2f1d96 Delay an import, for sake of windows 2020-10-06 22:19:35 -05:00
Lance Edgar 5eb0747d90 Stop trying to use win32 api to know "default config paths"
at least for now, let's not worry if "Python for Windows Extensions" is not
installed
2020-10-06 22:17:00 -05:00
Lance Edgar 2ac8f3a9ed Lower log level to avoid some nightly noise 2020-10-06 12:01:18 -05:00
Lance Edgar 879fc2f1e5 Log warning instead of assertion error, if runas_user doesn't exist
within context of X -> Rattail importer, in local/target session
2020-10-05 18:46:57 -05:00
Lance Edgar e18250faff Fix a downgrade bug in alembic migration
this probably never would have come up again, but did for me today
2020-10-03 21:28:07 -05:00
Lance Edgar 6fa69a8dc9 Update changelog 2020-10-02 19:33:30 -05:00
Lance Edgar 2dc05860e7 Make sure model extension tables are eagerly joined for Rattail importing
had several model importers which weren't inheriting base functionality
2020-10-02 19:05:19 -05:00
Lance Edgar 88ac8c491a Load "runas user" into current session, for X -> Rattail importers
in particular, this is helpful when assigning runas user as author of new
export records, etc.  otherwise runas user would be from other/stale session
2020-10-02 15:40:37 -05:00
Lance Edgar 7c9be5142d Fix how record associations are removed for rattail importing 2020-09-30 18:09:19 -05:00
Lance Edgar c378969357 Update changelog 2020-09-24 13:53:35 -05:00
Lance Edgar 11e4479fc4 Fix variable name bug in Excel report 2020-09-24 13:51:34 -05:00