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
Remove registered keywords on skill shutdown #2877
Remove registered keywords on skill shutdown #2877
Conversation
Voight Kampff Integration Test Failed (Results). |
Voight Kampff Integration Test Succeeded (Results) |
Uses new drop_*() methods from adapt-parser 0.4.0
d753f64
to
ad410d4
Compare
Codecov Report
@@ Coverage Diff @@
## dev #2877 +/- ##
==========================================
+ Coverage 52.48% 52.57% +0.08%
==========================================
Files 123 123
Lines 10970 10992 +22
==========================================
+ Hits 5758 5779 +21
- Misses 5212 5213 +1
Continue to review full report at Codecov.
|
Voight Kampff Integration Test Succeeded (Results) |
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.
Seems to be working great, thanks!
self.engine.register_regex_entity(regex_str) | ||
else: | ||
self.engine.register_entity( | ||
start_concept, end_concept, alias_of=alias_of) |
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.
This is beyond the scope of this PR but I just went down a small rabbit hole of what start vs end concepts were and I think that these need to be renamed to better match it's usage eg Adapt now seems to use entity_value, entity_type
.
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.
That's a terrific idea. it's always been a bit (to say the least) un-intuitive names
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 always need to double check what these mean, i approve the renaming 👍
Description
Currently Mycroft only removes adapt intents when skill is shutdown any keyword or regex registered will remain registered until shutdown of mycroft-core. This PR uses the new drop feature of Adapt to remove a skill's registered keywords and regexes when shutdown.
This will make updating skill vocabularies and regexes without restarting the skill process more intuitive.
Should resolve #2866 and possibly #2294
How to test
Create a simple skill with adapt intents. Add and remove keywords from a .voc-file and assert that they are added / removed as expected.
Contributor license agreement signed?
[ yes ]