Age | Commit message (Expand) | Author |
2023-09-05 | Delete un-used import...Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |
2023-09-05 | Remove type annotations for "none_case_attrs" variables...* gn3/db/sample_data.py (update_sample_data, delete_sample_data,
insert_sample_data): Remove type hints for "none_case_attrs".
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |
2023-08-24 | Change get_pheno_csv_sample_data to use group ID instead of phenotype ID | zsloan |
2023-08-17 | Fix query for fetching DataId when inserting ProbeSet data | zsloan |
2023-08-17 | Fix a couple remaining issues with function parameters | zsloan |
2023-08-17 | Combine pheno/mrna update functions + some other fixes | zsloan |
2023-08-17 | Fix a few misnamed tables in mrna delete/insert functions | zsloan |
2023-08-17 | Implement ProbeSet sample data editing...Currently there's a lot of duplicated code, so I need to ask how best to simplify it later
| zsloan |
2023-08-17 | Fix probeset sample data and CSV sample data functions | zsloan |
2023-08-17 | Fix get_mrna_sample_data query | zsloan |
2023-08-17 | Make several sample_data fetching functions specific to phenotype or mrna ass... | zsloan |
2023-07-17 | Fix dict key name...Remove extra colon (:) at the end of the name that was leading to the number
of cases not being presented as expected.
| Frederick Muriuki Muriithi |
2023-07-12 | Bug: Set the `data_exists` variable within the context manager...The `cursor.fetchone()` call that was used as the condition to the `if` was
called outside of the context manager, and therefore would always give a
non-truthy value at best and an inconsistent result at worst.
This commit gets the value before the context manager has exited and stores it
for later use.
| Frederick Muriuki Muriithi |
2023-05-22 | Fix return typing for get_trait_sample_data | zsloan |
2023-05-22 | Remove unused variable this_data | zsloan |
2023-05-22 | Include all samples in trait sample data...This is necessary in order to allow for editing the values of samples that don't currently have values
| zsloan |
2023-05-22 | Fix sample data CSV query to only fetch distinct samples...There's probably a better way to fix this query (it was previously returning each sample twice), but DISTINCT was the easiest way I could come up with
| zsloan |
2023-05-22 | Fix get_trait_sample_data function | zsloan |
2023-05-22 | Add function for retrieving phenotype sample data as dict | zsloan |
2023-03-20 | Disable fetching case-attributes when getting sample data...* gn3/db/sample_data.py: Remove 're' import.
(get_trait_csv_sample_data): Remove fetching sample data.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
| Munyoki Kilyungi |
2023-03-17 | Add conn.commit() to queries in sample_data.py | zsloan |
2022-11-02 | Fix pylint and mypy errors...* gn3/db/sample_data.py (get_trait_csv_sample_data): Pass __query
directly to cursor.execute. Rename value to _value in for loop to
make mypy pass.
* gn3/db_utils.py (Connection): Add class docstring.
(Connection.cursor): Add docstring.
* mypy.ini: Add an entry for xapian.
| Munyoki Kilyungi |
2022-08-23 | Remove conn.commit() and conn.rollback()...* gn3/db/__init__.py (update): Delete conn.commit() and conn.rollback()
(insert): Ditto.
* gn3/db/case_attributes.py (insert_case_attribute_audit): Ditto.
(reject_case_attribute): Ditto.
(approve_case_attribute): Ditto.
* gn3/db/sample_data.py (update_sample_data): Ditto.
(delete_sample_data): Ditto.
(insert_sample_data): Ditto.
| Munyoki Kilyungi |
2022-05-27 | Move sql for modifying case-attributes from gn2 to gn3 | BonfaceKilz |
2022-05-27 | Return all the results from CaseAttributes column as is...* gn3/db/sample_data.py: Remove "collections" import. Add "Optional" import.
(get_case_attributes): Return the results of "fetchall" from the case
attributes.
* tests/unit/db/test_sample_data.py (test_get_case_attributes): Update failing
test.
| BonfaceKilz |
2022-04-12 | Strip any newline, tab or carriage-return chars from sample data...* gn3/db/sample_data.py (get_trait_csv_sample_data): Strip out "\n", "\t", or
"\r" from the sample data. See:
<https://issues.genenetwork.org/issues/csv-error-ITP_10001-longevity-data-set.html>
| BonfaceKilz |
2022-04-07 | Fix pylint errors | BonfaceKilz |
2022-04-07 | Use case attribute id inside brackets if present during insertions...* gn3/db/sample_data.py (delete_sample_data): If an id is present in the column header, use it.
* tests/unit/db/test_sample_data.py (test_delete_sample_data): Update tests to
capture the above.
| BonfaceKilz |
2022-04-07 | Use case attribute id inside brackets if present during insertions...* gn3/db/sample_data.py (insert_sample_data): If an id is present in the column header, use it.
* tests/unit/db/test_sample_data.py (test_insert_sample_data): Update tests to
capture the above.
| BonfaceKilz |
2022-04-07 | Use case attribute id inside brackets if present during updates...* gn3/db/sample_data.py: Import "parse_csv_column".
(update_sample_data): If an id is present in the column header, use it.
* tests/unit/db/test_sample_data.py (test_update_sample_data): Update tests to
capture the above.
| BonfaceKilz |
2022-04-07 | Add method for fetching the case_attributes...* gn3/db/sample_data.py (get_case_attributes): New function.
* tests/unit/db/test_sample_data.py (test_get_case_attributes): Test case for
the above.
| BonfaceKilz |
2022-04-07 | Run python black on file...* gn3/db/sample_data.py: Run "python black -l 79 ..."
| BonfaceKilz |
2022-03-14 | Dummy White Space commit to fix laminar | BonfaceKilz |
2022-03-12 | Fix mypy issues | BonfaceKilz |
2022-03-12 | Fix pylint issues | BonfaceKilz |
2022-03-12 | Store the first element as strain_id | BonfaceKilz |
2022-03-12 | Append the strain name when extracting "actions"...* gn3/db/sample_data.py (__extract_actions): During updates, make sure that
the strain name is part of the returned string when extracting "actions".
* tests/unit/db/test_sample_data.py: Add test cases for the above.
| BonfaceKilz |
2022-03-12 | Apply auto-pep8 to sample_data.py and it's test file | BonfaceKilz |
2022-03-12 | Add missing return type-annotations...* tests/unit/db/test_sample_data.py (delete_sample_data): Add missing return
type for type annotations.
(insert_sample_data): Ditto.
| BonfaceKilz |
2022-03-12 | Update how data is updated by re-using existing functions...* gn3/db/sample_data.py (get_sample_data_ids): Re-use "delete_sample_data" and
"insert_sample_data" when updating data; and also add logic for updating
modified data.
* tests/unit/db/test_sample_data.py: Add tests for the above.
| BonfaceKilz |
2022-03-12 | Create action dict that's created when updating data...* gn3/db/sample_data.py (__extract_actions): An update on a vector of data can
contain: inserts, deletes and updates. This functions extracts these actions
during an update.
* tests/unit/db/test_sample_data.py (test_extract_actions): Add test-case for
the above.
| BonfaceKilz |
2022-03-12 | Remove check for inserted data when inserting individual data...* gn3/db/sample_data.py (insert_sample_data)[__insert_data]: Move check to the
main body. With this check here, you have 3 redundant checks. For a successful
insert, it will insert the first value to the `PublishData` table and ignore the
rest of the inserts.
| BonfaceKilz |
2022-03-12 | Make `_map` a constant...* gn3/db/sample_data.py: Now constant, `_MAP`.
(delete_sample_data)[__delete_data]: Replace `_map` with `_MAP`.
(insert_sample_data)[__insert_data]: Ditto.
| BonfaceKilz |
2022-03-12 | Fix faulty SQL query string when deleting case-attributes | BonfaceKilz |
2022-03-12 | Explicitly get CaseAttributeId and fix broken sql query...* gn3/db/sample_data.py (insert_sample_data): Use correct query string. Also,
use CaseAttributeId to determine whether case-attributes were inserted. If so,
do not attempt an insert.
| BonfaceKilz |
2022-03-12 | Remove duplicate params...* gn3/db/sample_data.py (insert_sample_data)[__insert_case_attribute]: Remove
extra parameters.
| BonfaceKilz |
2022-03-12 | Remove dead code | BonfaceKilz |
2022-03-12 | Check whether publish data already exists before inserting...* gn3/db/sample_data.py (insert_sample_data): If data already exists in the
table, do not attempt an insert; otherwise, an error will be generated.
| BonfaceKilz |
2022-03-12 | Fetch id's separately for the insertion edge-case...* gn3/db/sample_data (get_sample_data_ids): Add an extra condition that caters
for inserts: during inserts, joins won't work when fetching the strain_id,
publishdata_id, and strain_name. In this case, just create 2 separate queries
to do that work.
| BonfaceKilz |
2022-03-12 | Extract a strain name given a csv string and it's header...* gn3/csvcmp.py (extract_strain_name): New function.
* gn3/db/sample_data (delete_sample_data): Use the aforementioned function.
(insert_sample_data): Ditto.
* tests/unit/test_csvcmp: Test cases for above.
| BonfaceKilz |