-
Notifications
You must be signed in to change notification settings - Fork 44
Flexible fusion part 3: CLI suggest option for additional metadata #866
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #866 +/- ##
=======================================
Coverage 99.65% 99.66%
=======================================
Files 102 102
Lines 7629 7649 +20
=======================================
+ Hits 7603 7623 +20
Misses 26 26 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Ping @c-poley @RietdorfC, you may be interested in testing this. |
Yes, we are very interested in. Meanwhile, Clemens and Sandro startet to test the new functionalities. 👍 |
juhoinkinen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this quickly, works and looks good!
|



3rd part of #813, after #864.
This PR adds a new
--metadata/-Doption to theannif suggestCLI command. It allows specifying metadata to go along with a document that is read from stdin. This is useful when testing projects that have aselect()transform that operates on custom metadata fields.Example use
For example, if
myprojecthas a settingtransform=select(title,description,text), then it can be tested appropriately with this command:Without the
-Doption, only the text would be read from stdin, but the metadata fields would remain unset during the suggest operation.Limitations
This applies only to the case where
annif suggestis used on a single document read from stdin (with or without-as the path parameter). Ifannif suggestis used with a path to a corpus of documents (a directory of .txt files), then likely every document would have its own metadata values anyway, and an option for setting metadata values once for the full set would not be very useful.