carbon do_redd and do_valuation are dependent on calc_sequestration. #BITBUCKET-3912.

This commit is contained in:
David Fisher 2019-11-03 12:50:02 -08:00
parent d525ac09b3
commit 89e8b8637b
2 changed files with 3 additions and 26 deletions

View File

@ -39,7 +39,7 @@ ARGS_SPEC = {
},
"calc_sequestration": {
"type": "boolean",
"required": False,
"required": "do_valuation | do_redd",
"about": (
"Check to enable sequestration analysis. This requires "
"inputs of Land Use/Land Cover maps for both current and "

View File

@ -333,9 +333,7 @@ class CarbonValidationTests(unittest.TestCase):
'workspace_dir',
'lulc_cur_path',
'carbon_pools_path',
'lulc_cur_year',
'lulc_fut_year',
'lulc_fut_path',
'calc_sequestration',
'lulc_redd_path',
])
self.assertEqual(invalid_keys, expected_missing_keys)
@ -351,30 +349,9 @@ class CarbonValidationTests(unittest.TestCase):
'workspace_dir',
'lulc_cur_path',
'carbon_pools_path',
'lulc_cur_year',
'lulc_fut_year',
'lulc_fut_path',
'calc_sequestration',
'price_per_metric_ton_of_c',
'discount_rate',
'rate_change',
])
self.assertEqual(invalid_keys, expected_missing_keys)
"""
1. Test that the model will run given the
argument requirements stated in ARGS SPEC.
Build an arg set that meets the spec requirements
and then run the model and observe no errors.
2. Test that argument requirements stated in ARGS SPEC
are not too strict. Will the model run without
meeting all those requirements? How would I test this?
3. Test that validation API works as expected given the
conditional logic in ARGS_SPEC required fields. Functionality
of common expressions (such as a single arg key string)
is adequately tested by test_validation.py.
Custom logical expressions should have tests here.
4.
"""