Open Robin-des-Bois opened 6 years ago
Thanks! :-) I have thought about using something with dotted access for the configuration, too. Turning just the final config into a DotMap (or similar) should be pretty easy to do. But to enable IDE analysis for experiments, more work would be necessary, since the way configurations are currently created cannot be understood by an IDE. But at least accessing nested config-entries would be much nicer in many cases. I am not sure how easy it would be to make it an optional feature, but I think it might be okay to make it a mandatory feature. I'd be open to adding it to the next major release.
There are a ton of packages that do this and I had started to collect them to see if they suit my needs. I've put my list so far below (and added DotMap
).
Abandoned. See munch
Which functionality specifically are you missing from addict?
I reallyreally like the idea of not using config['stuff']
all over the place, especially since config keys already have to be python names.
One problem I can think of is with this kind of config though:
@ex.config
def conf():
a = {1: 'one', 2: 'two'}
Any news regarding this feature?
I tried to use EasyDict in a config but it seems like that all config objects inheriting from dict are casted to actual dicts when calling automain
. As there any easy way to change this behavior?
Great project!
Since dictionaries get passed around everywhere: Have you ever considered integrating something like DotMap?
All those dictionary accesses and string literals create (uncessary?) visual noise and also make the code analysis of the IDE less useful
Are there obvious reasons why this would be a bad idea? and if not how could this be implemented such that every user can enable/disable this feature easily?