Closed bcorfman closed 3 years ago
You changed not only some attributes to frozensets (which is something I was delaying as it certainly breaks a lot of code), but also the class names. The reason most attributes are set in parse_domain/problem is to reset them to initial values, and avoid collision between multiple parsing runs, otherwise old values would be kept. If you want to add a feature don't make such big breaking changes at once, make small PRs that we can review and discuss. Class names and spacing are not up for discussion, they were made to either match HyperTensioN or my personal style.
EDIT: Note that Travis CI is failing.
Ah, sorry about the mess. I will make some edits to match up with your style and see if I can better match your expectations. I didn't realize you were supporting 2.7, for instance.
It is okay, just try to make small changes so that we can make a release before breaking compatibility with all other clones and forks. Compatibility with Python 2.7 can certainly be broken now. I would like to keep it working with legacy code, but you should not worry with that. I will modify Travis to allow 2.7 to fail and add a few more recent Pythons, but your code is also breaking 3.6 and 3.7, which means the version is not the only issue here.
got it. I'm still considering, but will probably close this PR and reopen a new one with just the :types changes first, since the other internal changes I made were more controversial. lol
Controversial is not the right word, you would panic too if someone tried to rename your classes :wink:. I fixed the comments that changed style and updated the CI config. Please open new PRs with your changes.
I will probably port some of the frozensets/tuples from our own modified version while you open the :types PR.
FIX: Beefed up :types to include type hierarchy. FEATURE: Changed preconditions, goals and visited data structures from lists to sets to speed comparisons. FEATURE: Moved Action's str method to repr and created a new str method instead to print plans in a more pleasing way. FEATURE: Updated test_PDDL.py to add tests for new :types features. FIX: Some general PEP8 code cleanup, although still incomplete.