Temporary decorator to mark & log 'daskified' methods #245
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.
One final PR for some setup and helper code related to the LAMA to Dask migration (#182) before I start pushing up the actual method migrations in turn!
This one adds a temporary custom decorator that will be applied to directly mark methods that we consider to have been migrated fully in the code, so we don't have to cross-reference with the very long checklist in the issue (though I will make sure to update the list too upon each corresponding merged PR). As well as acting as a marker, the decorator provides a log message reported each time the method is run (which can be adapted to provide more info, as useful) and allows the log level to be tuned for those methods only by simply changing the decorator argument value.
I have marked all methods considered 'daskified' after @davidhassell's initial work with the decorator and will add it incrementally to other methods as they are completed.
Example of resulting test output change
By running
pytest test_Data.py -rP
(the options of which I have found useful so far), STDOUT is captured, e.g. under the configuration of this branch state it returns:though the minimal test output report of
pytest
can be recovered by removing the-rP
options, and/or converting the arguments todaskified()
to sto the message output.Overall I'm setting us up for some major debugging sessions that will probably be required in later stages of the migration 😄