Age | Commit message (Expand) | Author |
2023-07-05 | Skip tests broken by Python-3.10 temporarily...Skip the tests that have been broken by the migrations to Python-3.10
temporarily, until we can fix them.
| Frederick Muriuki Muriithi |
2023-07-05 | Update test: create throw-away variable...* Commit `b529c700` changes the return value to a tuple of values rather than
a single string value. Handle that in the test.
| Frederick Muriuki Muriithi |
2023-05-30 | Fix linting errors and failing tests...* scripts/register_sys_admin.py: fix linting error
* tests/unit/auth/fixtures/oauth2_client_fixtures.py: hash client secret in
database. The code expects it hashed in the database.
| Frederick Muriuki Muriithi |
2023-05-25 | Set whether resource is publicly viewable on creation | Frederick Muriuki Muriithi |
2023-04-25 | auth: Roles: Check for editability...Some roles should not be user-editable, and as such, we need to check before
allowing any edits on such roles. This commit makes that possible.
| Frederick Muriuki Muriithi |
2023-04-10 | Migrations for linking genotype files. | Frederick Muriuki Muriithi |
2023-04-06 | Fix linting issues | Frederick Muriuki Muriithi |
2023-04-06 | Remove deprecated `gn3.db_utils.database_connector` function...Remove the deprecated function and fix a myriad of bugs that arise from
removing the function.
Issue: https://issues.genenetwork.org/issues/bugfix_coupling_current_app_and_db_utils
| Frederick Muriuki Muriithi |
2023-04-04 | Add tables to link genotype data | Frederick Muriuki Muriithi |
2023-03-23 | tests: Set up fixture and mock out config variable | Frederick Muriuki Muriithi |
2023-03-22 | auth: Remove the tables used for linking data to resources...The way data is linked to the resources needs to be reworked. This commit
removes all the existing migration scripts that created the tables formerly
used for linking data in preparation for reworking the system.
| Frederick Muriuki Muriithi |
2023-03-20 | Fix get_all_species test | zsloan |
2023-03-09 | auth: redis data: migrate data in redis...Implement the code to migrate the data from redis to SQLite.
| Frederick Muriuki Muriithi |
2023-03-08 | auth: users: Use the same basic functions for password hashing...To avoid repeating the same thing in multiple places, leading to errors and
breakages, reuse the same basic functions for password hashing.
| Frederick Muriuki Muriithi |
2023-03-06 | auth: privileges/roles: fix issues caught by tests. | Frederick Muriuki Muriithi |
2023-02-21 | auth: migrations: Link to data in main db...Provide the `linked_group_data` table to be used to link to data in the main
database.
Update the `mrna_resources`, `genotype_resources` and `phenotype_resources`
tables to rely on the `linked_group_data` table.
| Frederick Muriuki Muriithi |
2023-02-10 | Return empty tuple rather than Nothing...When user has no roles assigned, return an empty tuple rather than
pymonad.maybe.Nothing to ease maintenance.
| Frederick Muriuki Muriithi |
2023-02-08 | auth: groups: handle join requests. | Frederick Muriuki Muriithi |
2023-02-07 | auth: groups: Enable users to request to join group. | Frederick Muriuki Muriithi |
2023-02-06 | auth: resource: Enable viewing the details of a resource. | Frederick Muriuki Muriithi |
2023-02-03 | auth: tests: mock token acquisition. Fix minor bugs. | Frederick Muriuki Muriithi |
2023-02-02 | auth: Reorganise modules/packages for easier dev and maintenance...Split the views/routes into separate modules each dealing with a narrower
scope of the application to aid in maintenance, and help with making the
development easier.
| Frederick Muriuki Muriithi |
2023-01-24 | tests: Expect exact integer value when applying SI suffix....* tests/unit/test_search.py (test_apply_si_suffix_kilo,
test_apply_si_suffix_mega, test_apply_si_suffix_giga): Update docstring
indicating that we expect the exact integer value.
| Arun Isaac |
2023-01-24 | search: Abstract out parsing of position spec into separate function....* gn3/api/search.py (parse_position): New function.
(parse_location_field): Use parse_position.
* tests/unit/test_search.py: Import parse_position from gn3.api.search.
(test_parse_position_close_to_zero_location): New test.
| Arun Isaac |
2023-01-23 | auth: create group: Fix group creation....* gn3/auth/authorisation/checks.py: Enable passing user to authorisation
checking function. Raise error on authorisation failure for consistent error
handling.
* gn3/auth/authorisation/groups.py: Add user to group, updating the privileges
as appropriate.
* gn3/auth/authorisation/resources.py: Fix resources querying
* gn3/auth/authorisation/roles.py: Assign/revoke roles by name
* gn3/auth/authorisation/views.py: Create group
* migrations/auth/20221108_01_CoxYh-create-the-groups-table.py: Add
group_metadata field
* tests/unit/auth/fixtures/group_fixtures.py: fix tests
* tests/unit/auth/test_groups.py: fix tests
* tests/unit/auth/test_resources.py: fix tests
* tests/unit/auth/test_roles.py: fix tests
| Frederick Muriuki Muriithi |
2023-01-21 | tests: roles - Extract values from Maybe object | Frederick Muriuki Muriithi |
2023-01-21 | tests: Fix linting errors | Frederick Muriuki Muriithi |
2023-01-19 | tests: Add unit tests for search....* tests/unit/test_search.py: New file.
| Arun Isaac |
2023-01-18 | auth: Fix tests after enforcing FOREIGN KEY constraint...Fix a number of tests and fixtures that were not conforming to the FOREIGN KEY
constraints:
* Each test that creates a new "object" needs to clean up after itself
* Each fixture that sets up test data needs to clean up after itself
| Frederick Muriuki Muriithi |
2023-01-16 | auth: update privileges format...Save privileges with ids of the form <top-level>:<sub-level>:<privilege-name>
rather than using a UUID, to reduce indirection levels.
* migrations/auth/20230116_01_KwuJ3-rework-privileges-schema.py: new migration
to change the schema and IDs for the privileges.
* Update code to use new privileges format
* gn3/auth/authorisation/checks.py
* gn3/auth/authorisation/groups.py
* gn3/auth/authorisation/privileges.py
* gn3/auth/authorisation/resources.py
* gn3/auth/authorisation/roles.py
* migrations/auth/20230116_01_KwuJ3-rework-privileges-schema.py
* tests/unit/auth/fixtures/role_fixtures.py
* tests/unit/auth/test_groups.py
* tests/unit/auth/test_privileges.py
* tests/unit/auth/test_roles.py
| Frederick Muriuki Muriithi |
2023-01-11 | auth: assign default role. separate group creation from group admin...A newly registered user will have the ability to create a group.
Once a user is a member of a group, either by creating a new group, or being
added to a group, they should not be able to create any more groups, i.e. they
lose the 'create-group' (and/or equivalent) privileges.
This means that the group-administration privileges should be separated from
the group-creation privilege.
* gn3/auth/authorisation/roles.py: assign default roles to user on
registration
* gn3/auth/authorisation/views.py: assign default roles to user on
registration
* migrations/auth/20230111_01_Wd6IZ-remove-create-group-privilege-from-group-leader.py:
separate group-creation role from group-administration role.
* tests/unit/auth/fixtures/user_fixtures.py: Add group-creation role to test
user
* tests/unit/auth/test_roles.py: Add the group-creation role explicitly in the
expected results for the test
| Frederick Muriuki Muriithi |
2023-01-03 | auth: Fetch all of a user's roles....* gn3/auth/authorisation/roles.py: Fetch roles from DB
* gn3/auth/authorisation/views.py: Provide API endpoint for user roles
* tests/unit/auth/test_roles.py: Tests to check fetching roles works correctly
Fix linting and typing issues in the following files:
* gn3/auth/authentication/oauth2/resource_server.py
* gn3/auth/authentication/oauth2/views.py
* tests/unit/auth/fixtures/oauth2_client_fixtures.py
| Frederick Muriuki Muriithi |
2023-01-03 | auth: rename fixtures: test_* -> fxtr_*...Since test functions are defined starting with "test_", rename the fixture to
more clearly indicate it is a fixture (fxtr_*), an not a test in itself.
| Frederick Muriuki Muriithi |
2022-12-22 | tests: Setup environment variables and configs...* gn3/settings.py: leave `OAUTH2_ACCESS_TOKEN_GENERATOR` in its default
setting
* tests/unit/auth/fixtures/oauth2_client_fixtures.py: setup
`AUTHLIB_INSECURE_TRANSPORT` before running the OAuth2 tests
* tests/unit/conftest.py: setup the test application's configuration correctly
for the tests.
| Frederick Muriuki Muriithi |
2022-12-22 | auth: implement OAuth2 flow....Add code to implement the OAuth2 flow.
* Add test fixtures for setting up users and OAuth2 clients
* Add tests for token generation with the "Password Grant" flow
* Fix some issues with test due to changes in the database connection's
row_factory
oauth2_auth_flow | Frederick Muriuki Muriithi |
2022-12-21 | migrations: create the authorisation_code table...* migrations/auth/20221219_03_PcTrb-create-authorisation-code-table.py: new
migration
* tests/unit/auth/test_migrations_create_tables.py: test new migration
| Frederick Muriuki Muriithi |
2022-12-21 | migrations: create oauth2_tokens table...* migrations/auth/20221219_02_buSEU-create-oauth2-tokens-table.py
* tests/unit/auth/test_migrations_create_tables.py
| Frederick Muriuki Muriithi |
2022-12-21 | migrations: New migration...* migrations/auth/20221219_01_CI3tN-create-oauth2-clients-table.py: New
migration
* tests/unit/auth/test_migrations_create_tables.py: tests for new migration
| Frederick Muriuki Muriithi |
2022-12-21 | gn3: (gn3.random -> gn3.chancy): Rename module to avoid conflicts....Rename the `gn3.random` module to gn3.chancy to avoid conflicts with Python's
`random` module.
* gn3/random.py -> gn3/chancy.py: rename module
* gn3/commands.py: update import
* gn3/computations/partial_correlations.py: update import
* gn3/computations/qtlreaper.py: update import
* gn3/computations/rust_correlation.py: update import
* gn3/db/correlations.py: update import
* gn3/db/traits.py: update import
* gn3/heatmaps.py: update import
* tests/integration/conftest.py: update import
| Frederick Muriuki Muriithi |
2022-12-12 | tests: Update fixtures to use for testing resources functions | Frederick Muriuki Muriithi |
2022-12-12 | auth: pass cursor object to `user_group` function | Frederick Muriuki Muriithi |
2022-12-12 | auth: Attach group to GroupRole, rather than group_id | Frederick Muriuki Muriithi |
2022-12-12 | tests: Reorganise fixtures...Split the fixtures into separate modules for easier management
* tests/unit/auth/conftest.py: Import all from the `fixtures` package. Delete
all fixtures from the file
* tests/unit/auth/fixtures/__init__.py: new `fixtures` package
* tests/unit/auth/fixtures/group_fixtures.py: new groups fixtures module
* tests/unit/auth/fixtures/migration_fixtures.py: new migrations fixtures
module
* tests/unit/auth/fixtures/resource_fixtures.py: new resources fixtures module
* tests/unit/auth/fixtures/role_fixtures.py: new roles fixtures module
* tests/unit/auth/fixtures/user_fixtures.py: new users fixtures module
| Frederick Muriuki Muriithi |
2022-12-08 | auth: test for `user_resources` function (incomplete)...* gn3/auth/authorisation/resources.py: dummy `user_resources` function
* tests/unit/auth/conftest.py: (incomplete): Add some fixtures for testing the
`user_resources` function
* tests/unit/auth/test_resources.py: test the `user_resources` function
| Frederick Muriuki Muriithi |
2022-12-08 | tests: Fix issues caught by tests...The addition of the `public` field in the `resources` table, led to some
previously passing tests to fail. This commit fixes the failures, and cleans
up some pylint issues.
* gn3/auth/authorisation/resources.py: add `public` to db queries
* tests/unit/auth/test_groups.py: fix pylint issues
| Frederick Muriuki Muriithi |
2022-12-08 | auth: add test to retrieve public resources...* gn3/auth/authorisation/resources.py: new functions
* resource_categories: retrieves all resource categories
* public_resources: retrieves all public resources
* tests/unit/auth/test_resources.py: test `public_resources` function
| Frederick Muriuki Muriithi |
2022-12-08 | auth: add function to retrieve a user's group...* gn3/auth/authorisation/groups.py: new `user_group` function
* tests/unit/auth/test_groups.py: test `user_group` function
| Frederick Muriuki Muriithi |
2022-12-08 | migrations: Add column `public` to `resources` table...* migrations/auth/20221208_01_sSdHz-add-public-column-to-resources-table.py:
new migration script.
* tests/unit/auth/test_migrations_add_remove_columns.py: test new migration
script
| Frederick Muriuki Muriithi |
2022-12-06 | migrations: Add `group_user_roles_on_resources` table...* migrations/auth/20221206_01_BbeF9-create-group-user-roles-on-resources-table.py:
new migration
* tests/unit/auth/test_migrations_create_tables.py: Test creation of table
* tests/unit/auth/test_migrations_indexes.py: Test creation of index
| Frederick Muriuki Muriithi |
2022-12-06 | mypy and pylint fixes | Alexander_Kabui |