Skip to content

review branch#7

Open
EstebanMontandon wants to merge 2 commits intomainfrom
review_d2d
Open

review branch#7
EstebanMontandon wants to merge 2 commits intomainfrom
review_d2d

Conversation

@EstebanMontandon
Copy link
Collaborator

@EstebanMontandon EstebanMontandon commented Mar 13, 2026

This is a review branch of the d2d development.

Files to focus the review:

-extract.py
-push.py
-data_models.py
-Related tests.

Main changes on extract and push functionalities:

-Refactored to use polars instead of pandas
-Logging in extract and push uses a generic function from utils.
-DHIS2Extractor format the extracts following DHIS2 naming.
-DHIS2Pusher class expects an extract with DHIS2 naming (extract -> push).
-Push class classifies datapoints based on polars filtering on hard rules (faster).
-Serialization (import and remove payload) handled in the DataPointModel Class definition (data_models.py)
-Testing basic functionalities for : DHIS2Extractor , DHIS2Pusher and DataPointModel.

Next steps and ideas (No need to review these files):

-DHIS2Extractor uses three separate classes to handle data elements, reporting rates, and indicators. I've created a branch with an alternative approach that uses DHIS2's standard API endpoints (dataValueSets & Analytics) instead. This aligns better with DHIS2's architecture, but requires users to provide additional parameters when using Analytics data.
-OrgUnitModel class (data_models.py): needs a simplification.
-DHIS2Pusher class should be able to push OrgUnits for creation and update, so the org_unit_aligner can make use of it.
-DHIS2PyramidAligner (org_unit_aligner.py): Util class to handle the creation and update of DHIS2 pyramid (..implement DHIS2Pusher).
-DatasetCompletionSync (dataset_completion.py): Util class to retrieve and push dataset reporting statuses. Very slow as DHIS2 API does not allow updates in bulk. Needs a review.

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.

1 participant