• Mayank Mittal's avatar
    Fixes ordering of terms in configclass when no type annotation is present (#76) · 5931b15a
    Mayank Mittal authored
    # 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
    5931b15a
Name
Last commit
Last update
.github Loading commit data...
.vscode Loading commit data...
docker Loading commit data...
docs Loading commit data...
source Loading commit data...
.dockerignore Loading commit data...
.flake8 Loading commit data...
.gitignore Loading commit data...
.pre-commit-config.yaml Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
VERSION Loading commit data...
orbit.sh Loading commit data...
pyproject.toml Loading commit data...