Age | Commit message (Expand) | Author |
2022-11-23 | Create a new REST endpoint for fetching a phenotype's metadata...* gn3/api/general.py: (dataset_metadata) Delete.
* gn3/api/metadata.py: Import Blueprint, jsonify, current_app,
SPARQLWrapper and get_dataset_metadata.
(metadata): New Blueprint
(jsonify_dataset_metadata): New function/end-point.
* gn3/app.py: Import metadata
(create_app): Register metadata blueprint.
| Munyoki Kilyungi |
2022-11-21 | auth: Prevent group leader from being a member of multiple groups...* gn3/auth/authorisation/groups.py: Assign the group leader at group creation
time.
* tests/unit/auth/test_groups.py: Ensure the group leader is only ever a
member of a single group.
| Frederick Muriuki Muriithi |
2022-11-17 | auth: Finish implementation of `create_group_role`...* gn3/auth/authorisation/groups.py: Add `GroupRole` type. Fix typing
annotations. Fix bugs.
* tests/unit/auth/conftest.py: Fix bugs.
* tests/unit/auth/test_groups.py: Fix test to run.
| Frederick Muriuki Muriithi |
2022-11-17 | auth: Define the `User` type...* gn3/auth/authentication.py -> gn3/auth/authentication/__init__.py: Convert
module to package
* gn3/auth/authentication/users.py: Define the `User` type
| Frederick Muriuki Muriithi |
2022-11-16 | auth: fix bugs in the code...* gn3/auth/authorisation/privileges.py: Set id to UUID type
* gn3/auth/authorisation/roles.py: fix parameters to types that sqlite3
supports
* gn3/auth/db.py: add logging for errors and re-raise the exception
* tests/unit/auth/test_roles.py: fix test
| Frederick Muriuki Muriithi |
2022-11-16 | Inject SPARQLWrapper as a parameter...* gn3/db/rdf.py: Delete gn3.setting.SPARQL_ENDPOINT import.
(sparql_query): Inject SPARQLWrapper.
(get_dataset_metadata): Ditto.
| Munyoki Kilyungi |
2022-11-15 | auth: Add `create_group_role` function. | Frederick Muriuki Muriithi |
2022-11-15 | auth: Return results of calling function directly...* gn3/auth/authorisation/checks.py: Return results of calling the function
rather than a dict of values that include the results.
* gn3/auth/authorisation/groups.py: Use the newer form of `authorised_p`
decorator.
* tests/unit/auth/test_groups.py: Update tests
| Frederick Muriuki Muriithi |
2022-11-15 | auth: Specify types for privileges, roles, groups...Use specified types for privileges, roles and types rather than using strings
to help with limiting bugs.
* gn3/auth/authorisation/groups.py: Specify and use the `Group` type
* gn3/auth/authorisation/privileges.py: Specify and use the `Privilege` type
* gn3/auth/authorisation/roles.py: Specify the `Role` type. Add the
`create_role` function.
| Frederick Muriuki Muriithi |
2022-11-15 | auth: Add some typing information to the functions | Frederick Muriuki Muriithi |
2022-11-15 | auth: Reorganise package - move function to `checks` module...* gn3/auth/authorisation/__init__.py: delete function
* gn3/auth/authorisation/checks.py: move function to `checks` module
| Frederick Muriuki Muriithi |
2022-11-15 | pylint: Fix linting errors. | Frederick Muriuki Muriithi |
2022-11-14 | auth: Implement `create_group` | Frederick Muriuki Muriithi |
2022-11-14 | auth: Add test for `create_group`...* gn3/auth/authorisation/__init__.py: Add `authorised_p` decorator to be used
for all function requiring authorisation.
* gn3/auth/authorisation/groups.py: Add `create_group` function stub
* tests/unit/auth/conftest.py: Add fixture for test users
* tests/unit/auth/test_groups.py: Add tests for `create_group`
| Frederick Muriuki Muriithi |
2022-11-10 | Migrations: Add migration for 'resources' table...* gn3/migrations.py: Minor change
* migrations/auth/20221110_01_WtZ1I-create-resources-table.py: new migration
* tests/unit/auth/test_create_table_migrations.py: test new migration
| Frederick Muriuki Muriithi |
2022-11-08 | Fix issue where only primary samples were used when all samples are...selected
This is because base_samples was set to all_samples_ordered, which only
includes primary samples + parents/f1s. Setting this to an empty list
fixed the issue and caused it to use all samples again.
| zsloan |
2022-11-08 | Tests: Generalise testing 'CREATE TABLE' migrations...* gn3/settings.py: Omit trailing slash
* tests/unit/auth/test_create_table_migrations.py: Generalise testing
migrations that create tables.
* tests/unit/auth/test_create_user_credentials_table.py: delete
* tests/unit/auth/test_migration_create_users_table.py: delete
| Frederick Muriuki Muriithi |
2022-11-08 | Settings: Provide default `AUTH_DB` setting. | Frederick Muriuki Muriithi |
2022-11-08 | Tests: Tests the credentials check system...* gn3/auth/authentication.py: Fix issues caught by tests
* tests/unit/auth/test_credentials.py: Add fixtures and tests for credentials
checking
| Frederick Muriuki Muriithi |
2022-11-03 | Add credentials checking...* gn3/auth/authentication.py: new function `credentials_in_database`
* gn3/auth/authentication/__init__.py: replace package with module
* gn3/settings.py: new `AUTH_MIGRATIONS` configuration variable
* migrations/auth/20221103_02_sGrIs-create-user-credentials-table.py: new
migration
* tests/unit/auth/test_credentials.py: test the `credentials_in_database`
function
* tests/unit/conftest.py: more test fixtures
| Frederick Muriuki Muriithi |
2022-11-03 | Initialise the Auth(entic|oris)ation packages...Initialise the authentication/authorisation system packages and set up the
initial database migrations to set up the system.
* README.md: Add documentation on migrations
* gn3/auth/__init__.py: init package
* gn3/auth/authentication/__init__.py: init package
* gn3/auth/authorisation/__init__.py: init package
* gn3/migrations.py: provide migration utilities
* migrations/auth/20221103_01_js9ub-initialise-the-auth-entic-oris-ation-database.py:
new migration
* tests/unit/auth/test_init_database.py: test new migration applies and rolls
back as expected
* tests/unit/conftest.py: fixtures for unit tests
* yoyo.auth.ini: basic configuration for yoyo-migration for auth system
migrations
| Frederick Muriuki Muriithi |
2022-11-02 | Re-implement RDF related code to use monads in its own module...* gn3/api/general.py: Replace gn3.db.datasets import with gn3.db.rdf.
(dataset_metadata) <jsonify>: Replace datasets.dataset_metadata with
rdf.get_dataset_metadata.
* gn3/db/datasets.py: Remove unused imports.
(sparql_query, dataset_metadata): Delete.
* gn3/db/rdf.py: (sparql_query, get_dataset_metadata): New functions.
| Munyoki Kilyungi |
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-10-28 | Use Xapian index path from app settings....App settings should be accessed from current_app. It should not be hard-coded
to a variable in a module.
* gn3/db_utils.py: Do not import XAPIAN_DB_PATH from gn3.settings.
(xapian_database): Accept path argument.
* gn3/api/search.py: Import current_app from flask.
(search_results): Pass Xapian index path to xapian_database.
| Arun Isaac |
2022-10-28 | Disable various pylint checks on Connection class....* gn3/db_utils.py (Connection): Disable missing-class-docstring,
missing-function-docstring and too-few-public-methods pylint checks.
| Arun Isaac |
2022-10-28 | Add search....* gn3/api/search.py: New file.
* gn3/app.py: Register the search blueprint.
| Arun Isaac |
2022-10-26 | Add xapian database connection context manager....* gn3/settings.py (XAPIAN_DB_PATH): New variable.
* gn3/db_utils.py: Import xapian and XAPIAN_DB_PATH from gn3.settings.
(xapian_database): New function.
| Arun Isaac |
2022-10-25 | Reshape column major genotype database storage correctly....* gn3/genodb.py (matrix): Reshape column major genotype database storage as
ncols x nrows instead of as nrows x ncols.
| Arun Isaac |
2022-10-22 | fix issue;parsing sample data (#102) | Alexander Kabui |
2022-10-18 | Support server side SQL query retrieval....* gn3/monads.py: Import SSDictCursor from MySQLdb.cursors.
(query_sql): Add server_side argument.
| Arun Isaac |
2022-10-18 | Add database connection context manager....* gn3/db_utils.py: Import contextlib. Import Any, Iterator, Protocol and Tuple
from typing.
(database_connector): Deprecate function.
(Connection): New class.
(database_connection): New function.
| Arun Isaac |
2022-10-18 | Add monadic utilities....* gn3/monads.py: New file.
Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
| Munyoki Kilyungi |
2022-10-06 | DEBUG: Collect more info for debugging | Frederick Muriuki Muriithi |
2022-10-06 | DEBUG: Collect more information on possible failure. | Frederick Muriuki Muriithi |
2022-10-03 | Bug: Do not process data for output too early...* gn3/computations/rust_correlation.py: (parse_tissue_corr_data): The function
was parsing data from a file, and then converting the parsed values into a
comma-separated string for output, despite the fact that the data parsed is
not output in this specific function. This is a really bad idea, and leads
to errors showing up down the line, far removed from the cause.
| Frederick Muriuki Muriithi |
2022-09-30 | Add escape char to avoid error notice. | Frederick Muriuki Muriithi |
2022-09-29 | Use the built-in csv module for file output...Use the built-in csv module for file output in order to avoid subtle errors in
the formats.
| Frederick Muriuki Muriithi |
2022-08-25 | revert for commit 6db3b2af8fc09999996d3acc09890a06f179c669;Bug | Alexander_Kabui |
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-08-22 | Use non-default MySQL port if present...By default, MySQL/Mariadb connects at port 3306, however, the configuration
variable `SQL_URI` could contain a different port. In that case, this commit
allows the system to connect to the non-default port.
| Frederick Muriuki Muriithi |
2022-08-12 | Add mandatory/expected fields to parsed data. | Frederick Muriuki Muriithi |
2022-08-10 | Fix returned value for 'parse_correlation_output'...* Always return dict
* Fix internal '__parse_line__' to always have a valid return
| Frederick Muriuki Muriithi |
2022-08-10 | code refactoring | Frederick Muriuki Muriithi |
2022-08-10 | remove unnecessary parsing of floats | Alexander_Kabui |
2022-08-10 | code refactoring | Frederick Muriuki Muriithi |
2022-08-10 | remove unnecessary parsing of floats | Alexander_Kabui |
2022-08-10 | enhancements for rust tissue | Frederick Muriuki Muriithi |
2022-08-10 | pylint fixes | Alexander_Kabui |
2022-08-10 | code refactoring | Alexander_Kabui |
2022-08-10 | remove unnessary code | Alexander_Kabui |