elixir-cloud-aai / drs-filer

Lightweight, flexible Flask/Gunicorn-based GA4GH DRS implementation
Apache License 2.0
5 stars 8 forks source link

build: upgrade FOCA to 0.13.0 #52

Closed jvkersch closed 2 months ago

jvkersch commented 2 months ago

Description

Updates FOCA to the latest version, which is 0.13.0 at the time this PR was opened.

Fixes #49

Type of change

Please delete options that are not relevant.

Checklist:

Summary by Sourcery

This pull request updates the FOCA library to version 0.13.0, refactors the code to use the new configuration syntax, and adjusts the test cases accordingly to ensure compatibility and functionality.

sourcery-ai[bot] commented 2 months ago

Reviewer's Guide by Sourcery

This pull request updates the FOCA library to version 0.13.0. The primary change involves updating the way the FOCA configuration is accessed within the application code and tests. Specifically, the configuration is now accessed using app.config.foca instead of app.config['FOCA']. This update addresses issue #49 and ensures compatibility with the latest version of FOCA.

File-Level Changes

Files Changes
tests/ga4gh/drs/test_server.py
tests/ga4gh/drs/endpoints/test_service_info.py
tests/ga4gh/drs/endpoints/test_register_objects.py
Updated FOCA configuration access in multiple test files to use app.config.foca instead of app.config['FOCA'].
drs_filer/ga4gh/drs/endpoints/register_objects.py
drs_filer/ga4gh/drs/server.py
drs_filer/ga4gh/drs/endpoints/service_info.py
Updated FOCA configuration access in multiple endpoint and server files to use current_app.config.foca instead of current_app.config['FOCA'].

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - You can change your review settings at any time by accessing your [dashboard](https://sourcery.ai/dashboard): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.
jvkersch commented 2 months ago

Thanks @kushagra189, I've done that particular refactor in the module where there were a lot of repeated usages of that object. There was another instance where Sourcery suggested a refactor but that was not applicable (the repeated code was spread out over multiple functions).

The only open issue is the use of eval (#54). I would suggest merging this PR as-is and tackling that issue separately.