Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple configuration files in a directory #584

Closed
osma opened this issue Mar 24, 2022 · 0 comments · Fixed by #585
Closed

Support for multiple configuration files in a directory #584

osma opened this issue Mar 24, 2022 · 0 comments · Fixed by #585
Assignees
Milestone

Comments

@osma
Copy link
Member

osma commented Mar 24, 2022

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?)

@osma osma added this to the Short term milestone Mar 24, 2022
@osma osma changed the title Support directory with configuration files Support for multiple configuration files in a directory Mar 25, 2022
@juhoinkinen juhoinkinen self-assigned this Mar 28, 2022
@juhoinkinen juhoinkinen modified the milestones: Short term, 0.58 Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants