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
parser - Remove namespacing and subparts. #705
Conversation
Should this change be broadcast to the mailing list prior to landing so that our growing community of remote parts authors and users are aware of the changes? |
retest this please |
e71f810
to
e26c0a4
Compare
return | ||
parts = data.get('parts', []) | ||
for part_name in parts: | ||
if part_name is not None and part_name in master_parts_list: |
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 would be easier to read
if part_name and part_name in master_parts_list:
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.
Fixed.
I assume this part of the comment is no longer valid? |
@sergiusens thanks for catching that. I've removed it from the PR comment. |
* remove 'project-part' from wiki entries * require 'parts' in wiki entries * 'parts' should have what was the original 'project-part' plus any other parts * Hack to handle 'origin_dir' until the origin encoded path lands in PR#618 LP:#1606933 Signed-off-by: Joe Talbott <joe.talbott@ubuntu.com>
for part in entry_parts: | ||
if '/' in part: | ||
logger.warning( | ||
'A "/" in a part name is deprecated and will be removed') |
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 like the wording here could use some work.
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.
Maybe
DEPRECATED: Found a "/" in the name of the {!r} part.format(part_name)
@ElOpio want to take a look at this one too? |
- s/part/part_name/ for clarity - Use sergiusens' suggestion for deprecation warning text.
* description - A brief description of the part. | ||
* parts - A YAML list of other parts from the snapcraft.yaml that are needed. |
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 think now we need to remove the word "other" from here, right?
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.
Right indeed, fixed.
@@ -189,6 +189,10 @@ def _remote_parts(self): | |||
|
|||
def _process_parts(self): | |||
for part_name in self._parts_data: | |||
m = 'DEPRECATED: Found a "/" in the name of the {!r} part'.format( | |||
part_name) |
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.
just a nit, but this variable should be inside the if block.
lgtm. Just two nits, and +1 |
I've updated @ElOpio's two nits. |
retest this please |
exception = self.assertRaises( | ||
subprocess.CalledProcessError, | ||
subprocess.check_call, args, stderr=subprocess.DEVNULL, | ||
stdout=subprocess.DEVNULL) |
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.
Is this saved exception used anywhere?
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.
Nope, removed.
I had a few nits, but you already fixed them during review, so while I confess a lack of familiarity with the parser that made the review somewhat superficial, 👍 from me. |
👍 I will merge once the tests are done |
- remove 'project-part' from wiki entries - require 'parts' in wiki entries - 'parts' should have what was the original 'project-part' plus any other parts LP: #1606933 Signed-off-by: Joe Talbott <joe.talbott@ubuntu.com>
other parts
LP:#1606933
Signed-off-by: Joe Talbott joe.talbott@ubuntu.com