This should return a string representing your model's version.
New return format for get_inputs:
This should return a dictionary: {"meta_parameters": {...}, "model_parameters": {...}}
The meta_parameters defaults and the defaults for each section in model_parameters should be ParamTools compliant, i.e. they can be loaded from paramtools.Parameters.
This should return a dictionary: {"errors_warnings": {...}, "custom_adjustment: {...}}
"custom_adjustment" is optional. Projects that do not use ParamTools for their inputs may use "custom_adjustment" to return data in their native inputs format.
Function run_model should not include "model_version" in its results since that information is available in the new get_version function.
compute-studio-kit now uses a test class that integrates better with pytest. Define your tests like this (of course, csk-init will write a template in test_functions.py to help you get started):
Criteria Changes:
New Function:
get_version
New return format for
get_inputs
:{"meta_parameters": {...}, "model_parameters": {...}}
meta_parameters
defaults and the defaults for each section inmodel_parameters
should be ParamTools compliant, i.e. they can be loaded fromparamtools.Parameters
.Parameters
in ParamTools 0.10.0 calleddump
which returns data meeting this requirement. Projects that use labels like "year" should set the state of theParameters
instance usingparams.set_state(year=new_year)
before callingdump
. Here is the diff for Tax-Brain to demonstrate these changes: https://github.com/PSLmodels/Tax-Brain/compare/master...hdoupe:cs-update?diff=split&expand=1#diff-505483cbd6a368c1f63d1be32ed360bfL50New return format for
validate_inputs
:{"errors_warnings": {...}, "custom_adjustment: {...}}
"custom_adjustment"
is optional. Projects that do not use ParamTools for their inputs may use"custom_adjustment"
to return data in their native inputs format.Function
run_model
should not include "model_version" in its results since that information is available in the newget_version
function.Package name changes:
pip install compdevkit
-->pip install cs-kit
import compdevkit
-->import cs_kit
import compconfig
-->import cs_config
cdk-init
-->csk-init
Tests API Changes:
compute-studio-kit now uses a test class that integrates better with pytest. Define your tests like this (of course,
csk-init
will write a template intest_functions.py
to help you get started):This produces output: