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

Replace littletable with redis-om(redisearch) #1788

Merged
merged 28 commits into from
Jan 18, 2024

Conversation

sainak
Copy link
Member

@sainak sainak commented Dec 27, 2023

Proposed Changes

This pull request updates the code to use Redisearch for PMJYPackages, ICD11 and Medibase data. It includes changes to load the data into Redis and use Redisearch for querying.

https://redis.io/docs/interact/search-and-query/query/full-text/
https://github.com/redis/redis-om-python

Associated Issue

Architecture changes

  • use redis search instead of littletable
  • replace the default redis image with redis-stack
  • add command to load redis index
  • use celery beat to load redis search index
  • call a celery task in case the redis crashes
  • add healthcheck definition for docker containers
  • always wait for containers to become healthy
image image

Merge Checklist

  • Tests added/fixed
  • Update docs in /docs
  • Linting Complete
  • Any other necessary step

Only PR's with test cases included and passing lint and test pipelines will be reviewed

@coronasafe/care-backend-maintainers @coronasafe/care-backend-admins

@sainak sainak changed the title Use Redisearch for ICD11 and Medibase Replace littletable with redis-om Dec 27, 2023
@sainak sainak added the In progress Work in progress label Dec 27, 2023
@sainak sainak force-pushed the sainak/feat/redis-search branch 2 times, most recently from 2be3bcd to e015c41 Compare December 28, 2023 08:04
Copy link

codecov bot commented Dec 28, 2023

Codecov Report

Attention: 75 lines in your changes are missing coverage. Please review.

Comparison is base (7d0dd82) 61.57% compared to head (0341a96) 61.64%.

Files Patch % Lines
...e/facility/management/commands/load_redis_index.py 0.00% 16 Missing ⚠️
care/facility/static_data/icd11.py 68.29% 11 Missing and 2 partials ⚠️
care/facility/tasks/redis_index.py 45.83% 13 Missing ⚠️
care/hcx/api/viewsets/gateway.py 33.33% 10 Missing ⚠️
care/facility/static_data/medibase.py 77.14% 8 Missing ⚠️
care/hcx/static_data/pmjy_packages.py 66.66% 8 Missing ⚠️
care/utils/static_data/models/base.py 69.23% 4 Missing ⚠️
care/facility/api/viewsets/prescription.py 86.66% 1 Missing and 1 partial ⚠️
care/facility/api/viewsets/icd.py 92.85% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1788      +/-   ##
==========================================
+ Coverage   61.57%   61.64%   +0.07%     
==========================================
  Files         208      212       +4     
  Lines       11556    11658     +102     
  Branches     1649     1650       +1     
==========================================
+ Hits         7116     7187      +71     
- Misses       4149     4180      +31     
  Partials      291      291              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sainak sainak added waiting-for-review and removed In progress Work in progress labels Dec 28, 2023
@sainak sainak changed the title Replace littletable with redis-om Replace littletable with redis-om(redisearch) Dec 28, 2023
@rithviknishad rithviknishad added the P1 High priority; urgent label Jan 8, 2024
@nihal467
Copy link
Member

nihal467 commented Jan 8, 2024

its a p1 priority , for fixing facility cover image upload in local

coronasafe/care_fe#6994

@vigneshhari vigneshhari merged commit d400864 into master Jan 18, 2024
11 checks passed
@vigneshhari vigneshhari deleted the sainak/feat/redis-search branch January 18, 2024 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 High priority; urgent waiting-for-review
Projects
None yet
5 participants