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

Fix project data files detection #778

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

juhoinkinen
Copy link
Member

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 #762 (comment)


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.

@juhoinkinen juhoinkinen added this to the 1.1 milestone Mar 13, 2024
@juhoinkinen juhoinkinen requested a review from osma March 13, 2024 15:19
Copy link

sonarcloud bot commented Mar 13, 2024

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

Copy link

codecov bot commented Mar 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.65%. Comparing base (eba2b0c) to head (47c836c).

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@osma osma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I could think of other ways of getting to the same result, but this is certainly good enough.

@juhoinkinen juhoinkinen merged commit 22d9599 into main Mar 18, 2024
16 checks passed
@juhoinkinen juhoinkinen deleted the ignore-directory-timestamps-for-project-mtime branch March 18, 2024 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants