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

Hack: restrict CDI date selection for lag; COUNTRY=jordan #1326

Draft
wants to merge 25 commits into
base: master
Choose a base branch
from

Conversation

gislawill
Copy link
Collaborator

@gislawill gislawill commented Aug 6, 2024

Description

This update addresses this request: #1259 (comment) and replaces #1295 (easier to use new branch rather than update the previous).

It applies the "earliestExpectedDataLagDays" logic across our default data selection and which dates are available to select.

In my opinion, this is probably not worth the effort to maintain — it's not intuitive and could easily result in future bugs. But we could always merge it has a hack and remove it once https://github.com/WFP-VAM/hip-service/issues/12 is ready.

How to test the feature:

  • Open the jordan prism instance
  • Select the Combined Drought Index (v2)

Checklist - did you ...

Test your changes with

  • REACT_APP_COUNTRY=rbd yarn start
  • REACT_APP_COUNTRY=cambodia yarn start
  • REACT_APP_COUNTRY=mozambique yarn start
  • Add / update necessary tests?
  • Add / update outdated documentation?

Screenshot/video of feature:

https://www.loom.com/share/49e0769fd9b840d78a535d68c4cbf7da

@gislawill gislawill changed the base branch from master to feat/allow-flexible-season-validity August 6, 2024 23:24
@gislawill
Copy link
Collaborator Author

@wadhwamatic, please use this branch/surge deployment for your demo

Copy link

github-actions bot commented Aug 6, 2024

Build succeeded and deployed at https://prism-1326.surge.sh
(hash 8a951b7 deployed at 2024-09-17T02:58:46)

@wadhwamatic wadhwamatic changed the title Hack: restrict CDI date selection for lag Hack: restrict CDI date selection for lag; COUNTRY=jordan Aug 7, 2024
@wadhwamatic
Copy link
Member

Thanks @gislawill for setting this up. It looks like data on the hip-analysis is out of date though and the lag approach fails with begin 2024-05-21 and end date 2024-06-21.

I'm not sure if @paololucchino is back and able to address the issue on the hip-analysis side. I'll try him..

There's a bug between the date fix in the CDI and the date restriction for forecasts. Removing forecasts for the purpose of this demo
@wadhwamatic
Copy link
Member

wadhwamatic commented Aug 7, 2024

@gislawill - I found a bug when toggling a forecast layer in this PR. It's yet another edge case for dates where we're limiting forecast data to only be available for today and forward. Don't worry about this for right now as this was a short-term solution for CDI anyway.

Base automatically changed from feat/allow-flexible-season-validity to master August 8, 2024 16:13
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