Dan
4305b36b74
Removed total_tasks and completed_tasks - as they are no longer used by the front end, and were dubious as hell to begin with.
...
Upraded SpiffWorkflow and now use th new get_subprocess_specs
updated the calculate_stats in the workflow processor - as the serialization had changed drastically, and needed to debug some performance issues.
Added a get_navigation method that will calcuate a basic navigation list MUCH faster than using the get_flat_nav_list in Spiffworkflows Navigation object.
Modified a hellton of tests because we don't have total_task and completed_task counts, or a complex nested navigation list anymore.
2022-07-20 12:10:23 -04:00
mike cullerton
644629fbc8
Bug deleting a study
2022-07-12 15:07:19 -04:00
Dan Funk
d434602f55
Merge pull request #551 from sartography/chore/current-user-changes-755
...
Chore/current user changes #755 and lane permissions #737
2022-06-03 15:45:49 -04:00
mike cullerton
6911ab7aae
Fixes for failing tests after removing current_user
from task data
2022-05-31 16:53:15 -04:00
mike cullerton
251ff921ff
clean up imports
2022-05-26 13:36:10 -04:00
mike cullerton
95c915a434
Remove code that doesn't let master workflow set state and state_message for admin sandbox workflows
...
Remove test for this feature
2022-05-26 13:35:30 -04:00
mike cullerton
132a140d5a
Make sure the Master Workflow doesn't change the state for workflows in an Admin Sandbox
2022-05-24 15:33:56 -04:00
mike cullerton
4297c78a4e
This is tested in test_get_study_updates_workflow_state
2022-05-12 10:11:25 -04:00
mike cullerton
d053dd8652
Clean up imports
...
Turn tests back on
2022-05-12 10:09:17 -04:00
mike cullerton
b10fdac32c
Create run_master_spec method in BaseTest
2022-05-12 10:06:57 -04:00
mike cullerton
0eff50ca13
Add state_message to test
2022-05-09 09:08:52 -04:00
mike cullerton
d8ae719489
We don't need to run _update_status_of_workflow_meta any more
...
But, it returned warnings to the front end for debugging
Ticket 733 was created to address this.
Fix the warnings and return them again.
This also broke the tests in test_study_status_message, so we skip them for now
2022-05-06 14:13:02 -04:00
mike cullerton
c28e9a5bdd
Make sure we update workflow state when processing the master workflow
2022-05-06 14:09:23 -04:00
mike cullerton
8f2aea3922
Test that ProgressStatus is set to finance_in_progress
when StudyStatus is set to open_for_enrollment
2022-04-26 15:30:56 -04:00
mike cullerton
fbe9f5a17b
DocumentModel => FileModel
...
document_id => file_id
clean up imports
2022-04-19 15:07:05 -04:00
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
mike cullerton
27c2b95f31
Pass update_status=True in the test when calling the get_study api endpoint
...
This allows master_workflow_results to be set, which allows categories to be processed in StudyService.get_study()
2022-03-18 17:01:36 -04:00
Dan
e44ea6e13c
merging in from dev.
2022-03-18 16:22:33 -04:00
mike cullerton
81e3da043c
Fix tests
2022-03-18 16:05:16 -04:00
Dan
a401c41b23
Setting a minimum date for which to import studies.
...
Merging in code to improve performance of calculating percent complete for a study.
Assureing we have a primary investigator for the front page (another merge)
2022-03-18 15:27:45 -04:00
Dan
b7489aea43
merging in PI Name changes from Alicia's #499 PR.
2022-03-18 12:30:20 -04:00
alicia pritchett
5f802a3e79
oops
2022-03-18 12:09:56 -04:00
alicia pritchett
b9b8210f8a
rm pi id refs
2022-03-18 12:04:20 -04:00
alicia pritchett
b6b28ed127
fix tests remove pi id
2022-03-18 11:56:56 -04:00
Dan
ef5aca4fe4
ReviewType now comes back with the user studies, so we don't need to make an additional query to get it.
2022-03-18 09:59:10 -04:00
mike cullerton
199fe0626a
Assert that if we get null
for DATELASTMODIFIED, we use the value in DATECREATED
2022-03-17 15:56:44 -04:00
alicia pritchett
5b7e71d42d
meta field for categories
2022-03-16 12:49:35 -04:00
Dan
2fc4b44ef3
Create a path to directly download the spreadsheet file (and avoid the weird dance on the front end of making an API call to get file data.)
...
Fixing pagination. Seems the front end uses a page_index that is 0 based, and sqlAlchemy prefers to start at 1.
2022-03-12 16:19:07 -05:00
mike cullerton
a536a79e87
Test for downloading logs
2022-03-12 14:29:02 -05:00
mike cullerton
ec9ff4ff8a
*** WIP ***
...
Need to finish writing tests
2022-03-10 12:19:41 -05: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
0ad9843569
Dealing with some changes in SpiffWorkflow's latest release. I think this gets all tests passing again, and behaving as expected.
2022-02-16 10:46:46 -05:00
Dan
093741fa90
By default the system will start up the scheduled tasks, which is usually what you want, but in development
...
it can be kind of irritating for this stuff to be spinning up when you are trying to debug something, so just set
PROCESS_WAITING_TASKS to false in instance/config.py and voila!!
2022-02-15 14:07:09 -05:00
Dan
df3f67601c
performance improvements. and last rements of load_example_data()
2022-02-09 23:29:39 -05:00
Dan
788e40a998
death to load_example_data() !!!!!
2022-02-09 22:13:02 -05:00
Dan
f12c4aba52
Refactor the workflow_spec_service so it doesn't cache anything, it always reads what it needs from the file system.
2022-02-09 21:06:55 -05:00
Dan
5773eb99f3
fixing study status.
2022-02-09 12:36:16 -05:00
Dan
de6d7eee84
nearly all study tests work.
2022-02-09 12:03:45 -05:00
Dan
cc915ac25a
refactoring the study service.
2022-02-09 08:50:00 -05:00
alicia pritchett
a4fb00b0ed
remove bad imports
2022-02-07 15:28:52 -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
68820c67cb
Removed (almost) all references to WorkflowSpecDependencyFile
...
(There is still a call in the lookup service, but we need to decide how to fix that)
2022-01-19 16:12:54 -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
b99ed73951
Remove unused imports
2022-01-12 15:00:26 -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
9785a2fe5a
Updated for new ProtocolBuilderCreatorStudy model and schema
...
Added with `session.no_autoflush` to stop rollback during test
2021-12-06 14:42:34 -05:00
mike cullerton
d08b2a8562
Updated for new ProtocolBuilderCreatorStudy model and schema
...
Removed unused imports
2021-12-06 14:40:56 -05:00