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

Add dcas error handling #385

Merged
merged 13 commits into from
Jan 28, 2025
Merged

Add dcas error handling #385

merged 13 commits into from
Jan 28, 2025

Conversation

osundwajeff
Copy link
Contributor

@osundwajeff osundwajeff commented Jan 22, 2025

Fix: #317

Copy link

github-actions bot commented Jan 22, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
14921 14093 94% 0% 🟢

New Files

No new covered files...

Modified Files

No covered modified files...

updated for commit: 0a5cce7 by action🐍

Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 96.70330% with 3 lines in your changes missing coverage. Please review.

Project coverage is 94.33%. Comparing base (67e886e) to head (0a5cce7).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
django_project/dcas/models/error_log.py 77.77% 2 Missing ⚠️
django_project/dcas/queries.py 92.85% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #385      +/-   ##
==========================================
+ Coverage   94.26%   94.33%   +0.06%     
==========================================
  Files         250      252       +2     
  Lines       14098    14461     +363     
==========================================
+ Hits        13290    13642     +352     
- Misses        808      819      +11     

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

@osundwajeff osundwajeff marked this pull request as ready for review January 23, 2025 23:15
django_project/core/celery.py Outdated Show resolved Hide resolved
@danangmassandy
Copy link
Collaborator

danangmassandy commented Jan 24, 2025

@osundwajeff could you also add the export to csv/excel from the django admin page? maybe add it as another new ticket.

@osundwajeff
Copy link
Contributor Author

@danangmassandy This is the PR with the failing test that needs to be looked at

@danangmassandy
Copy link
Collaborator

@osundwajeff it seems the error is because the crop-plan API tries to fetch all Farms, so your test farms might also get fetched. Could you add request parameters farm_ids in the request like below?

response = self.request(
    reverse('api:v1:crop-plan') +
    '?farm_ids=farm-1,farm-2'
)

Please add the request parameters in the failed test below:
https://github.com/kartoza/tomorrownow_gap/blob/main/django_project/gap_api/tests/test_crop_plan_api.py#L122

@osundwajeff
Copy link
Contributor Author

I'll do that thanks @danangmassandy

@danangmassandy danangmassandy merged commit a47886d into main Jan 28, 2025
4 checks passed
@danangmassandy danangmassandy deleted the dcas_error_handling branch January 28, 2025 08:27
@osundwajeff
Copy link
Contributor Author

@mvmaltitz Just in case you are wondering about ticket #391, It has been merged already

@mvmaltitz mvmaltitz linked an issue Jan 30, 2025 that may be closed by this pull request
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.

DCAS Error handling: Add the export to csv/excel DCAS: Error handling
2 participants