Open Anaphory opened 6 years ago
Also, share_params = False
needs test coverage.
And documentation.
In configuration.py
, the get_model_config
method of Configuration
uses ConfigParser
to build a dictionary of key/value pairs read from the a [model]
section. This dictionary gets passed to the __init__
method of the appropriate model class. The model class itself gets no direct access to the configuration file. This means anything which is model-specific (share_params
applies only to binary models) cannot be handled via ConfigParser
.
I'm not saying this way of doing this is smart, just answering your question by explaining the current architecture. Now that we are refactoring the way config files are read, there's the possibility to do this kind of thing differently if we think it's for the best.
Of course, this ties into #200 as well.
The covarion model tests its
share_params
property manually. https://github.com/lmaurits/BEASTling/blob/00eb06979f4965e5586d5c3ba24b427e028ad9a9/beastling/models/covarion.py#L12 Wasn't there someConfigParser
logic to do this, or a more general method we have already written elsewhere?