Repository navigation
Crown base height: regenerate client, add crown base height creator (#246) - #247
Merged
Merged
Conversation
…#246) create_tree_inventory_from_crown_base_height wraps the new allometry/crown_base_height route. create_tree_inventory_from_gdam gains crown_base_height_model and overwrite, and imputes crown_base_height by default. Both accept a crown base height model by name, as a mapping, or as a model object. Modification attributes swap crown_ratio for crown_base_height, matching the API's InventoryAttribute; a crown_ratio modification now raises ValueError client-side.
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.
Closes #246.
Brings the v2 client up to the crown base height contract deployed in silvxlabs/FastFuels-API-v2#749.
crown_ratiostays FIA's compacted crown ratio; the newcrown_base_heightcolumn (m) is what voxelize and canopy grids read.Breaking:
InventoryAttributedropsCROWN_RATIOand gainsCROWN_BASE_HEIGHT, sotree_attribute("crown_ratio", ...)andmodify_trees("crown_ratio", ...)now raiseValueError(the API already returns 422 for them). Also breaking: the GDAM request models are renamed after silvxlabs/FastFuels-API-v2#752 —CreateGdamInventoryRequest→CreateGdamAllometryRequestandCreateGdamInventoryRequestImputeColumnsItem→CreateGdamAllometryRequestImputeColumnsItem(the new crown base height request isCreateCrownBaseHeightAllometryRequest). Release as v0.24.0.Changes
client_library/from the prod spec (26 files: the new crown base height route, its request and 7 model classes,InventoryAttribute,InventoryColumnMapping.crown_base_height, GDAMoverwrite/crown_base_height_model, description updates).create_tree_inventory_from_crown_base_height(domain, source_inventory, model=None, overwrite=False, ...).modeltakes a name ("toney_reeves_2009"), a{"name": ...}mapping, or a generated model object; unknown values raiseValueErrorbefore any request.create_tree_inventory_from_gdamgainscrown_base_height_modelandoverwrite; docstring now lists all four impute columns.Raises, and the inventories, modify/treat and migration guides usecrown_base_height. The CHM stem-isolationcrown_ratio(a window-size parameter) is unchanged.sourcerecords it).Testing
overwrite=True; fusion expects acrown_base_heightcolumn) and have not been run yet.