Fixes ordering of terms in configclass when no type annotation is present (#76)
# Description Previously, type annotation was always required to make the terms follow the order in which they are defined in the configclass. If this was not done, then the terms were getting sorted alphabetically which made it different from the expected behavior (user-defined order). On further inspection, turned out that in our wrappers for configclass, we were using `dir(cls)` to parse the class members, which sorts all the members of the class alphabetically. Changing it to `cls.__dict__` fixed this issue since in Python 3.7 onwards, dictionaries follow the user-defined ordering. Since this behavior changes the way config terms are parsed, the old configclass still exists inside the `omni.isaac.orbit.compat.utils.configclass` module so that people can still run policies trained with the old ordering. ## Type of change - Bug fix (non-breaking change which fixes an issue) - Breaking change (fix or feature that would cause existing functionality to not work as expected) ## Checklist - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./orbit.sh --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file
Showing
Please register or sign in to comment