Rearrange template location precedence
What?
This MR rearranges the precedence of the location from which asimov
will try to read/get the template ini file.
Before this MR, the precedence is the following
- The
config_template
property of aAsimov.pipeline.Pipeline
object - Directory specified under templating/directory in the
asimov
configuration file -
asimov/configs
(for ini files that ship with the package, e.g.,bilby
andrift
)
After this MR, the precedence becomes
- Directory specified under templating/directory in the
asimov
configuration file - The
config_template
property of aAsimov.pipeline.Pipeline
object -
asimov/configs
(for ini files that ship with the package, e.g.,bilby
andrift
)
Why?
This is to allow greater flexibility when using pipelines that are not officially supported in asimov
(i.e., pipelines that do not have their template ini files ship with the package). With the current precedence order, if an "external" pipeline wants its interface with asimov
to work out-of-the-box, e.g., without having to specify where to look for an ini file in the configuration file every time a user starts a new asimov
project, is to add this config_template
property. An example would be hanabi
, a strong lensing analysis pipeline, here, where it tries to resolve for the file path for the template ini file that ships with this hanabi-lvk-tools
package.
With this, a user will be able to just hanabi
with asimov
as the pipeline is officially supported by asimov
, unless the user wants to use a "custom" template ini file that differs from the default one. For those officially supported by asimov
, this can be done by specifying the location with the custom template under templating/directory
in the configuration file since asimov
will try to read from that location first, before "falling back" to the one that comes with asimov
. However, this is NOT the case for external pipelines with the current precedence order since asimov
will always try to read from the config_template
property.
After this MR, a user will be able to supersede the default template ini file using templating/directory
in the asimov
configuration file for both "officially supported" pipelines and external pipelines.
This will also benefit other external pipelines like dingo
, where currently a user will need to specify where to find the template ini file for dingo
manually.
Who?
Rico Lo @ka-lok.lo