Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Migrate from skills to interfaces #356
Conversation
|
meh, cov is 93%... not sure what went wrong here |
|
this cannot land before we have an image |
zyga
reviewed
Mar 1, 2016
| @@ -63,6 +63,49 @@ def test_config_loads_plugins(self, mock_get_part, mock_loadPlugin): | ||
| self.assertFalse(mock_get_part.called) | ||
| + @unittest.mock.patch('snapcraft.yaml.Config.load_plugin') | ||
| + def test_config_works_with_skills(self, mock_loadPlugin): |
zyga
reviewed
Mar 1, 2016
| +apps: | ||
| + app1: | ||
| + command: runme | ||
| + uses: |
sergiusens
Mar 1, 2016
Collaborator
yes, that is why the test is called with skills
you don't have to face angry users, I do
zyga
reviewed
Mar 1, 2016
| + 'snap': [], 'stage': [], | ||
| + 'stage-packages': ['fswebcam']}}, | ||
| + 'slots': { | ||
| + 'migration': { |
zyga
reviewed
Mar 1, 2016
| @@ -113,6 +113,10 @@ def __init__(self): | ||
| self.after_requests = {} | ||
| self.data = _snapcraft_yaml_load() | ||
| + | ||
| + # To make the transition less painful | ||
| + self._remap_skills() |
zyga
reviewed
Mar 1, 2016
| + def _remap_skills(self): | ||
| + if 'uses' in self.data: | ||
| + logger.warning( | ||
| + "DEPRECATED: Instances of 'uses' remapped to 'slots'") |
zyga
Mar 1, 2016
Contributor
I'd display a link to the mailing list where Gustavo announces this in case anyone wonders what that is.
sergiusens
Mar 1, 2016
Collaborator
I'd rather wait for the documentation to surface on developer.ubuntu.com
In any case people that already know what skills are with little to know documentation will be able to catchup.
|
+1, with two optional notes |
kyrofa
reviewed
Mar 1, 2016
| + def _remap_skills_to_interfaces(self): | ||
| + if 'uses' in self.data: | ||
| + logger.warning( | ||
| + "DEPRECATED: Instances of 'uses' remapped to 'slots'") |
|
|
added a commit
that referenced
this pull request
Mar 1, 2016
sergiusens
merged commit a9e5f06
into
snapcore:master
Mar 1, 2016
sergiusens
deleted the
sergiusens:feature/1549427/skills2interfaces
branch
Mar 1, 2016
pushed a commit
to kalikiana/snapcraft
that referenced
this pull request
Apr 6, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sergiusens commentedMar 1, 2016
This adds some sort of transparent migration logic from "skills" related
keywords to the ones belonging to "interfaces".
LP: #1549427
Signed-off-by: Sergio Schvezov sergio.schvezov@ubuntu.com