reno.utils.dependency_compute_order#
- reno.utils.dependency_compute_order(refs, init_eqs=False, debug=False)#
Find a dependency-safe ordering for reference equations by iterating through and each time adding the first reference that doesn’t depend on any references not yet added.
This function will detect circular references (equations that depend on eachother) and throw an error. Primary use for this function is to correctly set order of equations in the pymc model/step function.
- Parameters:
refs (list[reno.components.Reference]) – The references to find a safe compute order for.
init_eqs (bool) – Use init equations to determine ordering, where available.
debug (bool) – Spit out everything it’s analyzing.
- Returns:
The dependency-ordered list of reno references passed in.
- Return type:
list[Reference]