biodiverse
biodiverse copied to clipboard
Use config files
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
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: ****
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.
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?
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.
Current example file:
https://github.com/shawnlaffan/biodiverse/blob/master/Biodiverse_extensions.txt
Do we have an example of extension module?
Yes, a basic one is in the previous comment. It's a bit cryptic, so I can provide a better one by email.