biodiverse icon indicating copy to clipboard operation
biodiverse copied to clipboard

Use config files

Open GoogleCodeExporter opened this issue 9 years ago • 7 comments

We need to add a config file to control extensions, default values and the 
like. 

IOD looks to be useful as it is more easily hand-edited than YAML or JSON.

https://metacpan.org/pod/IOD
https://metacpan.org/pod/Config::IOD::Reader


Original issue reported on code.google.com by shawnlaffan on 26 Aug 2014 at 9:28

GoogleCodeExporter avatar Mar 27 '15 23:03 GoogleCodeExporter

See also comments on this IOD blog post:
http://blogs.perl.org/users/perlancar/2014/08/introducing-iod-file-format.html#c
omments

Original comment by shawnlaffan on 27 Aug 2014 at 9:08

  • Added labels: ****
  • Removed labels: ****

GoogleCodeExporter avatar Mar 27 '15 23:03 GoogleCodeExporter

to do:

  • [ ] Determine which module to use, but no more Data::Dumper
  • [ ] Implement default location search path, as per other config systems (e.g. project dir, home dir, Biodiverse dir)
  • [ ] Env var override for search path to config file

Contents at this stage will be very simple and just what the current process supports (module extensions). Default settings can come later under their own issue.

shawnlaffan avatar Feb 09 '17 02:02 shawnlaffan

What sort of extension are we expecting to have? Who will be the users of the configuration file? What are the current things in our code we want to move to the configuration file?

andersonku avatar Feb 11 '17 03:02 andersonku

extension/file type can be whatever works, e.g. yaml or ini. Whatever is flexible.

Users will be whoever is running the system, so it is a bit like the .bashrc case.

At the moment the main use is to define plugins, but later we can add default values and the like.

shawnlaffan avatar Feb 11 '17 03:02 shawnlaffan

Current example file:
https://github.com/shawnlaffan/biodiverse/blob/master/Biodiverse_extensions.txt

shawnlaffan avatar Feb 11 '17 03:02 shawnlaffan

Do we have an example of extension module?

andersonku avatar Feb 11 '17 03:02 andersonku

Yes, a basic one is in the previous comment. It's a bit cryptic, so I can provide a better one by email.

shawnlaffan avatar Feb 11 '17 04:02 shawnlaffan