Commit Graph

84 Commits

Author SHA1 Message Date
Dan 7a8eeab820 Merge branch 'dev' into bug/missing_pi_name_246 2021-08-17 11:16:03 -04:00
Dan 4e0e162fd6 Removing the execution flag Nile keeps adding to files. 2021-08-17 09:50:57 -04:00
mike cullerton 3f44c202ca Merge branch '417-hsr-open-to-enrollment-bug' into 426-remove-hsr-number 2021-08-16 12:55:24 -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 f8dd4c3eb9 Check Study Associates Endpoint 2021-08-16 09:32:02 -04:00
mike cullerton febcb1ac5b Clarified my comments 2021-08-13 12:36:43 -04:00
mike cullerton 58119c8969 Modified `test_get_all_studies` so they don't fail looking for studies that are open for enrollment
We will soon have a new way to automatically set study status to `Open for Enrollment`, so I left the failing tests there and commented them out for now.
2021-08-13 12:32:11 -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
nilez d20b68e483 Fixed Deprecation Warnings in Test Files 2021-08-12 12:33:27 -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 a73d1794eb Fixed Associate API Endpoint description 2021-07-22 14:09:24 -04:00
mike cullerton 69974e89fd Added 2 simple tests for filtering by REVIEW_TYPE 2021-07-09 11:39:30 -04:00
mike cullerton 445d3e5f0b Added mocked pb study_details since we now check whether a study has valid REVIEW_TYPEs 2021-07-09 10:41:46 -04:00
Dan fb54edac1c Adding additional details to error messages, and cleaning up the cruft around these messages to keep them clear and succinct.
Most noteable is the addition of the line on which the error occurs for script tasks.  It will report the line number and pass back the content of
the line that failed.
The validator only returns the first error it encounters, as it's clear that all we ever get right now is two of the same error.
Did a lot of work between this and spiffworkflow to remove all the places where we obfuscate or drop details as we converted between workflowExceptions and APIExceptions.
Dropped the python levenshtein dependency, in favor of just rolling a simple one ourselves in Spiffworkflow.
2021-07-07 00:53:49 -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 61ad371680 Clean up the file api so we don't have a bunch of extra stuff in there. Just include the raw data from the document spraedsheet if it is available. 2021-06-22 15:08:08 -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 Funk 9c4994581d
Merge pull request #324 from sartography/modify-infinite-loop-312
Modify infinite loop #312
2021-06-08 10:30:13 -04:00
Dan Funk 37d4e7cc79
Merge pull request #318 from sartography/340-update_study_associate_change
Add test and fix to make sure that an empty study associates list (or…
2021-06-08 08:52:44 -04:00
mike cullerton 9dc5871848 Added mocked PB data for tests using study_info script. 2021-06-07 10:08:44 -04:00
mike cullerton 37ba46fb8f These tests now require PB Mock because of the validate_study_id changes 2021-06-03 14:30:00 -04:00
Kelly McDonald 8c04e228e9 Add test and fix to make sure that an empty study associates list (or a blank list) will effectively clear the extra study associates 2021-06-01 11:46:43 -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 8f28970f92 Resolving an alembic conflict.
Upgrading libraries, and resolving issues from that upgrade, including changes to how we manage tokens.  This seems to be working locally.
2021-05-04 13:39:49 -04:00
Dan Funk d6054a9846
Merge branch 'dev' into 310-task-event-timezone 2021-05-04 11:21:36 -04:00
Kelly McDonald 2b9cee6b89 Update database to include timezone and change all points where we set the time on an event to be utc time. If we get something in the database with a timezone, it will display properly on the front end, but by default everything will be put in the database in UTC 2021-04-29 10:25:28 -04:00
Mike Cullerton 39fcab3730
Merge branch 'dev' into launch-workflow-outside-study-204 2021-04-26 10:27:32 -04:00
mike cullerton 7cca559747 Fixed issue where we were passing in a workflow_api instead of a workflow when completing a form in tests. 2021-04-26 08:58:09 -04:00
Kelly McDonald e2197ddab9 Changes to support the frontend data pane
fixes #277 and requires frontend branch 277-document-pane
2021-04-20 08:12:27 -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
Kelly McDonald 116bf5e7aa Merge branch 'dev' into 263-optimize-dashboard
# Conflicts:
#	crc/services/study_service.py
2021-03-31 10:20:33 -04:00
Kelly McDonald 60f5be1aef Check in - pending change from @cullerton 2021-03-30 12:10:49 -04:00
Dan ac4877fecf Merge remote-tracking branch 'origin/dev' into master-workflow-status-messages-222 2021-03-26 17:47:57 -04:00
mike cullerton 3ee8109535 Tests for the changes to master workflow status dictionary
Test for each valid WorkflowState
Test for all three failure states; not in status, not a dictionary, not a valid state.
2021-03-22 17:52:14 -04:00
mike cullerton 70efdb4788 The `do_task_validate_only` method in the `get_study_associates` script now returns a mocked list of associates.
It used to return `True`, and this caused shield validation to fail when looping over the results of `get_study_associates`.
(You can't loop over a boolean)

Added a for loop in `study_sponsors_associate.bpmn` to test for this.
Moved `BaseTest` import to the top of `test_study_associate_script` because debug was failing.
2021-03-16 08:57:30 -04:00
Dan 80ff8a6212 Allows us to delete a study even if there are emails, and associated study users connected to that study. 2021-03-09 13:31:26 -05:00
Kelly McDonald 06dedd8a32 Add short_title to study, change update_study task to use kw arguments and add the short_title to the update_study script 2021-03-02 10:03:53 -05:00
Kelly McDonald 0b08a95e25 Add test and make sure that the API endpoint does the right thing when we switch users - checks both associated with access and associated with no access 2021-02-25 12:20:43 -05:00
Kelly McDonald a1814a7727 Add some additional comments - just to be clear 2021-02-25 11:40:08 -05:00
Kelly McDonald 55f8825b3c Make sure we are testing both versions of the setting functions as well as the getting functions 2021-02-25 09:14:24 -05:00
Kelly McDonald f592a8a0b0 Added a few more tests - I think I need to test one more script endpoint 2021-02-25 09:07:46 -05:00
Kelly McDonald 9bd3aa8dcb service and scripts with working test - still needs a few more tests to try out, but should work to get Mike going 2021-02-24 12:55:23 -05:00
Dan Funk 53fa49e668
Merge pull request #243 from sartography/183-remove-study-approval-code
Remove Approvals per ticket 183
2021-02-22 18:12:02 -05:00
Kelly McDonald 003bf2f9b9 Remove Approvals per ticket 183 2021-02-16 09:05:29 -05:00
mike cullerton 777cfbdecd We now test whether we have a valid StudyModel when getting a study by study model.
We raise an ApiError if the model is None or empty.
2021-02-09 17:37:55 -05:00
mike cullerton f9e4b6a972 Test and workflow for the new code. We test the correct cancel notify is called, and only when appropriate. 2021-01-29 14:09:42 -05:00
mike cullerton 80d2009573 Modified the test to cover hold, abandon, and open_enrollment. These are tickets 21 and 94 2020-12-31 10:40:27 -05:00