You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently Annif only supports only a single configuration file, usually named projects.cfg (or projects.toml after #560 added support for the TOML format). This is sometimes a limitation, because there can be many independent projects (or groups of projects), but they all have to be in the same file. For example, if projects for different vocabularies are developed independently (perhaps in separate DVC repositories), it would ease their deployment if their configurations could be kept in separate files.
The proposal is to add support for a configuration directory. All the configuration files in that directory (filenames matching the patterns *.cfg or *.toml) would be read and their contents merged. This is similar to e.g. how the sites-available directory works in typical Apache HTTPD installations.
Annif already looks for files in the current working directory called projects.cfg and projects.toml, unless the path to the configuration file has been set using the -p CLI parameter or the ANNIF_PROJECTS environment variable. The search could be extended to look for a directory with a specific name. Of course, it should also be possible to use -p or ANNIF_PROJECTS to point at a specific directory.
The default name of the directory could be e.g. config, conf, conf.d, projects.d or something along those lines. (opinions?)
The text was updated successfully, but these errors were encountered:
Currently Annif only supports only a single configuration file, usually named
projects.cfg
(orprojects.toml
after #560 added support for the TOML format). This is sometimes a limitation, because there can be many independent projects (or groups of projects), but they all have to be in the same file. For example, if projects for different vocabularies are developed independently (perhaps in separate DVC repositories), it would ease their deployment if their configurations could be kept in separate files.The proposal is to add support for a configuration directory. All the configuration files in that directory (filenames matching the patterns
*.cfg
or*.toml
) would be read and their contents merged. This is similar to e.g. how thesites-available
directory works in typical Apache HTTPD installations.Annif already looks for files in the current working directory called
projects.cfg
andprojects.toml
, unless the path to the configuration file has been set using the-p
CLI parameter or theANNIF_PROJECTS
environment variable. The search could be extended to look for a directory with a specific name. Of course, it should also be possible to use-p
orANNIF_PROJECTS
to point at a specific directory.The default name of the directory could be e.g.
config
,conf
,conf.d
,projects.d
or something along those lines. (opinions?)The text was updated successfully, but these errors were encountered: