Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: refactoring the AwkwardForth code-discovery process (#943)
* WIP: Remove AwkwardForth from strings.py * Remove AwkwardForth from strings.py * Remove Forth from objects.py * Remove AwkwardForth from containers.py * Remove AwkwardForth import statement from objects.py * Remove AwkwardForth from model.py and models/ * Change test_0610 and test_0798 to not use forth * Remove AwkwardForth from streamers.py * Remove more awkward forth code * WIP: refactor af generation for a simple vector vector float case * Refactor AwkwardForth generation for vectorvectordouble * Change previous_model dict to be apart of ForthGenerator * feat: Refactoring AwkwardForth code discovery * Deleting unwanted file. * No AwkwardForth skip for test_0912 * AwkwardForth implemented for test 81 of test_0637 * Tests 57 through 79 pass. * Remove print_tree for now, will make it a proper repr method later. Also precommit * WIP, working on more tests. * style: pre-commit fixes * Added reverse-map comments about which code is used in which tests. * Added expected AwkwardForth code for all cases that can have them. * tests 05 and 08 are new, but they don't work yet. * Mild infastructure changes to forth generating objects. * test_05 works. * Remove print statement. * Got test_08 to work with some refactoring. * style: pre-commit fixes * Got test_31 to work. * Got test_79 to work. * All the tests that worked before work again. * Removed ForthStash class, and dead functions in _awkward_forth.py * style: pre-commit fixes * Removed two FIXME tags. * UnwindProtect to replace updating previous model to a pre-saved previous model each time a subtree is filled. * pre-commit (that was done post commit) * String instead of dictionary error. * style: pre-commit fixes * Added back accidentally removed fix me. content = {} * test_AnalysisJetsAuxDyn_GhostTrack now passes. * test 9, 15, 16, 17, 18, 19, 20, 21, 22, 23, 33, 36, 41, 42, 43 now pass. * style: pre-commit fixes * The child of a base-class can be a dispatch-by-version. * Fixed 'N'. * Many fixes, mostly adding a new way to get field_name into the model. Also RegularArray and corrected key numbers. * Four more tests work. * Fixed 'G' and updated tests. * Implemented 'C' and 'F'. * Fixed resetting of AsVector previous_model for test_38. * TRef and Test 52. * Missing comma * TDatime, test 40, and remaining three tests in DAOD_PHYSLITE. * Implemented but untested TString AwkwardForth. * style: pre-commit fixes * All tests pass without forth_obj.get_key_number(). * REALLY all tests pass without forth_obj.get_key_number(). * key_number has been completely removed from Forth_Generator. * pre-commit. * The last test works. * Reintroduce a Forth-cancellation mechanism. * Cancel Forth-generation in any untested code-paths. * Touch-ups. * Turn these tests back on. * Turn the AwkwardForth default back on. * Try to make awkward-pandas Series even if AwkwardForth was unsuccessful. * Replaced UnwindProtect with push/pop logic. * Consolidate AsVector, AsRVec, and AsSet into a single implementation. * Removed intentional error from test_0692_fsspec_writing. * Rename '_awkward_forth' -> '_awkwardforth'. * Rename 'Forth_Generator' -> 'ForthGenerator'. * Removing dead code and 'previous_model' -> 'active_model'. * Rename and privatize all attributes of ForthGenerator. * Rename the dtype <--> struct formatter conversions. * Nodes don't need dtypes. * Removed the 'add_to_' indirection. * Simplify Node attributes. * Better __str__ for Node. * Simplify generated code by introducing shortcut aliases. * pre-commit * Unequivocally reset the active node at the start of each entry. --------- Co-authored-by: SethBendigo <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Seth Bendigo <[email protected]>
- Loading branch information