Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Clean up kupfer.core.settings #61

Open
2 tasks
bluss opened this issue Feb 25, 2017 · 2 comments
Open
2 tasks

MAINT: Clean up kupfer.core.settings #61

bluss opened this issue Feb 25, 2017 · 2 comments

Comments

@bluss
Copy link
Member

bluss commented Feb 25, 2017

The configuration parser and all that is basically a mess.

Clean up

  • handling of default values
  • configuration value type
hugosenari added a commit to hugosenari/kupfer that referenced this issue Apr 12, 2017
…upferlauncher#61 - JSON POC; commit: chages:

convert default.cfg to  default.json
change configparser with json lib
remove remove strbool and strint: json accept those values
add _same_type: dumb function
add _merge: dict.update wont deep merge
default empty values can be omited
remove fill_parser and config-to-dict: not required anymore
remove get_config_int: json can store/return int
fix a bug for self.print_error needs to be pretty.print_error
hugosenari added a commit to hugosenari/kupfer that referenced this issue Apr 12, 2017
hugosenari added a commit to hugosenari/kupfer that referenced this issue Apr 12, 2017
…upferlauncher#61 - JSON POC; commit: remove _same_type and value_type from settings methods
hugosenari added a commit to hugosenari/kupfer that referenced this issue Apr 12, 2017
…upferlauncher#61 - JSON POC; commit: change confmap_difference by _dict_diference

rename _merge by _dict_union
@hugosenari
Copy link

hugosenari commented Apr 12, 2017

I did a POC to see how does it look if we change configparser by json: DIFF

Goods:

  • JSON can handle bool and int types (configparser seems to only support string);
  • Default null and false values can be omitted;
  • We don't need 'convert' (dict) to config to save;

Bads:

  • At migration user loose config or we need a migration tool;
  • One more method are required to merge jsons (dict) configparser does it by default;

Also removed dead code (ExtendedSettings) since we don't use it anymore (even with my pull requesting to use it again).

@hugosenari
Copy link

My POC had a bug for some reason isn't getting default of plugin value. Won't fix this until someone say that we will keep in this path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants