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

Fix project data files detection #778

Closed juhoinkinen closed 6 months ago

juhoinkinen commented 6 months ago

I noticed that after

annif download yso-bonsai-en juhoinkinen/Annif-models-upload-testing

the modification time of omikuji projects as detected by Annif is wrong; it is shown to be the extraction time:

annif show-project yso-bonsai-en 
...
Modification time: 2024-03-13 11:36:22

This is because of the timestamp of the data/projects/yso-bonsai-en/omikuji-model/ directory, which is set to the time when the files it contains get extracted.

Originally posted by @juhoinkinen in https://github.com/NatLibFi/Annif/issues/762#issuecomment-1994122090


This PR fixes the above problem by making all subdirectories in project data directory to be disregarded as model data files (the directories themselves do not affect the model results).

Also make the files in the subdirectories be regarded as they should be.

sonarcloud[bot] commented 6 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 6 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 (47c836c).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #778 +/- ## ======================================= Coverage 99.65% 99.65% ======================================= Files 89 89 Lines 6404 6405 +1 ======================================= + Hits 6382 6383 +1 Misses 22 22 ```

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