Closed TrangNguyenBC closed 6 years ago
And I also run python setup.py install
then adr inspect
and it run normally. Please let me know if there is something need to be changed. Thanks.
Hi @ahal I updated my commit with two changes:
cfg = parsed_arg
as well, not just config from config.yml
file, so I only setattr
for the key existed in __slots__
, otherwise ignore.None
to those keys missing in config.yml
file. Do you think we need to set hard code default value for specific missing keys, like setattr(self, "url", "http://..)
?* for default value handling, I only put `None` to those keys missing in `config.yml` file. Do you think we need to set hard code default value for specific missing keys, like `setattr(self, "url", "http://..)`?
I think None
is fine for now since the config.yml is hardcoded into the repo. Though maybe in the future we'll want to look for config.yml in the user's home directory and hard code the defaults right into the Configuration class.. but this is fine for now as there should never be a key missing.
Hi @ahal, I am sorry I did something wrong when rebasing from upstream, causing the old pull request disappeared. I followed you guide: using
__slots__
to limit number of properties, move config file toadr
package, also edit MANIFEST.in to include these files. Also, making bareboneConfiguration
with these__slots__
properties without loading config file; it would be easier to use in testing. Some other minor changes: Remove entry point for adr-query, re-format test.py to run tox successfully. Thank you!