22 Commits

Author SHA1 Message Date
mike cullerton
b304b4725b Merge branch 'dev' into file-refactor-705 2022-04-14 11:40:08 -04:00
mike cullerton
19da7ecd7e Fix test workflows to use new data_store scripts 2022-04-13 18:07:13 -04:00
mike cullerton
d5ed949ed6 FileModel => DocumentModel
Remove unused imports
2022-04-13 08:31:18 -04:00
Dan
3442655bd1 Performance Improvements:
1. Avoid ever re-generating the list of scripts that can be used in a script task.  Terribly expensive as we call eval constantly, and it never ever changes once the app starts. (see script.py changes, and comments)
2. Cache the DocumentStatus list in the flask session, so we calculate it at most once per API Call.  It's at least .25 seconds per call.  (see study_sevice)
3. We called UserFileService.get_files_for_study (which runs a db query EVERY time) for every possible document type.  Now we run the query once (study service line 321)
4. When returning a workflow, we looped through every single task in that workflow's navigation, and called the expensive spiff_task_to_api_task just to figure out it's proper display name. We run a much faster and more efficient method to calculate the display name naow (see workflow_service on lie 680, and 799)
5. A hellton of @timeit and sincetime() calls, that I want to leave in, to help debug any slowness on production.
2022-02-24 14:25:42 -05:00
Dan
b72ecb8375 Another re-work to fix 619 - and to assure that we aren't rebuilding the lookup tables too frequently. 2022-02-17 11:59:48 -05:00
Dan
788e40a998 death to load_example_data() !!!!! 2022-02-09 22:13:02 -05:00
Dan
4ec6e403f5 1. Created a UserFileService, so it's clear what we use when for File Services, UserFiles, SpecFiles, and ReferenceFiles each function differently.
2. Reference Files and Spec Files are written to disk, they do not exist in the database at all.
2022-02-02 12:59:56 -05:00
mike cullerton
88a8c96bd6 The reference document is already created in load_example_data
This lead to a failing test after cleaning up the way we add/update files
2022-01-12 15:07:57 -05:00
mike cullerton
4df2ed6ce4 *** WIP ***
Failing tests, and missing functionality.
Committing to get stuff on Github.
2022-01-11 15:30:22 -05:00
mike cullerton
cd3d17862a Add task_spec_name to a bunch of tests 2021-08-26 10:43:28 -04:00
Dan
4e0e162fd6 Removing the execution flag Nile keeps adding to files. 2021-08-17 09:50:57 -04:00
nilez
0a232dace6 assertEquals -> assertEqual 2021-08-16 10:25:41 -04:00
nilez
b9d4f6c436 assertEquals -> assertEqual 2021-08-16 10:18:29 -04:00
nilez
d20b68e483 Fixed Deprecation Warnings in Test Files 2021-08-12 12:33:27 -04:00
NWalker4483
a73d1794eb Fixed Associate API Endpoint description 2021-07-22 14:09:24 -04:00
Dan
1b1a994360 Refactoring Reference files to use the lookup table, rather than parsing the results directly out of the spreadsheet, or attempting to cache them.
Adding a DocumentService to clean up the FileService, and get Documents well seperated, as it seems likely be pulled out or seperated in the future, there is now a Documents api file as well, for the same reason.
Some other minor changes are just fixing white space to assure our code is linting correctly.
I removed _create_study_workflow_approvals from the base test, as we don't use approvals like this anymore.
2021-07-06 13:10:20 -04:00
Kelly McDonald
a5d67bb245 337 partial fix
if the user calls the file_data_set function for a valid file with the key 'irb_code' and a value of a valid IRB document code, then we should set the irb code on the file.
2021-05-27 12:24:30 -04:00
Dan
8e37f27399 Assure that any data store values associated with a file come back as a part of the get_study_data[documents
] endooint.
2021-05-14 15:52:25 -04:00
Dan
501487b31c Assure we convert to box for validations as well, and test the bloodly snot out of this. 2021-04-05 12:47:50 -04:00
Dan
727aa72e18 Fix a bug from recent performance improvments - be sure that our study info script returns dicts that can be referenced immediately with dot notation, as this is a common pattern in our bpmn script tasks. 2021-04-05 11:31:06 -04:00
Carlos Lopez
cef7c48be2 Adding tests 2020-08-10 21:18:41 -06:00
Carlos Lopez
ddf1f4640c Re-organizing tests file structure 2020-06-17 16:10:06 -06:00