Skip to content

RDI Access change for retrieving data from Kobo Reinstated #4507

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

Merged

Conversation

johniak
Copy link
Contributor

@johniak johniak commented Dec 5, 2024

AB#198299
This pull request includes several changes to the kobo API and related files to improve the functionality and maintainability of the codebase. The most important changes include the refactoring of the KoboAPI class, updates to the environment configurations, and removal of deprecated code.

Refactoring of KoboAPI class:

  • src/hct_mis_api/apps/core/kobo/api.py: Refactored the KoboAPI class to simplify initialization and request handling, including the removal of the BusinessArea dependency and the introduction of _get_request and _get_paginated_request methods. [1] [2] [3] [4] [5]

Updates to environment configurations:

Removal of deprecated code:

Additional changes:

Copy link

codecov bot commented Dec 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.80%. Comparing base (29623b9) to head (8ea785b).
Report is 9 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4507      +/-   ##
===========================================
+ Coverage    86.49%   86.80%   +0.31%     
===========================================
  Files          624      624              
  Lines        37703    37641      -62     
===========================================
+ Hits         32612    32676      +64     
+ Misses        5091     4965     -126     
Flag Coverage Δ
e2e 86.80% <100.00%> (+0.31%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

class TestResolveAssetsList:
@pytest.fixture(autouse=True)
def use_kobo_master_token(self, settings: Any) -> None:
settings.KOBO_MASTER_API_TOKEN = "test-token"
Copy link
Collaborator

Choose a reason for hiding this comment

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

how does this test run, on production, there is a token?

…data-from-Kobo-NEW

# Conflicts:
#	development_tools/.env.example
#	src/hct_mis_api/apps/core/kobo/api.py
#	src/hct_mis_api/apps/core/models.py
#	src/hct_mis_api/apps/core/schema.py
#	src/hct_mis_api/config/settings.py
pavlo-mk added 2 commits July 2, 2025 16:16
…trieving-data-from-Kobo-NEW' into feature/RDI-Access-change-for-retrieving-data-from-Kobo-NEW
@pavlo-mk pavlo-mk enabled auto-merge July 2, 2025 14:20
@pavlo-mk pavlo-mk merged commit adf67ee into develop Jul 2, 2025
12 checks passed
@pavlo-mk pavlo-mk deleted the feature/RDI-Access-change-for-retrieving-data-from-Kobo-NEW branch July 2, 2025 14:52
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.

4 participants