Refactor hybrid text parsing to account for arbitrarily-nested ANDs and ORs - #1774
Refactor hybrid text parsing to account for arbitrarily-nested ANDs and ORs#1774Purplegaze wants to merge 7 commits into
Conversation
|
Hello, here's my draft PR for this issue. My current solution is to split The existing code that updates nodes did not ever set hybrid nodes to anything that isn't Another approach would be to change the functionality of parent-child relationships as well, and add the full nested layers of nodes to them, since currently parent-child relationships only work on "ANDs of ORs" as well, though that might be an overly complicated thing to implement if the only thing that's necessary is to test whether a hybrid node is active. Also, with recursive parsing, it becomes more difficult to have parentheses be able to open up in the middle of a course name, such as in the string |
Coverage Report for CI Build 0Coverage increased (+0.4%) to 58.567%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
|
Hi @Purplegaze, thanks for the detailed update. Overall I think this is the right approach.
|
Proposed Changes
Currently, hybrid text nodes are only equipped to handle a single AND of ORs, which makes the 2nd year calculus hybrid node (
(MAT235,MAT236)/MAT237/MAT257) not work properly. This PR fixes this bug by making hybrid text parsing recursive and changing the code that updates the state and relatives of hybrid nodes to work separately from regular nodes and account for arbitarily-nested course prerequisite strings....
Screenshots of your changes (if applicable)
Type of Change
(Write an
Xor a brief description next to the type or types that best describe your changes.)Checklist
(Complete each of the following items for your pull request. Indicate that you have completed an item by changing the
[ ]into a[x]in the raw text, or by clicking on the checkbox in the rendered description on GitHub.)Before opening your pull request:
After opening your pull request:
Questions and Comments
See below.