NatLibFi / Annif

Annif is a multi-algorithm automated subject indexing tool for libraries, archives and museums.
https://annif.org
Other
197 stars 41 forks source link

Allow loading selected projects using environment variable #774

Closed juhoinkinen closed 5 months ago

juhoinkinen commented 7 months ago

This PR makes it possible to select the projects that Annif loads on startup via a regexp pattern given in the environment variable ANNIF_PROJECTS_INIT. The same env can be used in NGINX in its location directive configuration to make NGINX pass a request to the Annif instance that has loaded the requested project.

An image with these changes has been running at ai.dev.finto.fi. The used helm-chart includes grouping projects with these environment variables:

yso-.*fi
yso-.*sv
yso-.*en
kauno-.*
thema-.*
ykl-.*

Closes #733.

sonarcloud[bot] commented 7 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.65%. Comparing base (eba2b0c) to head (54ee767).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #774 +/- ## ======================================= Coverage 99.65% 99.65% ======================================= Files 89 89 Lines 6404 6422 +18 ======================================= + Hits 6382 6400 +18 Misses 22 22 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.