[Crop and Soil] Implement pasture crop type#3163
Open
matthew7838 wants to merge 10 commits into
Open
Conversation
github-actions
Bot
force-pushed
the
pasture-crop-type
branch
from
July 24, 2026 08:21
b7ae487 to
c6865f4
Compare
github-actions
Bot
force-pushed
the
pasture-crop-type
branch
from
July 24, 2026 08:21
c6865f4 to
6d785a4
Compare
Contributor
|
Current Coverage: 99% Mypy errors on pasture-crop-type branch: 1137 |
matthew7838
marked this pull request as ready for review
July 24, 2026 08:34
matthew7838
requested review from
allisterakun,
ew3361zh and
morrowcj
and removed request for
ew3361zh
July 24, 2026 09:15
Contributor
|
Current Coverage: 99% Mypy errors on pasture-crop-type branch: 1135 |
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.
Adds a
pasturecrop type for grazing, modeled after Tall Fescue, whose harvest deposits all cut biomass into the field as residue rather than removing it as harvested yield.Context
Issue(s) closed by this pull request: closes #3131
What
pasturecrop configuration (perennial, based on the Tall Fescue hay parameters) that is available for use in crop rotations.deposit_all_residue_at_harvest(defaultfalse).Why
A pasture crop type is needed so animals can graze. For a grazed crop, forage removal is handled by grazing rather than by the harvest operation, so a "harvest" of a pasture should leave all cut biomass in the field as residue instead of removing it as stored yield.
How
deposit_all_residue_at_harvest: bool = FalsetoCropData, to theCropConfigurationTypedDict (asNotRequired), and to the crop-configuration schema inRUFAS/input/metadata/properties/default.jsonwith"default": false(so the existing configurations auto-fill the field and are unaffected).CropManagement.manage_harvest, when the flag is set the crop is cut withcollected_fraction=0.0and_get_harvested_cropis skipped, so the method returnsNoneand all cut biomass flows to the field as residue via the existing residue-transfer path.pastureconfiguration toinput/data/crop_configurations/default_crop_configs.jsonwith the flag set totrue.manage_harvest/manage_crop_harvestreturn type toHarvestedCrop | None(the method already returnedNonefor kill-only operations) and widens the twofield.pycall-site annotations to match; this also removes a pre-existing mypy error.Test plan
Input Changes
deposit_all_residue_at_harvestboolean (defaultfalse) to each crop configuration undercrop_configuration_properties.pasturecrop configuration toinput/data/crop_configurations/default_crop_configs.json.falsefor all of them.Output Changes
Filter