aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-07-19Replace ORM code with direct queries for ProbeSetsFrederick Muriuki Muriithi
2023-07-18Remove unused importzsloan
2023-07-18Fix issue where the full samplelist wasn't used in the values column for the ↵zsloan
traits export
2023-07-18Replace ORM calls with direct queriesFrederick Muriuki Muriithi
Avoid the use of the ORM code for fetching data from the database, and instead use direct queries that indicate easily what is being fetched from the database.
2023-07-18BugFix: Use reworked `retrieve_phenotype_group_name` functionFrederick Muriuki Muriithi
Use the reworked `retrieve_phenotype_group_name` to fetch the group name for phenotype datasets. == Bug Description == There was a subtle bug in the original calls to `retrieve_group_name` function where the `dataset_id` was passed in as an argument, rather than the group id. For some Datasets, the `group_id` and `dataset_id` share the same value, and would end up querying the correct values, but that was a fluke where doing the wrong thing ended up with the expected values. This commit fixes that by using the reworked function, which does the correct indirection from `dataset_id` to the appropriate `group_id`. See https://github.com/genenetwork/genenetwork3/commit/088b6181457ef4e528b7dcbf04b7aca29b274d1f for the reworked function.
2023-07-17Enable deletion of sample values.Frederick Muriuki Muriithi
2023-07-17Serialize to JSON with custom encoderFrederick Muriuki Muriithi
Serialize values to JSON using the custom encoder that is aware of data types the default encoder might not be aware of.
2023-07-17UI: Change input elementsFrederick Muriuki Muriithi
Change the input elements from all "<textarea ...>" to more closely adhere to the data that each element is concerned with.
2023-07-14Bug: Assign group within the db context managerFrederick Muriuki Muriithi
Assign the value to group within the db connection's context manager. Initialise the group to an empty tuple at the very begining. Fixes the error noted in https://github.com/genenetwork/gn-docs/blob/master/api/questions-to-ask-GN.md and should now allow the curl invocation: curl -s https://genenetwork.org/api/v_pre1/group/BXD to work as expected.
2023-07-12Bug: Provide missing argument.Frederick Muriuki Muriithi
2023-07-12Fix check for numeric valuesFrederick Muriuki Muriithi
The `str.isnumeric()` function returns false for numbers such as '9.99', '88.8' etc. This commit provides a slightly more robust check for strings that are numbers. It will fail for numbers with exponents though.
2023-07-12Use new session to get user (author) informationFrederick Muriuki Muriithi
* wqflask/utility/json/__init__.py: Custom JSON for serialising UUIDs into a JSON representantion * wqflask/utility/json/encoders.py: Custom JSON for serialising UUIDs into a JSON representation * wqflask/wqflask/metadata_edits.py: Use new sessions for author information
2023-07-12Provide message when there are no diffs.Frederick Muriuki Muriithi
2023-07-12Check whether user is authorised to act on diffFrederick Muriuki Muriithi
2023-07-12Update `login_required` decoratorFrederick Muriuki Muriithi
Change how the check for user login works.
2023-07-11Fix bug with add a trait to a collection from the trait pagezsloan
Apparently collections/add needs the input to be passed as POST
2023-07-11BugFix: Fix the sorting key functionsFrederick Muriuki Muriithi
Update the sort-key functions to use the correct dictionary keys to retrieve the comparison value for the sort.
2023-07-11BugFix: UX: Display the success notification correctlyFrederick Muriuki Muriithi
2023-07-11BugFix: Display diff file only onceFrederick Muriuki Muriithi
The code filtering the diffs to ensure that only the diffs for the traits that the user has access to are visible was leading to the diffs that relate to the same trait showing up more than once. This commit fixes that, ensuring that each diff shows up once.
2023-07-11Handle HTTP status codes 4** in a special way.Frederick Muriuki Muriithi
2023-07-11Use new auth to determine access to diffsFrederick Muriuki Muriithi
* wqflask/wqflask/metadata_edits.py: Filter out diffs that the user has access to before sending them to the template. * wqflask/wqflask/templates/display_files.html: Remove access control code in the UI template.
2023-07-10Fix issue where correlation matrix tables had two IDs, causing things to not ↵zsloan
work
2023-07-10Fix bug when adding PCA traits to a collectionzsloan
The bug was caused by PCA traits not having description_display
2023-07-10Remove `OVERRIDES` global variable.Frederick Muriuki Muriithi
2023-07-05Remove broken Time Machine linkzsloan
Add GN3 Github link Move News Twitter feed below Links (at least until the Twitter embed starts working again)
2023-07-05Change traits export to include all samples, including parents/f1szsloan
2023-07-05Fix bug where mapping is sometimes wrongly submitted as a GET requestzsloan
I think this bug was caused by changing the /run_mapping endpoint to accept both GET and POST requests, and it only seemed to occur for some users (only Rob that I'm aware of). I'm still not sure why it was happening, but I addressed it by returning /run_mapping to being only POST requests, and instead allowing the mapping hashes to be linked to with the pattern /run_mapping/<hash> (instead of the GET request /run_mapping?hash=<hash>). This appears to have prevented the problem from happening.
2023-07-05Compute the GN_VERSION in setup code not shell scriptFrederick Muriuki Muriithi
2023-07-05Get setting from config files on envvarsFrederick Muriuki Muriithi
The main code should only ever get its configs from the application configurations, and not directly from the envvars. This helps with maintenance by ensuring that the application configurations are done in one place, and can be traced for debugging purposes.
2023-07-05Config: Remove unused `OVERRIDES`Frederick Muriuki Muriithi
The `OVERRIDES` variable has no actual use in the application, therefore, this commit removes it and its dependent code.
2023-07-05Remove unused configsFrederick Muriuki Muriithi
The individual parts of the URI to the database are not used in the application and thus serve no purpose.
2023-07-05Remove unused importFrederick Muriuki Muriithi
2023-07-03Remove unnecessary (and I think wrong) data-url from mapping submission buttonszsloan
2023-07-03UX: Improve error messagesFrederick Muriuki Muriithi
Make the error messages a little less cryptic in order to improve the user's experience of the site.
2023-06-30Fixed URL scheme issueszsloan
2023-06-26Bug: Pass dataset name for 'Publish' dataFrederick Muriuki Muriithi
The dataset name is needed for authorisation checks.
2023-06-26Bug: Pass the dataset name/id for authorisation checksFrederick Muriuki Muriithi
The new authorisation checks need the dataset name/id for checking the access level the user has on any data. This commit passes the dataset name/id through the requests. We also add some exceptions to ensure that this data is passed through before even attempting to check for the authorisation.
2023-06-22Update calls to `database_connection` functionFrederick Muriuki Muriithi
Pass in the database URI at call time.
2023-06-22Pass in the URI to the databaseFrederick Muriuki Muriithi
Pass in the URI to the database, rather than coupling the `database_connection` function to the application environment and settings.
2023-06-22Create new entry-point module to reduce chances of circular imports.Frederick Muriuki Muriithi
This commit creates a new entry-point module (wqflask/gn2_main.py) and imports all the other modules that import the application object with something like: `from wqflask import app` This breaks the subtle circular-import cycle that tends to cause a lot of inconveniences when developing the application.
2023-06-20Change getSampleTableData function to include a includeNAs parameterzsloan
This is so the export function can show all rows, including ones with no value. Previously it only fetched the rows with values (which is fine for correlations/mapping, but not export).
2023-06-18Updating READMEsPjotr Prins
2023-06-18Remove unused locust filePjotr Prins
2023-06-18Disable document editing - should move to markdown instead.Pjotr Prins
2023-06-18Cleaning up READMEs - moving stuff to gemtextPjotr Prins
2023-06-15Add genotype pageMunyoki Kilyungi
* wqflask/wqflask/templates/genotype.html: New template. * wqflask/wqflask/views.py (get_phenotype): New endpoint. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-06-14Fix broken get_trait_units testzsloan
2023-06-14(Hopefully)fix bug where the mapping form submission is sometimes wrongly ↵zsloan
treated as a GET, causing the code to check for a hash_of_inputs input that doesn't exist. This is hard to troubleshoot because I could never reproduce the issue (only Rob has mentioned it), but the error Rob showed me seems to directly imply this was issue, so hopefully this change (which directly checks if hash_of_inputs is set) will prevent it from happening. It's possible it will still throw a different error, though (if it's actually treating it as a GET, it presumably won't have any of the other inputs it expects). This issue is a bit confusing, because I'm not sure how/why mapping run from the trait page would ever be treated as a GET request (since the show_trait page form is POST).
2023-06-14Fix main search bug causing AND searches to no longer workzsloan
The cause of this bug is that, when the autocomplete feature was implemented, it checks the OR search field (in order to save its contents) and only submits the form if it isn't empty. This means that, if the user fills out the AND field and submits the form, nothing happens. I changed it to check both the AND and OR fields (and save both of their contents). While not perfect (since only one field is ever actually used), I figured it's best to just store everything (and there isn't really any way to know which search is intended when both fields are filled).
2023-06-14Increase number of distinct values for showing the 'Block samples by group' ↵zsloan
attributes from 10 to 500