alexferl / vyper

Python configuration with (more) fangs
MIT License
144 stars 21 forks source link

Complex keys are returning all lower case. #9

Closed jperkelens closed 6 years ago

jperkelens commented 6 years ago

Hi! I'm not sure if this is an unintended side effect of the PR i merged in, but v0.2.0 returns complex config objects with all lower case keys. Ex.

app_config.yml

job_config:
  Name: cluster_name
  AdditionalInfo:
      key1: val1
import vyper as v
# Assume config setup
print(v.get('job_config'))

This prints: {'name': 'cluster_name', 'additionalinfo': { 'key1': 'val1' } }

This is less than ideal because im storing an EMR job config in vyper and boto3's kwargs are all in camel case.

jperkelens commented 6 years ago

I can confirm this happens whether or not you set nested bind_envs or not

alexferl commented 6 years ago

Indeed, I think it was always there. I am curious to see how it behaves on viper (go) but I agree we should probably keep the keys intact for complex objects. I will work on this.

jperkelens commented 6 years ago

Hi. Thanks for this. I can confirm this does not happen in v0.1.0.

Small request: can you publish v0.1.0 to vyper-config? Our builds are failing now that vyper is gone we either have to change our code to live with this issue or drop the library until its fixed.

alexferl commented 6 years ago

OK, thanks for checking! It seems I had two or so un-deployed PRs so I'll check those. I deployed v0.1.0 under the name vyper-config for you. Sorry for the troubles it caused you.

jperkelens commented 6 years ago

No worries! I've actually got a solution to this issue, but I wont be able to submit a PR till tomorrow morning. Stay tuned :)

alexferl commented 6 years ago

Released in v0.2.1.