[EEE] Migrate farmgrown feed emissions fix from PR 3202 to dev - #3288
Open
matthew7838 wants to merge 17 commits into
Open
matthew7838 wants to merge 17 commits into
matthew7838 wants to merge 17 commits into
Conversation
Processes harvests chronologically across all fields with per-field accumulation windows and kg units, matching the test branch, and removes the PR 2720 feed inventory reset that test never had.
Contributor
|
Current Coverage: 99% Mypy errors on fgf-from-test branch: 1164 |
Contributor
|
Current Coverage: 99% Mypy errors on fgf-from-test branch: 1164 |
Contributor
|
Current Coverage: 99% Mypy errors on fgf-from-test branch: 1164 |
Contributor
|
Current Coverage: 99% Mypy errors on fgf-from-test branch: 1164 |
Contributor
|
Current Coverage: 99% Mypy errors on fgf-from-test branch: 1164 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates the farmgrown feed emissions fix from PR #3202 (
test, v1.0.4) todev.Context
Issue(s) closed by this pull request: closes #3265. Supersedes draft PR #3230.
What
_calculate_daily_farmgrown_feed_emissions_and_resources()processes harvests chronologically across all fields with a separate accumulation window per field, keeps a window open acrosskill_onlyharvests, and takes a feed's next harvest date from any field, so a feed grown in several fields is allocated correctly.testnever had, together with_gather_farmgrown_feed_inventory_data(), its filter, and its tests.Why
Aligns
devwith thetestpatch tracked in #3231.How
Same logic as #3202, written on top of the helpers introduced in #3237. The allocation function returns the same results as the
testimplementation on the unit-test fixtures and on 300 randomized multi-field harvest schedules.Test plan
Input Changes
Output Changes
EmissionsEstimator._report_daily_farmgrown_feed_fed_emissions_and_resources.*: values change where a feed is grown in more than one field, where a cover crop is killed without a harvest, or where the [Emissions] FGF Emissions Reset #2720 reset previously fired.Filter
{ "name": "farmgrown_feed_emissions", "filters": ["EmissionsEstimator._report_daily_farmgrown_feed_fed_emissions_and_resources.*"] }