phenopolis / phenopolis_genomics_browser

Python API and React frontend for the Phenopolis Genomics Browser
https://dev-live.phenopolis.org
MIT License
31 stars 2 forks source link

Fixing backend variant data format to frontend #283

Closed alanwilter closed 3 years ago

alanwilter commented 3 years ago

Please REVIEW it and if OK, merge it.

To address #253. I basically brought back some features/functions @priesgo had removed while refactoring variant. I don't know what was his specific intentions but from his comments over the code, more refactoring were considered.

views/__init__.py has an ugly solution to get phenoid_mapping initialised, which is needed only once and I couldn't think of anywhere better. HOWEVER, all "neat" solutions I tried didn't work (mostly circular import issues) and phenoid_mapping depends on the DB. Suggestions, even humiliating ones, are more than welcome.

Originally, phenoid_mapping were created in variant.py but then it was called (queried) every time one searches a variant.

netlify[bot] commented 3 years ago

Deploy preview for phenopolis-dev canceled.

Built with commit 38fa1cf12a43d99aefa7fbb9bca2ae4ac6f8e1f4

https://app.netlify.com/sites/phenopolis-dev/deploys/5fb91df6368c370007d2b891

alanwilter commented 3 years ago

I couldn't find any better solution for views/__init__.py, so please have a look. If nothing else, I ask to merge it as it address issues in #253

pontikos commented 3 years ago

@alanwilter do you want me to merge this?

alanwilter commented 3 years ago

I do, but before, what do you think about my comment https://github.com/phenopolis/phenopolis_browser/pull/283#discussion_r530579015 ?