openfisca / openfisca-core

OpenFisca core engine. See other repositories for countries-specific code & data.
https://openfisca.org
GNU Affero General Public License v3.0
168 stars 75 forks source link

`ParameterNode.get_descendants` doesn't include `ParameterScale` rates and thresholds #1112

Open nikhilwoodruff opened 2 years ago

nikhilwoodruff commented 2 years ago

Hi there!

I really enjoy OpenFisca, but I recently encountered an issue.

Here is what I did:

Called ParameterNode.get_descendants in a tree with a parameter scale.

Here is what I expected to happen:

Expected an iterator including rates and thresholds from ParameterScale parameters.

Here is what actually happened:

The iterator didn't include the scale parameters.

Here is data (or links to it) that can help you reproduce this issue:

I've written a MWE here on Google Colab.

Context

I identify more as a:

Thanks! Happy to tackle this with a PR if desired. (cc @benjello @sandcha)

benjello commented 2 years ago

PR welcome @nikhilwoodruff !

nikhilwoodruff commented 2 years ago

Thanks @benjello! In progress in https://github.com/openfisca/openfisca-core/pull/1113