NatLibFi / Annif

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

Allow use of hyphens in vocabulary IDs #619

Closed osma closed 2 years ago

osma commented 2 years ago

This little PR fixes a parsing bug related to vocabulary IDs. If a vocabulary ID such as yso-fi or yso-arch was given in the configuration file, it would be shortened to yso. The regex for matching IDs was too restrictive.

This PR fixes the regex and adds a unit test verifying that it keeps working as intended.

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

codecov[bot] commented 2 years ago

Codecov Report

Merging #619 (b9af8b2) into master (48b23f7) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #619   +/-   ##
=======================================
  Coverage   99.61%   99.61%           
=======================================
  Files          87       87           
  Lines        6034     6038    +4     
=======================================
+ Hits         6011     6015    +4     
  Misses         23       23           
Impacted Files Coverage Δ
annif/registry.py 100.00% <100.00%> (ø)
tests/test_vocab.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.