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

parser - Remove namespacing and subparts. #705

Merged
merged 15 commits into from Aug 23, 2016

Conversation

josepht
Copy link
Contributor

@josepht josepht commented Aug 1, 2016

  • 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

@josepht
Copy link
Contributor Author

josepht commented Aug 2, 2016

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?

@sergiusens
Copy link
Collaborator

retest this please

return
parts = data.get('parts', [])
for part_name in parts:
if part_name is not None and part_name in master_parts_list:
Copy link
Collaborator

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:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@sergiusens
Copy link
Collaborator

I assume this part of the comment is no longer valid?
Hack to handle 'origin_dir' until the origin encoded path lands in
PR #618

@josepht
Copy link
Contributor Author

josepht commented Aug 16, 2016

@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')
Copy link
Collaborator

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.

Copy link
Collaborator

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)

@sergiusens
Copy link
Collaborator

@ElOpio want to take a look at this one too?

* description - A brief description of the part.
* parts - A YAML list of other parts from the snapcraft.yaml that are needed.
Copy link
Contributor

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?

Copy link
Contributor Author

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)
Copy link
Contributor

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.

@come-maiz
Copy link
Contributor

lgtm. Just two nits, and +1

@josepht
Copy link
Contributor Author

josepht commented Aug 22, 2016

I've updated @ElOpio's two nits.

@josepht
Copy link
Contributor Author

josepht commented Aug 22, 2016

retest this please

exception = self.assertRaises(
subprocess.CalledProcessError,
subprocess.check_call, args, stderr=subprocess.DEVNULL,
stdout=subprocess.DEVNULL)
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, removed.

@kyrofa
Copy link
Contributor

kyrofa commented Aug 23, 2016

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.

@sergiusens
Copy link
Collaborator

👍 I will merge once the tests are done

@sergiusens sergiusens merged commit acc5bc9 into canonical:master Aug 23, 2016
@josepht josepht deleted the bugs/1606933 branch August 23, 2016 18:30
kalikiana pushed a commit to kalikiana/snapcraft that referenced this pull request Apr 6, 2017
- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants