about summary refs log tree commit diff
path: root/tests/unit
AgeCommit message (Collapse)Author
2025-04-08Fix failing test.Frederick Muriuki Muriithi
2025-03-04Revert "test: Add unit tests for fibonacci function in rqtl2 module"Munyoki Kilyungi
This reverts commit 9bad745abd94fd0eeb0b0dc6aba0d6a74db33f81.
2025-03-04Revert "docs: Add module and function docstrings for unit tests of fibonacci ↵Munyoki Kilyungi
function". This reverts commit 6a76e302f11c0a0aa0bc0ac8487ad250f8afb9bb.
2025-03-04docs: Add module and function docstrings for unit tests of fibonacci functionMunyoki Kilyungi (aider)
2025-03-04test: Add unit tests for fibonacci function in rqtl2 moduleMunyoki Kilyungi (aider)
2025-02-28Fix linting errors.Frederick Muriuki Muriithi
2025-02-10feat: Add LMDB sample data retrieval API endpoint with testsMunyoki Kilyungi (aider)
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2025-02-07refactor: Add rqtl2 default method and update unittests.Alexander_Kabui
2025-02-06Add test assertions for writing data to csv.Alexander_Kabui
2025-02-06feat: Add unittests for rqtl2 computations.Alexander_Kabui
2025-01-27Delete un-used database_connection test.Munyoki Kilyungi
* tests/unit/test_db_utils.py (test_database_connection): Delete. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2025-01-26Skip test that checks working of MySQLdb rather than GN3.Frederick Muriuki Muriithi
2024-11-11Allow extra database connection options on URIFrederick Muriuki Muriithi
Update the database URI parsing to allow setting of extra connection option on the URI string.
2024-10-18refactor: replace gn3.auth.db with gn3.sqlite_db_utils and drop all refs to ↵John Nduli
gn3.auth
2024-10-14Replace CONSTRUCT with SELECT for fetching RIF NCBI entries.Munyoki Kilyungi
* gn3/db/rdf/wiki.py: Delete datetime import. Import sparql_query. [RIF_CONTEXT]: Delete. (get_rif_entries_by_symbol): Replace CONSTRUCT with SELECT. * tests/unit/db/rdf/test_wiki.py (test_get_rif_entries_by_symbol): Update tests. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-10-14Replace species' shortName with it's full name in NCBI test data.Munyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-10-14Remove "@id" from NCBI test data.Munyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-10-14Update the NCBI expected test data context.Munyoki Kilyungi
* tests/unit/db/rdf/data.py: [LPL_RIF_ENTRIES]: Update "@context". Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-10-14Add function for fetching NCBI data.Munyoki Kilyungi
* gn3/db/rdf/wiki.py: Import datetime. [RIF_CONTEXT]: New global variable defining the json-ld context for NCBI rif data. (get_rif_entries_by_symbol): New function. * tests/unit/db/rdf/data.py: New file containing expected NCBI test data. * tests/unit/db/rdf/test_wiki.py (test_update_wiki_comment): New test case. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-10-02Spin up a local virtuoso instance to run RDF tests against.Munyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-10-02Set a default password for sparql.Munyoki Kilyungi
* tests/fixtures/rdf.py: Import config. (get_sparql_auth_conf): Load GN3 config from GN3_SECRETS and GN3_CONF if the respective envs are set. Set sane defaults for sparql_conf. (rdf_setup): Remove "fxtr_app_config". * tests/unit/db/rdf/test_wiki.py (test_get_wiki_entries_by_symbol): Ditto. (test_get_comment_history): Ditto. (test_update_wiki_comment): Ditto. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-09-28Lint: fix some linting errors.Frederick Muriuki Muriithi
2024-09-27Skip failing test.Frederick Muriuki Muriithi
2024-09-27Use existing fixture to retrieve settings.Frederick Muriuki Muriithi
2024-09-23Revert "Add pytest.mark.unit_test for all rdf test-cases."Munyoki Kilyungi
This reverts commit f6d9b0cfb842b53e8777e9918549f1ed1ee5892e. Failing tests because of how we run tests using guix. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-09-23Add pytest.mark.unit_test for all rdf test-cases.Munyoki Kilyungi
This makes sure that all the test correctly run in CD. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-09-23Fix or ignore pylint errors.Munyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-09-23Remove dead comment.Munyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-09-23Use test fixtures to set-up a test named graph.Munyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-09-23Add RDF test cases.Munyoki Kilyungi
* pytest.ini: Add rdf pytest marker. * tests/test_data/ttl-files/test-data.ttl: New file with turtle test data for RIF editing. * tests/unit/db/rdf/test_wiki.py (test_sanitize_result): New test case. (test_get_comment_history): Ditto. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-09-12Fix failing tests after merging in Pjotr's pull request.Frederick Muriuki Muriithi
2024-09-12rqtl_wrapper: minor fixesPjotr Prins
2024-09-12Fix Rqtl testPjotr Prins
2024-09-11Add test cases for wiki.__sanitize_result.Munyoki Kilyungi
* tests/unit/db/rdf/test_wiki.py (test_sanitize_result): New file. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-09-03Make pylint fixes.Alexander_Kabui
2024-09-03Add tests for fetching and populating references.Alexander_Kabui
2024-09-03Add unittests for formatting bib info.Alexander_Kabui
2024-05-27Pylint fixes.Alexander_Kabui
2024-05-27Delete llm obsolete unittestsAlexander_Kabui
2024-01-17fix pylint errorsAlexander_Kabui
2024-01-17temp fix:disable pylint checkAlexander_Kabui
2024-01-17Feature/gn llm refactoring (#147)Alexander Kabui
* refactor code for processing response from fahamu client * Add tests for gn-llm
2023-10-10Remove authentication from GN3Frederick Muriuki Muriithi
Authentication should be handled by the auth server (gn-auth) and thus, this commit removes code handling user authentication from the GN3 system.
2023-09-05Fix C3001: Lambda expression assigned to a variableMunyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-09-05Remove un-necessary string concatenationMunyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-09-05Remove pylint skipMunyoki Kilyungi
* gn3/auth/authentication/oauth2/models/oauth2token.py (introspect_token, check_permission): Delete "pylint: disable=[no-self-use]". R0022: Useless option value for 'disable', 'no-self-use' was moved to an optional extension, see https://pylint.pycqa.org/en/latest/whatsnew/2/2.14/summary.html#removed-checkers. * gn3/auth/authentication/oauth2/grants/authorisation_code_grant.py (delete_authorization_code): Ditto. * tests/unit/test_heatmaps.py (test_cluster_traits): Delete "pylint: disable=R0201". R0022: Useless option value for 'disable', 'no-self-use' was moved to an optional extension, see https://pylint.pycqa.org/en/latest/whatsnew/2/2.14/summary.html#removed-checkers. * tests/unit/computations/test_partial_correlations.py (test_tissue_correlation): Ditto. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-09-05Remove unused importMunyoki Kilyungi
* tests/unit/test_file_utils.py: Delete gn3.cache_ipfs_file Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-09-05Replace "escape_string" with safe-query parametersMunyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-09-05Delete IPFS testsMunyoki Kilyungi
* tests/unit/test_file_utils.py (test_cache_ipfs_file_cache_hit, test_cache_ipfs_file_cache_miss): Delete. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-08-17Fix tests to work with changeszsloan