aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility
AgeCommit message (Collapse)Author
2020-09-17Apply pep8BonfaceKilz
* wqflask/utility/hmac.py: Apply pep8 and fix typo.
2020-09-16Apply pep8BonfaceKilz
* wqflask/utility/authentication_tools.py: Apply pep8 formatting to file.
2020-09-16Remove unnecessary if branchBonfaceKilz
* wqflask/utility/authentication_tools.py (check_resource_availability): Combine if statements into one boolean check in one if branch.
2020-08-31Fixed issue that was causing updating resource default privileges to notzsloan
work * wqflask/utility/redis_tools.py - There was an issue where resources wouldn't be updated if they already existed. This is because the code didn't yet account for the "update" tag (that is meant to give the option of preventing updating resources when running the script to enter all resources into Redis). I changed the logic to add a resource if "update" is True or the resource doesn't already exist (so it won't if update is False and the resource exists).
2020-08-29Fixed issue where exporting traits would throw an error if a dataset'szsloan
group didn't have an InbredSetCode set in the DB * wqflask/utility/authentication_tools.py - Changed get_group_code to return an empty string instead of None if InbredSetCode doesn't exist for a dataset group * wqflask/wqflask/views.py - Changed zipped export filename to "export_(datetime)" instead of "collection_(datetime)" since this export can occur from both the collection page and the global search page
2020-08-24Remove unused importsBonfaceKilz
* wqflask/utility/Plot.py: Remove unused imports like "numarray". "numarray" is does not have py3 support so it's important to remove references to it.
2020-08-24The function draw_rotated_text_ was writing an image to /tmp, which GN2zsloan
user apparently doesn't have access to, so I replaced it with a link to the dynamically set TEMPDIR * wqflask/utility/pillow_utils.py - Replaced "/tmp/" in image location with TEMPDIR
2020-08-08Add draw_open_polygon() utilityMuriithi Frederick Muriuki
* wqflask/utility/pillow_utils.py: New method.
2020-08-08Use draw_rotated_text()Muriithi Frederick Muriuki
Use the new draw_rotated_text() function to draw the text rotated as was formerly done. * wqflask/utility/Plot.py (plotBar): Use draw_rotated_text(). * wqflask/wqflask/marker_regression/display_mapping_results.py: (DisplayMappingResults) Use draw_rotated_text().
2020-08-08Create new utility module for drawingMuriithi Frederick Muriuki
* wqflask/utility/pillow_utils.py: Create a module to hold some utility functions for drawing with Pillow. Initialise the module with a function to draw rotated text.
2020-08-08Fix font pathsMuriithi Frederick Muriuki
* wqflask/utility/Plot.py: Update font paths. * wqflask/fonts/ttf: Update font files.
2020-08-08Migrate code from Piddle to PillowMuriithi Frederick Muriuki
* wqflask/wqflask/marker_regression/display_mapping_results.py: Add font files (DisplayMappingResults): Update the code from the Piddle way of things to the Pillow way of things, for example, replace: - pid.drawRect(...) with im_drawer.rectangle(...) - pid.drawString(...) with im_drawer.text(...) - pid.drawPolygon(...) with im_drawer.polygon(...) etc. * wqflask/utility/Plot.py: Migrate code from the older, unsupported Piddle to the newer Pillow library.
2020-07-29Fixed error that occured for new resources in check_adminzsloan
* wqflask/utility/authentication_tools.py: the code forgot to get resource_info when a resource wasn't in Redis yet, causing an error when it was referenced, so I added a line getting the resource info (and also a couple comments for other lines related to authentication)
2020-07-25The variable is never defined, so let's default to "none"Pjotr Prins
2020-07-24Merge pull request #409 from BonfaceKilz/Build/add-testszsloan
Build/add tests
2020-07-24Revert "Add work-around for failed imports in unittest"BonfaceKilz
This reverts commit d5e87fa6fe7546b46790f512d984a5501223082f.
2020-07-24Add work-around for failed imports in unittestBonfaceKilz
* wqflask/utility/tools.py: Unittests will use `from wqflask.wqflask import app` and the gn2 script will use `from wqflask import app`
2020-07-24Apply autopep-8BonfaceKilz
* wqflask/utility/formatting.py: apply it
2020-07-24Add zero to num_repr dictionaryBonfaceKilz
* wqflask/utility/formatting.py(numify): Update `num_repr` to have a zero
2020-07-24Remove redundant variableBonfaceKilz
* wqflask/utility/corr_result_helpers.py(normalize_values_with_values): Remove `num_overlap`
2020-07-24Remove unused assertBonfaceKilz
* wqflask/utility/corr_result_helpers.py(normalize_values): At no one point will that assert be hit
2020-07-24Remove unused doc-testsBonfaceKilz
* wqflask/utility/corr_result_helpers.py: Delete doc-test
2020-07-24Simplify normalize_valuesBonfaceKilz
* wqflask/utility/corr_result_helpers.py(normalize_values): Replace loop with zip form
2020-07-24Remove unused doc-testsBonfaceKilz
* wqflask/utility/chunks.py: Remove test code from module
2020-07-24Revert "Add work-around for failed imports in unittest"BonfaceKilz
This reverts commit d5e87fa6fe7546b46790f512d984a5501223082f.
2020-07-24Add work-around for failed imports in unittestBonfaceKilz
* wqflask/utility/tools.py: Unittests will use `from wqflask.wqflask import app` and the gn2 script will use `from wqflask import app`
2020-07-22It should add new resources to Redis automatically nowzsloan
2020-07-16Expose elastic-search variables for tests to passBonfaceKilz
2020-07-08Removed remaining unused references to the old qtlreaperzsloan
2020-07-06Fixed some of the logic with how traits are authenticated to avoid situation ↵zsloan
where a trait is authenticated twice
2020-06-24Temporary partial fix to issue of resources without info; need to add ↵zsloan
something that automatically inserts resources with default privileges
2020-06-20Fixed ports for proxy (though I need to add the port to global variables) ↵zsloan
and also simplified the check_owner_or_admin function a little
2020-06-20Added some admin functionality and fixed issue with temp traitszsloan
2020-06-17A user's id is now set as a parameter if it doesn't already existauthentication_testzsloan
2020-06-17Adding all the authentication stuffzsloan
2020-06-05Commiting other current group/resource management code, plus the new fileszsloan
2020-06-04Really should have split this into many more commits:zsloan
- Now use proxy to pull trait data and hide traits/results that the user doesn't have view permission for - Created a factory method for creating trait ob so it can return None when user doesn't have view permissions (this is why such a large number of files are changed) - Added metadata to permutation export - Added current group management code - Added fixed password verification e-mail code
2020-05-28Added lines calling proxy for publish datasets + added some resource redis ↵zsloan
queries and a missing import for the hmac functions
2020-05-12Merging Danny's changes and Bonface's changes to js importszsloan
2020-05-12Added change for F2s in r/qtl and fixed minor issue in save_user in redis_toolszsloan
2020-05-07Committing current progress on group manager + a minor fix in dataset.pyzsloan
2020-05-06Commiting a few minor changes plus returning rqtl_mapping.py to the same as ↵zsloan
on testing branch before merging Danny's changes and testing them
2020-05-06Replace CSS dependencies for datatablesBonfaceKilz
2020-04-26Merge master and testingmasterPjotr Prins
2020-04-24Replaced hard-coded instances of GN2 urls with ones pulled from settings filezsloan
2020-04-22Fixed a variety of issues related to users registering and logging inzsloan
GN2 should now work when Redis is empty
2020-04-16Many changes, including:zsloan
- Added permutation strata option for R/qtl - Made a variety of aesthetic changes to collections-related pages - Made a variety of aesthetic changes to the multi-trait tool options on the search result and correlation pages - Made some functional changes to collections that prevent duplicate traits and ensure new traits are at the top - The "Default Collection" is now always at the bottom of the collection list and renamed to "Your Default Collection"
2020-04-03Added option to select cofactors from collection for R/qtlzsloan
Fixed some issues with displaying the R/qtl results from the RData HET3-ITP dataa
2020-03-27Added integration for using RData files with R/qtl, plus some other changes ↵zsloan
to how it decides which mapping methods to display on the trait page
2020-03-10Fixed issue that caused some problems when verifying hmaczsloan