OPSIM-1149: bugfix to add cols_req to new stackers #409
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relatively small changes, but important for making the stackers conform to the expected API.
"cols_req" is a required attribute for stackers to run within the MAF framework. That is, in tests or if the data columns required are present anyway, these stackers will
.run
successfully, but in order for MAF to know what columns to pull from the database, thecols_req
must be specified .. otherwise, the stacker will fail because the input columns won't necessarily be available.While fixing this, I also added a unit test that just calls "BaseStacker.help(doc=True)" as this will print all stacker cols_req and cols_added as part of generating its help string - this will ensure that all registered stackers have these attributes.
I also updated some more ruff and docstring lines, and fixed a pandas future warning error (a simple fix, as the behavior we were previously doing matches the expected future behavior).