-
Notifications
You must be signed in to change notification settings - Fork 84
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
Convert OdxLinkId.doc_fragments and OdxLinkRef.ref_docs to tuple #410
base: main
Are you sure you want to change the base?
Conversation
@andlaus Unrelated: i think there are a lot of mypy issues hidden by the |
The |
IIRC, that was also the issue I stumbled over, |
A few more changes after a bit of research. To my understanding there are two options: the doc fragments are either just the category, or the category+diag_layer. i changed the type annotation of OdxDocContext.doc_fragments to reflect that. The category context is now completely defined in |
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.
looks pretty good. when the match
statement is replaced and it is verified that ODX 2.0 does not regress (you might need to help out on that front @kayoub5) I think this should be merged...
@nada-ben-ali could you check that odx 2.0 compatibility is not broken with those changes ? |
@@ -31,7 +31,7 @@ | |||
from .hierarchyelementraw import HierarchyElementRaw | |||
|
|||
if TYPE_CHECKING: | |||
from .database import Database | |||
from ..database import Database |
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.
mypy didn't catch this ?
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.
@zariiii9003: how did you find this? if using tools, can/should we change the CI system to do the same?
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 noticed red squiggly lines in my IDE. I also wonder why both ruff and mypy seem to ignore it
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.
ok. Seems like you should continue to let your IDE look at odxtools. mine (emacs) is not sophisticated enough ;)
sorry for the conflict due to #411. as I see it, the |
041c08b
to
73a2f3d
Compare
thanks for rebasing. as soon as @nada-ben-ali reports back, I'll merge this. |
73a2f3d
to
34aef86
Compare
I don't know why this blew up my smoke testing schript only now... Signed-off-by: Andreas Lauser <[email protected]> Signed-off-by: Alexander Walz <[email protected]>
For some strange reason, I ran into some DOCREF-related issue with this. I don't know why it only crept up with this PR, but I made a "meta pull request" for your PR here: zariiii9003#1 . would be great if you merged it... |
fix DOCREF for PARENT-REFs using implicit document fragments
@nada-ben-ali: were you able to test this with ODX 2.0? I think it is relatively unlikely that it regresses something on that front, and since I get a weird performance regression which goes away with this PR, I'd like to get it merged quickly... |
As suggested in #405.
I tried converting OdxLinkRef into a frozen dataclass, but subclasses assign attributes after instantiation.