129 Commits

Author SHA1 Message Date
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
Dan
5429e7da7d All enumerated lists used in web forms should contain a single value, not a dictionary of value/labels.
Removing the spreadsheet.value.column and data.value.column so we just have value.column for both.
Improving the __str__ function in the ApiError class, to make debugging a little easier.
Adding a "validate_all" flask command, to help us track down any issues with current workflows in production (use this in concert with sync_with_testing)
Fixed logs of tests.
removed fact_runner.py, a very early and crufty bit of code.
2021-10-19 10:13:43 -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
alicia pritchett
ea4e382f06 Fixing some tests 2021-10-06 15:24:58 -04:00
mike cullerton
da894219c5 Changes to tests after removing name column from workflow_spec and workflow_spec_category tables. 2021-10-05 14:20:03 -04:00
alicia pritchett
d5d4496cd0 Admin flag on category + migration + updated test 2021-09-29 16:53:59 -04:00
Dan Funk
e4add14193
Merge pull request #378 from sartography/bug/246_user_ldap_refactor
Bug/246 user ldap refactor
2021-09-22 15:31:34 -04:00
Dan Funk
deff293fff
Merge pull request #376 from sartography/bug/468_missing_file_date
fixes #448 - Missing  file date
2021-09-22 15:29:32 -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
mike cullerton
deb3d7bf67 Updated for short_name and proposal_name
Also cleaned up some for readability
2021-09-17 11:59:02 -04:00
mike cullerton
444e3fa76d Merge branch 'dev' into zip-documents-379 2021-09-14 09:39:19 -04:00
mike cullerton
cd3d17862a Add task_spec_name to a bunch of tests 2021-08-26 10:43:28 -04:00
mike cullerton
35285a0b60 Fixed tests that broke from the new irb_documents spreadsheet 2021-08-26 08:51:52 -04:00
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