Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding more comprehensive tests across the API. (#28)
* Updated summarize API to simplify summarize_window so it can be ignored in testing. * Split summarize_temporal_window into two functions; added namedtuple for type checking to aggregate function, aggregate function not working... * Fix the odd test error. This fix is very strange. * Expanded aggregate's doctest to cover other edge cases. * Added a (currently unused) named tuple for event bound parameters; added a (currently failing) doctest for event bound summarizer * updated docstrings and fixed doctest given proper understand of summarize event bound window; many more tests are needed. * added another test and marginal refinement to the summarize_event_bound docstring. * Corrected small typo, used ToEventWindowBound in summarizer. * Added a terminology description file. * Updated aggregate_temporal_window tests. * Some edits * Edits to the terminology * Small edits to the recursion description * Added a set of doctest cases for an aggregate event bound window function. * Got aggregate_event_bound working for all cases where offset is 0 * With offset doctest partially passing; need to subtract temporal group by stage as well. * Got it working in the case with a positive offset too. * Separating out functions a bit and adding doctests for check_constraints. * Added forggoten files. * Include timestamp_at_start in aggregate functions to future proof and to make property testing easier. * Some in-progress updates. * Corrected some more of the doctests. * Fixed the doctests up to the case with offset * Fixed at least one test case's worth of the with offset period. * Found a bug in the aggregate function; test is failing where (I believe) the test case has the correct output. We are likely double subtracting the row's counts through the offset aggregation and the cum_sum * Yep, it was a double subtraction issue. Fixed the error. * Another, I think, proper failing test case. * Corrected that issue too. * Another test failure; likely the counterpart to the prior one. * Corrected one more bug. It was a slightly different issue than I anticipated. * Corrected the issue. * Added another passing test case. * All test cases passing! * Removed malformed constraint checking test case and corrected typo in extract subtree doctest. * Trying to eliminate the other event bound functions to use the new general aggregation function; some test differences that warrant further assessment * Ok, this change reflects a change in API -- basically, stating that if we have an event bound window that is right inclusive, then events that are the bounding event will end up with singleton row windows. That is fine, and in my opinion better than the alternative, but it is slightly different. * Added a tiny additional comment pointing to additional testing in the event bound aggregation function. * extract subtree (partial test only) appears to be working. * Added more tests for extract_subtree. It is a little awkward as sometimes start and end are swapped unexpectedly, but the tests do seem to pass. * Removed old API files and functions. Tests are passing but query_subtree may not be. * Removing duplicated tests. * fixed query script * Config language updates and doc (#29) * Some starting code for config file updates * Some precommit fixes and documentation updates * Added basic implementation of the polars expression logic for MEDS and ESGPT to the PredicateConfig object * Expanded tests and added event_type case. * Started filling out more of the logic in the configuration objects. still in progress * More of the logic in the configuration objects. still in progress * Added doctests and more window logic so windows can naturally be parsed into the appropriate endpoint expressions to facilitate object oriented tree building. * Added (yet untested) code for initialization and validation of windows, which also includes tree building. * Added some basic doctests to the config class. * Removed references to the simplified parsing language. * Working pipeline * Remove outdated unit test file * Fix whitespace? * didn't work, undo - ask matthew * Run script working on ESGPT / CSV / presumably MEDS parquet * Update sample configs --------- Co-authored-by: Justin Xu <justin13601@hotmail.com>
- Loading branch information