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

Refactor/skill settings split #2287

Merged
merged 13 commits into from Sep 17, 2019
Merged

Refactor/skill settings split #2287

merged 13 commits into from Sep 17, 2019

Conversation

chrisveilleux
Copy link
Member

Description

Complete rethink of how we deal with settings and settingsmeta in core

How to test

Make changes to settingsmeta.json for a skill. Confirm that the changes are accurately reflected on the backend. Make changes to skill settings at account.mycroft.ai. Confirm that changes are accurately reflected in settings.json

Contributor license agreement signed?

CLA [yes]

@devs-mycroft devs-mycroft added the CLA: Yes Contributor License Agreement exists (see https://github.com/MycroftAI/contributors) label Sep 3, 2019
@forslund forslund added the Status: Work in progress PR being actively worked on, not yet ready for review. label Sep 3, 2019
@forslund
Copy link
Collaborator

forslund commented Sep 4, 2019

What's breaking here, The callback registration and the .store() methods? Is there a way of preserving these so we don't break the API without depreciation warning?

The save_settings should only occur if the settings were changed.

Let's move as much of the logic for this outside of the mycroft_skill.

Also let's drop the refactoring commits so it's easier to review.

@chrisveilleux
Copy link
Member Author

Implemented the change you suggested to make the skill API right again.

I don't think I can move any more of the logic outside of MycroftSkill. The only thing I really added was a way to deal with settings changes when they occur.

Added logic to only call save_settings if settings change

@forslund forslund force-pushed the refactor/skill-settings-split branch from 1956de2 to 84e4fea Compare September 5, 2019 09:21
Copy link
Collaborator

@forslund forslund left a comment

Choose a reason for hiding this comment

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

Some things I've noted when running the branch prematurely. You're probably aware of them but in case you weren't I'll flag them to save some time.

Also setting the line skill_loader.py L224 should be removed. I think we'll just drop this "feature".

mycroft/skills/settings.py Show resolved Hide resolved
mycroft/skills/settings.py Show resolved Hide resolved
mycroft/api/__init__.py Outdated Show resolved Hide resolved
@forslund forslund force-pushed the refactor/skill-settings-split branch 6 times, most recently from 81a5cac to cfb9594 Compare September 10, 2019 18:23
@forslund forslund removed the Status: Work in progress PR being actively worked on, not yet ready for review. label Sep 10, 2019
@forslund forslund self-requested a review September 10, 2019 19:17
Copy link
Collaborator

@forslund forslund left a 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 fine

@forslund
Copy link
Collaborator

Backend has been updated. Merging this now.

@forslund forslund merged commit a41284e into dev Sep 17, 2019
@forslund forslund deleted the refactor/skill-settings-split branch September 17, 2019 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA: Yes Contributor License Agreement exists (see https://github.com/MycroftAI/contributors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants