aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-10-02Add rdf-tests after the check phase.HEADmainMunyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-10-02Use pathlib to fetch the directory path for tests.Munyoki Kilyungi
* tests/fixtures/rdf.py: import pathlib. (rdf_setup): Use pathlib to get the dir name for the tests folder. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-10-02Fix pylint failure.Munyoki Kilyungi
* tests/fixtures/rdf.py (rdf_setup): Fix C0301. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-10-02feat: cleaner handling of virtuoso processJohn Nduli
2024-10-02Fix typo in comments.Munyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-10-02Move sparql-auth URIs to gn3-conf in documentation.Munyoki Kilyungi
We want to strictly keep secrets in the secret file. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-10-02Add all rdf-tests to GN3 CI.Munyoki Kilyungi
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-02Add virtuoso ini file to be used during testing.Munyoki Kilyungi
tests/fixtures/virtuoso.py: New file. 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-30chore: pylint code fixJohn Nduli
2024-09-30feat: rollback mysql transaction when rdf insert failsJohn Nduli
2024-09-30fix: rdf and sql queries for fetching rif dataJohn Nduli
SQL queries fail because we get bytes instead of strings which cannot be decoded. We decode results from DictCursor to fix this. For RDF, we cast `?symbol` to a string.
2024-09-28Update documentation on how to run tests.Frederick Muriuki Muriithi
2024-09-28Lint: fix some linting errors.Frederick Muriuki Muriithi
2024-09-27Debug command.Frederick Muriuki Muriithi
2024-09-27Skip failing test.Frederick Muriuki Muriithi
2024-09-27Bug: Use absolute paths in place of relative paths.Frederick Muriuki Muriithi
Similar issue to commit 11d543eeca08fe0df4bf2be7222234fadb516a51
2024-09-27Fix Pair-Scan output pathsFrederick Muriuki Muriithi
Related to 4940195460008192b6ca6269e1fb8c172ada4f17c
2024-09-27Set `include_package_data=True` to install R files too.Frederick Muriuki Muriithi
2024-09-27Add a MANIFEST.in to include R scripts.Frederick Muriuki Muriithi
2024-09-27Bug: Use absolute path in place of relative pathFrederick Muriuki Muriithi
Prior to this commit, an assumption is made that the application is invoked with the root of the repository being the current working directory. If this assumption is not met, then the system will not find the appropriate path. This commit forces the use of an absolute path, which should help avoid issues with misplaced relative paths.
2024-09-27Use existing fixture to retrieve settings.Frederick Muriuki Muriithi
2024-09-27Fix R/qtl output pathszsloan
The script now takes the --outdir parameter as the output directory, only using TMPDIR if nothing is passed "output" in the output directory was also changed to "gn3" to be consistent with recent changes to GN3's code
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-23Handle missing GN3_SECRETS for CI testing.Munyoki Kilyungi
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-23Revert "Remove one-line if/else statement."Munyoki Kilyungi
This reverts commit 0d15840913c9cc401d1e74295aa5e17e34f2987b. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-09-23Add section on setting up virtuoso locally.Munyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-09-23Update docs to use default virtuoso ports.Munyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-09-23Update docs on how to use SPARQL default ports.Munyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-09-23Remove one-line if/else statement.Munyoki Kilyungi
* gn3/db/rdf/wiki.py (__sanitize_result): When fetching pubmed_ids and categories, default to [] if the key misses, and remove the subsequent one-line if/else statement. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-09-23Load GN3_SECRETS after loading GN3_CONF settings.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-23Make sure the the test graph is empty before running rdf tests.Munyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-09-23Update docs to highlight sparql conf params in SECRETS file.Munyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-09-23Use correct object modifier for a label when inserting a comment.Munyoki Kilyungi
* gn3/db/rdf/wiki.py (update_wiki_comment) [query]: Replace "rdf:label" with "rdfs:label". Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-09-23Update docstring for "update_wiki_comment".Munyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-09-23Use correct object modifier in triple when fetching comment history.Munyoki Kilyungi
* gn3/db/rdf/wiki.py (get_comment_history) [query]: Replace ?symbolName with ?symbolName. 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-23Use correct modifier when getting species name in SPARQL.Munyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-09-23Remove dead variable from RDF query.Munyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-09-23Alphabetically sort the categories and pubmed_ids array.Munyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-09-23Remove un-necessary triple in comment history RDF query.Munyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-09-19Use correct return type.Munyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-09-19Remove extraneous keyword.Munyoki Kilyungi
* gn3/api/metadata_api/wiki.py (edit_wiki): Remove comment_id from args---it's already in the insert_dict. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-09-18Pass in insert_dict instead of payload in "get_wiki_entries".Munyoki Kilyungi
* gn3/api/metadata_api/wiki.py (edit_wiki) [insert_dict]: Add species, categories fields. [update_wiki_comment]: Pass in insert_dict, and get rid of redundant keys. Directly pass in sparql_auth's conf params instead of a dict. * gn3/db/rdf/wiki.py (get_next_comment_version): Get rid of redundant params. Use fields directly from insert_dict. Directly pass in sparql_auth's conf params instead of a dict. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2024-09-18Pass in the createtime as an arg when inserting into RDF graph.Munyoki Kilyungi
* gn3/api/metadata_api/wiki.py (edit_wiki): Pass in the createtime as an arg. * gn3/db/rdf/wiki.py: Remove un-used imports. (update_wiki_comment): Use passed in "created" arg in the createtime field. This makes sure that the SQL/RDF timestamps match. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>