alicia pritchett
c18bc6f876
fix study service
2022-03-16 16:21:02 -04:00
alicia pritchett
5b7e71d42d
meta field for categories
2022-03-16 12:49:35 -04:00
alicia pritchett
829c810807
wip
2022-03-15 13:21:58 -04:00
alicia pritchett
37d92c6a5f
WIP ~ adding a category metadata object
2022-03-15 10:49:41 -04:00
Dan
483d7e858b
Improved Errors - Pick up on the new task_trace information in WorkflowException and pass it on through the api.
...
Also: All script tasks should raise WorkflowTaskExecExceptions - NOT APIExceptions - this is because our scripts are executed by Spiff (not the other way around) so the errors need to pass fluidly through spiff, and come back to use THEN we can convert them to APIErrors. Otherwise we lose all kinds of good information about the error.
2022-03-14 16:00:53 -04:00
Dan
4ab314c7b8
Be sure to delete the data store items when you delete a study.
2022-03-12 13:38:09 -05:00
Dan
3944d00e88
Removing an unused / rogue variable.
...
Adding a logger warning for very large workflow json data.
2022-02-25 09:59:41 -05:00
Dan
e61ca471db
remove all the @timeit from method calls.
2022-02-24 21:06:22 -05:00
Dan
dde8873c9e
1. defer the loading of the bpmn_json when loading the workflow model. It can be stupidly larger. (see models/workflow.py)
...
2. Shave a little more time off the reset by not re-creating the whole WorkflowProcessor
cleaning up all the firsttime/sincetime statements.
2022-02-24 20:56:57 -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
3704279f20
Quick fix, assure we can reset studies.
2022-02-17 14:07:33 -05:00
Dan
3993297360
minor fixes to the study api to get things working locally when we pull down a database from testing.
2022-02-10 18:19:57 -05:00
Dan
eb7760fa55
Adding the migration - very destructive, but required for running the app.
...
minor fixes - there is still some weird problems with study id and user id being null that I need to track down, but the issue is sporadic, and hard to track down.
2022-02-10 11:50:31 -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
mike cullerton
65d6728be7
pass specs to _add_all_workflow_specs_to_study
2022-02-08 15:03:00 -05:00
Dan
2383c7d76d
WIP - lots of random changes, trying to swtich over
2022-02-04 14:50:31 -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
9cc91f92c3
*** WIP ***
...
cleanup - removing commented code
2022-01-11 15:55:08 -05:00
mike cullerton
dc27f795c8
*** WIP ***
...
Committing because it is Friday afternoon, and my computer is acting flaky
2022-01-07 15:34:51 -05:00
mike cullerton
9cd5022bf0
Set progress_status to in_progress when creating a new study.
...
-- I'm not sure if this is what we want.
2021-12-10 16:00:33 -05:00
mike cullerton
8813098190
Updated to use new ProtocolBuilderCreatorStudy model and schema
2021-12-06 14:37:42 -05:00
Dan
455c1035f1
Performance upgrade to script.py - reduce the number of times we generate the augmented list of script functions for running python evals.
...
Performance upgrade to study_service.py - Don't query on the whole WorkflowModel, just get the status that we need. Saves lots of complex joins.
Performance upgrade to SpiffWorkflow - don't convert to box unless we have to do so.
2021-11-29 17:48:05 -05:00
mike cullerton
a8b7cd8bba
Merge branch 'dev' into test-protocol-builder-519
2021-11-10 16:32:34 -05:00
alicia pritchett
aa1ba59bb1
Delete Task log model when deleting a study
...
just a minor fix
2021-11-09 10:42:47 -05:00
mike cullerton
b193f56f35
Minor cleanup for readability.
2021-11-08 10:13:07 -05:00
mike cullerton
6f09b0d7dd
Added comment to _is_valid_study.
...
Fixed get_required_docs. The data returned for get_required_dcs from UVA PB was *very* different than what we had.
2021-11-05 14:37:41 -04:00
mike cullerton
6d548c2a74
*** WIP ***
...
Committing to work on another ticket
There are TODOs in study_service
2021-11-05 09:59:14 -04:00
Dan
fdce91507c
Improve the warning messages that come back when running the master workflow spec.
2021-10-07 14:43:38 -04:00
mike cullerton
10abf51f70
Added workflow_spec_id to WorkflowMetadata model, because the id is the workflow id, not the workflow_spec id.
...
Then, we use workflow_spec_id in StudyService when looking for workflow status.
2021-10-07 10:02:13 -04:00
mike cullerton
572ca1db6b
Fixes for backend code after removing name
column from workflow_spec
and workflow_spec_category
tables
2021-10-05 14:17:41 -04:00
Dan
19104303de
Refactor of the way we store and return details about users - All the details about a user, or individual associated with a study is returned within in an Ldap model. I've removed duplication between these models. This required some cleanup of the tests, and a migration that will drop the user details.
2021-09-22 13:16:25 -04:00
Dan
4b591a076f
Adding importlib-resournces as a dependency, which is suddenly failing on Travis, likely due to different versions of Python as I try to upgrade to 3.9
2021-09-21 14:36:57 -04:00
Kelly McDonald
76f8f5984e
Fixes #413
...
Fixes #423 where a library was showing up in a study workflow
Alex said this used to work, but I don't see where I ever edited the code that needed a filter.
2021-08-19 10:47:13 -04:00
Dan
7a8eeab820
Merge branch 'dev' into bug/missing_pi_name_246
2021-08-17 11:16:03 -04:00
mike cullerton
bd4a9cced3
We no longer use HSRNUMBER to automatically set Study Status to Open for Enrollment
2021-08-13 12:06:27 -04:00
nilez
4a2581e938
get studies raises and error when invalid studies are the only studies associated with the user
2021-08-12 14:03:44 -04:00
nilez
e32c1db4c8
Merge remote-tracking branch 'origin/dev' into bug/missing_pi_name_246
...
# Conflicts:
# crc/models/study.py
# crc/services/study_service.py
# crc/services/workflow_service.py
# tests/study/test_study_associate_script.py
2021-08-12 12:59:15 -04:00
Dan
848c2e622f
Always use a schema to define what is being returned, it enforces consistency of the API and internally we can depend on well defined objects.
2021-08-10 16:16:08 -04:00
NWalker4483
38b8c7fcdf
Fixed email_cc test
2021-07-22 15:08:28 -04:00
NWalker4483
a73d1794eb
Fixed Associate API Endpoint description
2021-07-22 14:09:24 -04:00
NWalker4483
4632c6374f
Merge branch 'dev' into bug/missing_pi_name_246
...
# Conflicts:
# crc/api.yml
# crc/services/study_service.py
2021-07-20 11:44:11 -04:00
Mike Cullerton
522ca9d164
Merge pull request #340 from sartography/bug/better_errors_on_scheduled_tasks
...
Assure we log reasonably clear errors when executing scheduled tasks …
2021-07-12 10:13:02 -04:00
Dan
f982745d32
fixing a failing test, don't assume the study and workflow ids will always be 1.
2021-07-12 10:00:39 -04:00
mike cullerton
dad2de9f0c
get_user_studies now checks study_details['REVIEW_TYPE'] before displaying a study.
...
This corresponds to REVIEWTYPENAME being `Full Committee`, `Expedited`, `Non-UVA IRB Full Board`, or `Non-UVA IRB Expedited`
2021-07-09 10:37:25 -04:00
Dan
a9805ad40c
Adding some documentation for clarity.
2021-07-06 14:40:20 -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
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
Mike Cullerton
668e2f4e3c
Merge pull request #313 from sartography/feature/add_file_data_store_properties_to_file
...
Assure that any data store values associated with a file come back as…
2021-05-14 16:30:35 -04:00