NNPDF / reportengine

A framework for declarative data analysis
https://data.nnpdf.science/validphys-docs/guide.html
GNU General Public License v2.0
1 stars 2 forks source link

Force fuzzyspec expansion to always resolve the ns #47

Closed Zaharid closed 3 years ago

Zaharid commented 3 years ago

If a namespace depends on a production rule (e.g. one that returns a dictionary or list of dictionaries that are then used in collect) the namespace would be resolved once but then be oblivious to the changes in the input of the production rule, that would make it required to reevaluate it.

Rather than adding more special cases, just force all keys to be revaluated by the config object so as to keep them up to date within the current namespace. I cannot think of many downsides to this change, other than having to needlessly reevaluate a few inputs (which are assumed to be cheap in the first place).

The test in test_complexinput.py represents a minimal example of input that would fail in master and work correctly with this change.

Zaharid commented 3 years ago

Unfortunately this doesn't help with #38, which I am yet to understand.

siranipour commented 3 years ago

Will review with high priority because this breaks a lot of stuff in vp

wilsonmr commented 3 years ago

This may take me a while to understand. I always accepted fuzzyspec at face value without really knowing what it meant, well done on fix though! I'll review ASAP