Commit Graph

704 Commits

Author SHA1 Message Date
Aaron Louie 0f04b1dd79 Forces PB_ENABLED to be a boolean, because environment variables always come through as a string 2020-05-27 08:35:04 -04:00
Dan Funk 397cb23b52 Is true "true", yes it is true. So true, is "false", so true, it is true. 2020-05-26 23:38:57 -04:00
Dan Funk 0025931a2e Trying hard to figure out why the DCOS servers think the protocol builder is enabled. 2020-05-26 23:18:14 -04:00
Dan Funk 7869fa596e Protocol Builder isn't disabled on the dcos servers, trying to figure out why, and assure it isn't some sort of weird race condition. 2020-05-26 22:42:49 -04:00
Dan Funk eb15d172c1 I absolutely must fix our cascade deletes, but I sort of like the horror such chunks of code cause, we really need to protect these endpoints, and assure they never get called under normal circumstances, and raise some thoughtful errors. 2020-05-26 21:18:09 -04:00
Aaron Louie 0e973b988a Merge branch 'dev' into rrt/production 2020-05-26 21:03:56 -04:00
Dan Funk ccbf374b40 Loads of bug fixes.
Modifed the request_approval to take a list of arguments, which works better for us... today.
UpdateStudy correctly handles validation.
WorkflowService correctly populates random values from lookup tables.
And several fixes down in Spiffworkflow, including a big bug where only the last item in a decision table made it through.
2020-05-26 20:06:50 -04:00
Dan Funk e9645fa3fd Renamed redirect_url to just redirect. 2020-05-26 15:47:41 -04:00
Dan Funk 987790164e use redirect, not redirect_url. 2020-05-26 15:09:57 -04:00
Dan Funk f576c0ecb6
Merge pull request #78 from sartography/feature/approval_request
Feature/approval request
2020-05-26 14:41:12 -04:00
Carlos Lopez 7ed9411c74 Handling unavailability of ldap connection 2020-05-26 11:29:24 -06:00
Carlos Lopez 72b59deeaf Completing tests 2020-05-26 10:21:36 -06:00
Dan Funk eb92ee9fb6 Adding missing migration. 2020-05-25 23:47:40 -04:00
Dan Funk c7fc6649ed oh my goodness it's late, and I hate docker containers sometimes. 2020-05-25 22:52:36 -04:00
Dan Funk 25adf47277 converting integers to ints, cause that's nice. 2020-05-25 22:47:11 -04:00
Dan Funk 0792aa40a5 Can't override travis settings if you do it with the testing file. 2020-05-25 22:28:33 -04:00
Dan Funk cbaedad0f6 have testing respect the environment variables if they are set, so we can set them in travis, and use the testing environment there. 2020-05-25 22:02:06 -04:00
Dan Funk a14168362a Merge branch 'feature/support_ui_dashboard' into dev 2020-05-25 21:31:16 -04:00
Carlos Lopez 1231b963d0 Enabling ldap lookup 2020-05-25 17:30:16 -06:00
Carlos Lopez 727274ae33 Using full approval payload to update record 2020-05-25 15:40:24 -06:00
Dan Funk 13186176ba Improved LDAP searches, allow filtering on last name as well as uva id. 2020-05-25 16:00:36 -04:00
Dan Funk be057e8758 Adding an "UpdateStudy" task that is able to update the data on the study model, useful for setting core data points on the model, such as setting the Primary Investigator, or altering the Study Title.
Fixing a bug where the validation of forms did not correctly process auto-complete fields.
Fixing a bug where the approvals script and the update study script could not process dot notation correctly.

