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

Forecast - Actual column split #3405

Closed
wants to merge 18 commits into from
Closed

Conversation

brettedw
Copy link
Collaborator

@brettedw brettedw commented Feb 13, 2024

  • splits out forecast and actual columns
  • removes N/A for forecast-able cells
  • disables cells for previous dates
  • No 'Actual' label in Actual column

closes #3394

Test Links:

Landing Page
MoreCast 2.0
Percentile Calculator
MoreCast
C-Haines
FireBat
FireBat bookmark
Auto Spatial Advisory (ASA)
HFI Calculator

Copy link

codecov bot commented Feb 13, 2024

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (df91b76) 81.08% compared to head (2fad87a) 81.04%.
Report is 2 commits behind head on main.

❗ Current head 2fad87a differs from pull request most recent head 16dbe65. Consider uploading reports for the commit 16dbe65 to get more accurate results

Files Patch % Lines
...res/moreCast2/components/GridComponentRenderer.tsx 83.33% 0 Missing and 3 partials ⚠️
...c/features/moreCast2/components/TabbedDataGrid.tsx 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3405      +/-   ##
==========================================
- Coverage   81.08%   81.04%   -0.04%     
==========================================
  Files         280      280              
  Lines        9805     9815      +10     
  Branches      454      459       +5     
==========================================
+ Hits         7950     7955       +5     
- Misses       1733     1736       +3     
- Partials      122      124       +2     

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

@brettedw brettedw requested review from conbrad and dgboss February 14, 2024 16:22
Copy link
Collaborator

@conbrad conbrad left a comment

Choose a reason for hiding this comment

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

Looking good, thanks for tests! I'm wondering if we should model the grass curing cell differently from forecast/actual or if it's worth the effort to include the distinction. I guess a grass curing value is an actual?


const isActual = !isNaN(params.row[actualField])
// We can disable a cell if an Actual exists or the forDate is before today.
// Both forDate and today are currently in the system's time zone
Copy link
Collaborator

Choose a reason for hiding this comment

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

I know this is relatively simple, but could we pull this out into a helper function? Would make it easier to test and keep renderForecastCellWith focused on the rendering.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep I can do that. I was also thinking the logic on line 85, setting value might be better to put in the predictionItemValueFormatter....it would keep formatting in the Formatter. Worth changing?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah I think that's a good call too

@brettedw
Copy link
Collaborator Author

brettedw commented Feb 14, 2024

Looking good, thanks for tests! I'm wondering if we should model the grass curing cell differently from forecast/actual or if it's worth the effort to include the distinction. I guess a grass curing value is an actual?

I initially thought the forecast/actual was the way to go for GC. It kind of makes sense, there is an 'actual' or 'estimated actual' and a 'forecast' as BS pointed out. Having an Actual also makes it nice and easy to disable the cells when an 'Actual' is posted. Honestly I'm not sure what the best way to go is, and what's worth the effort. Open to ideas

Copy link
Collaborator

@dgboss dgboss left a comment

Choose a reason for hiding this comment

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

Nice work! I think it looks good once the changes you and Conor commented on are implemented.

@conbrad
Copy link
Collaborator

conbrad commented Feb 14, 2024

Looking good, thanks for tests! I'm wondering if we should model the grass curing cell differently from forecast/actual or if it's worth the effort to include the distinction. I guess a grass curing value is an actual?

I initially thought the forecast/actual was the way to go for GC. It kind of makes sense, there is an 'actual' or 'estimated actual' and a 'forecast' as Brett Soderholm pointed out. Having an Actual also makes it nice and easy to disable the cells when an 'Actual' is posted. Honestly I'm not sure what the best way to go is, and what's worth the effort. Open to ideas

Ok cool, yeah I think this makes sense. If there was more divergence in the way GC works and it felt like fitting a square peg in a round hole it'd probably be worth the effort to implement a separate code path, but it seems to fit the model, at least for now.

Copy link

Quality Gate Passed Quality Gate passed

Issues
1 New issue

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@brettedw brettedw closed this Feb 15, 2024
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.

MoreCast 2.0: Implement forecast & actual column changes
3 participants