Two new lines of code were added to the maturity and the spend_limit filters, and one line was replaced with them. The changes to both filters are identical.
The previous replaced line removed the columns corresponding to replacements that should not be considered according to the search rule. The two new lines turn the corresponding boolean values inside the search space Dataarray to False instead while keeping all columns.
This solves the related issue #254 , as it removes the possibility of an error if the filters are put in a row (e.g. maturity->spend_limit) and makes the with_asset_technology filter work normally if it is applied afterwards.
Finally, this makes the maturity and spend_limit filters also more in line with other filters like same_fuel or similar_technology in how they manipulate the search space as they also just change the boolean values of the search_space DataArray while keeping the dimensions identical.
Fixes # Issue 254
Type of change
Please add a line in the relevant section of
CHANGELOG.md to
document the change (include PR #) - note reverse order of PR #s.
[ ] New feature (non-breaking change which adds functionality)
[ ] Optimization (non-breaking, back-end change that speeds up the code)
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] Breaking change (whatever its nature)
Key checklist
[ ] All tests pass: $ python -m pytest
[ ] The documentation builds and looks OK: $ python -m sphinx -b html docs docs/build
Further checks
[ ] Code is commented, particularly in hard-to-understand areas
[ ] Tests added that prove fix is effective or that feature works
Description
Two new lines of code were added to the maturity and the spend_limit filters, and one line was replaced with them. The changes to both filters are identical.
The previous replaced line removed the columns corresponding to replacements that should not be considered according to the search rule. The two new lines turn the corresponding boolean values inside the search space Dataarray to False instead while keeping all columns.
This solves the related issue #254 , as it removes the possibility of an error if the filters are put in a row (e.g. maturity->spend_limit) and makes the with_asset_technology filter work normally if it is applied afterwards.
Finally, this makes the maturity and spend_limit filters also more in line with other filters like same_fuel or similar_technology in how they manipulate the search space as they also just change the boolean values of the search_space DataArray while keeping the dimensions identical.
Fixes # Issue 254
Type of change
Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s.
Key checklist
$ python -m pytest
$ python -m sphinx -b html docs docs/build
Further checks