Automatically create a Part for new Components#237
Merged
Conversation
Member
|
Can you rebase on top of latest master (c2e00d4)? That should fix the CI. |
ewuerger
force-pushed
the
automatic-part-creation
branch
3 times, most recently
from
January 31, 2023 12:15
b01ca57 to
4f86413
Compare
Wuestengecko
requested changes
Feb 16, 2023
| f"Cannot instantiate {type(self).__name__} directly" | ||
| ) | ||
| try: | ||
| self._xmltag = kw.pop("_xmltag") |
Member
There was a problem hiding this comment.
This smells. _xmltag is set as class variable (more like "class constant") in subclasses. We should stay consistent in treating it like that.
Besides, we don't even need it outside of __init__ anyway, and even if, it would be saved implicitly as _element.tag.
ewuerger
force-pushed
the
automatic-part-creation
branch
from
February 20, 2023 10:04
6e4c327 to
b4db0f2
Compare
Wuestengecko
marked this pull request as draft
May 26, 2025 15:30
Wuestengecko
force-pushed
the
automatic-part-creation
branch
from
May 27, 2025 09:09
b4db0f2 to
6c1ffe3
Compare
Wuestengecko
force-pushed
the
automatic-part-creation
branch
2 times, most recently
from
May 30, 2025 09:38
6d9be35 to
570d983
Compare
Wuestengecko
force-pushed
the
automatic-part-creation
branch
2 times, most recently
from
June 18, 2025 09:04
01d8dbe to
c0d77e9
Compare
Wuestengecko
force-pushed
the
automatic-part-creation
branch
4 times, most recently
from
July 15, 2025 17:20
9fcf706 to
466f00d
Compare
Wuestengecko
force-pushed
the
automatic-part-creation
branch
3 times, most recently
from
July 22, 2025 15:58
c2f4bbe to
f6aa61c
Compare
Wuestengecko
force-pushed
the
automatic-part-creation
branch
from
September 8, 2025 17:26
f6aa61c to
8b9b4c1
Compare
ewuerger
marked this pull request as ready for review
September 9, 2025 08:58
ewuerger
commented
Sep 9, 2025
| if isinstance(self.parent, Component | ComponentPkg): | ||
| self.parent.owned_parts.create(name=self.name, type=self) | ||
| else: | ||
| self.owned_parts.create(type=self) |
Collaborator
Author
There was a problem hiding this comment.
Suggested change
| self.owned_parts.create(type=self) | |
| self.owned_parts.create(name=self.name, type=self) |
Wuestengecko
force-pushed
the
automatic-part-creation
branch
from
September 9, 2025 09:07
8b9b4c1 to
c4eb6e9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements the
cs.Partcreation of at least one part when creating a new Component. The name of the Part is now correctly inferred from its type.