Commit Graph

22 Commits

Author SHA1 Message Date
Dan 5e97953c19 Merge branch 'dev' into xls-xlsx-issue-540 2021-11-16 15:59:06 -05:00
Dan 8e2e3519f6 fixes to our tests related to updates in SpiffWorkflow 2021-11-16 15:57:37 -05:00
mike cullerton df0800f071 New test and xls file for failing test 2021-11-16 11:57:24 -05:00
Dan 5429e7da7d All enumerated lists used in web forms should contain a single value, not a dictionary of value/labels.
Removing the spreadsheet.value.column and data.value.column so we just have value.column for both.
Improving the __str__ function in the ApiError class, to make debugging a little easier.
Adding a "validate_all" flask command, to help us track down any issues with current workflows in production (use this in concert with sync_with_testing)
Fixed logs of tests.
removed fact_runner.py, a very early and crufty bit of code.
2021-10-19 10:13:43 -04:00
Dan 07eb3f9ca8 Moving metrics into SpiffWorkflow so we can run the performance metrics deeply across both systems simultaniously.
Upgrading libraries.
Fixing deprication issue with Pandas and numpy.
We can only process xlsx files now, plain oldschool xls is fully removed.
2021-06-18 16:41:55 -04:00
Dan 576aebab19 Sometimes a workflow can be completely broken and unloadable. For instance, it starts off with a engine step / script task that will not execute. So the failure happens the second it is processed. When calling reset on a workflow, we should catch the failure, and reset the workflow, so we aren't trapped in an unrecoverable state.
To do so, I changed the WorkflowProcessor's reset method to be static, it will try to instantiate the current workflow and execute a cancel_notify event, but if that fails, it will continue and always return a new workflow processor using the latest spec.
2021-03-09 11:52:55 -05:00
Dan ecfc2ee761 a slightly better test. 2021-03-02 14:15:29 -05:00
Dan aac3d5c16e Bug #255, this requires the front end to pass in the name of the task, when doing a lookup. This will prevent a bug where we have multiple user tasks, with enum fields that set the same variable, but use different lookup tables to populate the dropbown or search feature. 2021-03-01 14:54:04 -05:00
mike cullerton 7e76639cf3 When a study is put on hold, we now reset workflows and call any pending cancel_notify events.
In api.study.update_study we test the study status and call the new WorkflowService method process_workflows_for_cancels.
In services.workflow_service we added the new method process_workflows_for_cancels. It loops through workflows for a study, and resets them if they are in progress.
In services.workflow_processor, we changed the reset method to be an instance method so we can call self.cancel_notify.
In tests.test_lookup_service we changed the call to WorkflowProcessor.reset to reflect the change from class method to instance method
2021-01-29 14:05:07 -05:00
Dan 41dac33039 Removed two tests around soft_reset that are no longer required.
Reset should construct the workflow_processor, thus completing the reset process.
Removed the spec argument from init, as it is never used anywhere.
2021-01-20 13:24:53 -05:00
Dan Funk e29134a019 fixing a few tests realted to stop words. 2020-08-13 18:35:24 -04:00
Dan Funk 32d1036041 Cleaning up the tests. 2020-08-13 18:15:10 -04:00
Dan Funk 9a5c1d7cfb I may have finally wrapped my head around full text search in python. Now properly using an index based on simple rather than english dictionary which has far fewer stop words and stemming processes and plays much better to the type ahead search we are trying to provide.
Stop words are no longer excluded, so "other" is a valid search and gets a result.
2020-08-13 18:13:41 -04:00
Dan Funk 93bf46354b A last minute change to make the API a little clearer and cleaner broke some tests. 2020-06-30 11:12:28 -04:00
Dan Funk d3ce1af1ce Provides some basic tools for getting additional information about a lookup field.
Adds an optional 'id' parameter to the lookup endpoint so you can find a specific entry in the lookup table.
Makes sure the data attribute returned on a lookup model is a dictionary, and not a string.
Fixes a previous bug that would crop up in double spaces were used when performing a search.
2020-06-30 10:00:22 -04:00
Carlos Lopez a6758fd555 Removing deprecation warnings 2020-06-05 12:08:46 -06:00
Dan Funk 5046d3a669 Committed a stupid. 2020-05-29 15:20:22 -04:00
Dan Funk 4e4cc7884c Better ldap searching. 2020-05-29 15:17:51 -04:00
Dan Funk 11413838a7 Faster lookup fields. We were parsing the spec each time to get details about how to search. We're just grabbing the workflow id and task id now and building that straight into the full text search index for faster lookups. Should be peppy.
Another speed improvement - data in the FileDataModel is deferred, and not queried until it is specifically used, as the new data structures need to use this model frequently.
2020-05-29 01:39:39 -04:00
Dan Funk 77f72e408f Lookup Service now raises exact matches to the top. Very hackish, but it works. 2020-05-27 14:36:10 -04:00
Dan Funk d5e075db82 Order search results by relevancy in the lookup service. 2020-05-27 09:47:44 -04:00
Dan Funk 951710d762 ldap lookup.
Refactored calls into a new lookup_service to keep things tidy.

New keys for all enum/auto-complete fields:
    PROP_OPTIONS_FILE = "spreadsheet.name"
    PROP_OPTIONS_VALUE_COLUMN = "spreadsheet.value.column"
    PROP_OPTIONS_LABEL_COL = "spreadsheet.label.column"
    PROP_LDAP_LOOKUP = "ldap.lookup"
    FIELD_TYPE_AUTO_COMPLETE = "autocomplete"
2020-05-19 16:11:43 -04:00