Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove alchy and use SQLAlchemy instead #59

Merged
merged 11 commits into from
May 22, 2024
Merged

Remove alchy and use SQLAlchemy instead #59

merged 11 commits into from
May 22, 2024

Conversation

northwestwitch
Copy link
Member

@northwestwitch northwestwitch commented May 20, 2024

This PR adds | fixes:

How to prepare for test:

  • pip install -e .
  • Start a local demo database --> chanjo init --auto demodata
  • Load the transcripts --> chanjo --config demodata/chanjo.yaml link demodata/hgnc.grch37p13.exons.bed

Load 3 samples (coverage files are located in chanjo, not chanjo2)

  • chanjo --config demodata/chanjo.yaml load --sample sample1 --name sample1 --group-name test_group -g test_group <PATH_TO_CHANJO>/chanjo/init/demo-files/sample1.coverage.bed
  • chanjo --config demodata/chanjo.yaml load --sample sample2 --name sample2 --group-name test_group -g test_group <PATH_TO_CHANJO>/chanjo/init/demo-files/sample2.coverage.bed
  • chanjo --config demodata/chanjo.yaml load --sample sample3 --name sample3 --group-name test_group -g test_group <PATH_TO_CHANJO>/chanjo/init/demo-files/sample3.coverage.bed

How to test:

  • Run the server --> chanjo --config demodata/chanjo.yaml report --render html
  • Check the report in a brower at this address --> http://localhost:5000/report?sample_id=sample1&sample_id=sample2&sample_id=sample3
  • Check the genes overview at http://localhost:5000/genes?level=10&sample_id=sample1&sample_id=sample2&sample_id=sample3
  • Check the endpoint used by scout to create the MT coverage on the MT report:
curl --header "Content-Type: application/json" \
  --request POST \
  --data '{"chrom":"1","sample_ids":"sample1,sample2,sample3"}' \
http://localhost:5000/json_chrom_coverage

Expected outcome:

  • The report shoud be shown without errors

Review:

  • Code approved by DN
  • Tests executed by CR

This version is a:

  • MAJOR - when you make incompatible API changes
  • MINOR - when you add functionality in a backwards compatible manner
  • PATCH - when you make backwards compatible bug fixes or documentation/instructions

@northwestwitch northwestwitch added the enhancement New feature or request label May 20, 2024
requirements.txt Outdated
cairocffi
chanjo>=4.1.0
chanjo @ git+https://github.com/Clinical-Genomics/chanjo@deprecate_alchy
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work in PyPI, so we have to create a chanjo release first

@northwestwitch
Copy link
Member Author

@dnil I've created a PR that works in a combo with a chanjo one

@@ -11,8 +11,6 @@ path.py
pymysql
pyscss
six
sqlservice
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😸

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I gets installed by chanjo, so it's not that the lib isn't going to be there..

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you actually import something from it, or use it directly, it should certainly be here. If you don't... 😜
It's all good as it is now with this PR as well. Just saying. 😉

Copy link

@dnil dnil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, but we should test carefully with some real life cases in an integrated env (stage) before releasing!

@@ -11,8 +11,6 @@ path.py
pymysql
pyscss
six
sqlservice
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you actually import something from it, or use it directly, it should certainly be here. If you don't... 😜
It's all good as it is now with this PR as well. Just saying. 😉

chanjo_report/server/extensions.py Show resolved Hide resolved
@northwestwitch
Copy link
Member Author

This looks good to me, but we should test carefully with some real life cases in an integrated env (stage) before releasing!

I agree!

@northwestwitch
Copy link
Member Author

This is tested again after changing the requirements to use the new chanjo v4.7. Works fine so I'm merging!

@northwestwitch northwestwitch merged commit 2fcf0a0 into main May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Completely replace alchy with sqlservice
2 participants