Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor weather code plugins and CLIs (#1944)
* Refactors wxcode to be more agnostic - CLI renamed from wxcode to categorical - WeatherSymbols plugin renamed to ApplyDecisionTree - Code moved from wxcode directory to categorical - Comments and variable names replaced with more agnostic definitions * Fixes failing tests following refactor * isort * More refactoring - acceptance test data locations - extended docs locations * Updates testing decision tree and check_tree method and tests * Updates categorical attribute generation and tests, and day_night functionality. * categorical utilities tests now all pass * Updates tests for create_categorical_cube * Updates ApplyDecisionTree and tests - Includes method for mapping day and night symbols - Includes extended documentation * Updates ModalWeatherCode which now needs the decision_tree to get the day-night and groupings info. * Renames ModalWeatherCode as ModalCategory and adds decision_tree to the CLI. * Updates checksums * Removes obsolete KeyError trap * Updates checksums * Tests bare category error in check tree * Adds test for day_night_map * Adds checks to make sure that leaf nodes meet these criteria - Each leaf has a unique value - "if_night" values do not point to leaves that have "if_night" values * isort * Adds test for case where a leaf is unreachable and isn't declared as such. * Adds "is_unreachable" to decision tree documentation * Updates following review. * Removes `wx` from variable names in categorical_attributes * Removes `wx` from variable names in metadata_interpreter.py * Simple review updates (non-functional) * Moves simple is_decision_node method into utilities and reuses it in another utility. Adds test. * Simplifies test to one line * Uses is_decision_node in another place * Grammar
- Loading branch information