Moved populate_random_data into the WorkflowService where it makes more sense.
2020-05-25 15:30:06 -04:00
Dan Funk d80a6af754 Disabling the Protocol Builder, and getting the rrt data correct. 2020-05-25 12:53:56 -04:00
Dan Funk 6cd4ef64d1 Fixing add_study api endpoint, so you can actually add a new "Study" with just some basic information.
Using the LDAP service for checking user details in development mode - even if you are using the back door.
Added a new Flask fucntion load-example-rrt-data that loads the rrt workflow, and not the CRC wrokflows.
Modified the "load-example-data" in the tests to use some test data, rather than loading up all the workflows[
in CRC each time, with a parameter to load crc data if that is required - which is enabled for just a handful of tests.
(Tests run in 1/4 the time now)
2020-05-25 12:29:05 -04:00
Aaron Louie 20cb35778c Ugh. Typo. 2020-05-25 12:26:17 -04:00
Aaron Louie d1eba27ee0 Fixes root path bug 2020-05-25 11:41:53 -04:00
Aaron Louie 14a2e4b5fa Sets path to flask app in docker_run 2020-05-25 00:47:49 -04:00
Aaron Louie cb2613feee Fixes all the paths and routing errors 2020-05-24 23:09:12 -04:00
Aaron Louie d9d1367556 Runs as root (for now) 2020-05-24 21:09:55 -04:00
Aaron Louie 00255ce2a0 Forgot a backslash 2020-05-24 21:01:02 -04:00
Aaron Louie 532e6b8433 Starts gunicorn, passing port and base href path 2020-05-24 20:58:19 -04:00
Aaron Louie b1718078ff Refactors Dockerfile again. Installs gunicorn. Don't run gunicorn until the container starts up. 2020-05-24 20:53:25 -04:00
Aaron Louie 5ec97dc68d Goes back to default install location. Copies files to the right spot 2020-05-24 18:29:45 -04:00
Aaron Louie 0f48d6c81e Installs the app in the right place (maybe?) 2020-05-24 17:18:56 -04:00
Dan Funk 971d9a58e9 As we now have an approval_service.py, I moved all the business logic into this service and out of the request_approval.py script. And moved all tests for these features into a test file for the service. Will make it easier to cross reference what is happening, as everything all happens in one file.
As many of the scripts need to know the workflow, and it's down in a weird parameter, moved this so it is passed in each time.
2020-05-24 16:13:15 -04:00
Aaron Louie 52208d9c8a Adds wait-for-it script 2020-05-24 14:53:48 -04:00
Aaron Louie 28c254a106 Fixes path to static directory 2020-05-24 14:11:53 -04:00
Aaron Louie baaf73b5d9 Bumps Python version to 3.7 2020-05-24 13:43:12 -04:00
Aaron Louie be1d54bbc5 Builds Docker image as WSGI + gunicorn 2020-05-24 12:37:11 -04:00
Carlos Lopez e9bd19b112 Fixing broken test 2020-05-24 01:22:14 -06:00
Carlos Lopez 49eb4b3f98 Making working endpoints for approvals 2020-05-23 23:53:48 -06:00
Aaron Louie 4eaee57076 Apparently, APPLICATION_ROOT does something. 2020-05-24 00:05:13 -04:00
Aaron Louie 68084a84cf Adds base href environment variable. Sets base path for API and all routes from BASE_HREF environment variable. 2020-05-23 22:07:22 -04:00
Carlos Lopez e5e7eb3dd3 Fixing broken tests by making version parameter optional in get file data endpoint 2020-05-23 15:37:03 -06:00
Dan Funk d5c91e575f stuff that might be broken. 2020-05-23 15:21:30 -04:00
Aaron Louie 4584dda992 Merge branch 'dev' into rrt/dev 2020-05-23 15:13:03 -04:00
Dan Funk d39ef658a2 Made some modifications to the Approval so that it knows exactly what versions of every file are being sent for approval
Added the following columns:
  * date_created - so we know when the file was created
  * renamed workflow_version to just "version", because everything has a version,  this is the version of the request.
  * workflow_hash - this is just a quick way to see what files and versions are associated with the request, it could be factored out.
  * study - a quick relationship link to the study, so that this model is easier to use.
  * workflow - ditto
  * approval_files - these is a list from a new link table that links an approval to specific files and versions.

The RequestApproval is logically sound, but still needs some additional pieces in place to be callable from a BPMN workflow diagram.

Altered the file service to pick up on changes to files vs adding new files, so that versions are picked up correctly as
users modify their submission - adding new files or replacing existing ones.  Deleting files worries me, and I will need to revisit this.

The damn base test keeps giving me a headache, so I made changes there to see if clearing and dropping the database each time won't allow the tests to pass more consistently.

Lots more tests around the file service to make sure it is versioning user uploaded files correctly.

The "Test Request Approval Script" tries to find to assure the correct behavior as this is likely to be called many times repeatedly and with little knowledge of the internal system.  So it should just "do the right thing".
2020-05-23 15:08:17 -04:00
Aaron Louie 6c14248ef9 Adds 'v1.0/' to login route 2020-05-23 14:49:02 -04:00
Aaron Louie 20bf01a888 Adds cascade to study relationship so data loader doesn't freak out. 2020-05-22 22:04:11 -04:00
Aaron Louie 00955723b0 Merge branch 'rrt/dev' into dev 2020-05-22 20:29:21 -04:00