Skip to content

feat(#10019): refactor shared-libs/lineage library to use cht-datasource #10025

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

Conversation

shashi-sah2003
Copy link
Contributor

Description

This pull request refactors the lineage module to replace direct database queries with calls to a new dataContext object, improving modularity and testability. It also updates the associated unit tests to mock the dataContext methods.

fixes #10019

License

The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.

@shashi-sah2003
Copy link
Contributor Author

shashi-sah2003 commented Jun 6, 2025

@sugat009 @jkuester I have tried to make changes for shared-libs/lineage, the main changes was in the hydration.js file.
I have made changes to few functions but I'm a little confused with contactUuidByShortcode and fetchHydratedDocs in these functions here, what do you think about these functions, their definition and utility in cht-datasource doesn't align, so should I left these as it is directly querying database?

Signed-off-by: Shashi Sah <[email protected]>
@shashi-sah2003 shashi-sah2003 deleted the 10019-refactor(shared-libs/lineage)-(cht-datasource) branch June 12, 2025 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants