Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion src/aiidalab_qe/common/mixins.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

import typing as t
import warnings

import traitlets as tl

Expand Down Expand Up @@ -90,7 +91,21 @@ def _link_model(self, model: M):
dependency_parts = dependency.rsplit(".", 1)
if len(dependency_parts) == 1: # from parent
target_model = self
trait = dependency
if dependency == "input_structure":
# BACKWARDS COMPATIBLE - remove when all plugins are updated!
warnings.warn(
(
"The `input_structure` dependency is deprecated. "

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I will include like Plugin developer: ... so the user doesnt get confused with this warning

@edan-bainglass edan-bainglass Nov 22, 2025

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

When will the user ever see this? These will only show up in tests, or if you switch to edit mode. They won't show in app mode. Note that we do not do "Plugin developer: ..." in any of our warnings. Have users raised this concern?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ahhh I thought that this will be the warning like the ones that Xing used to put , my bad

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Which ones are those? 😅

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Also, let me know if anything is holding this PR back 🙏

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nothing (holding this PR), is good , is just that Xing used to put warnings in the app mode, for example some can appear in the Calculation History, is there is an incompatibility or something with the code

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I see. I just tested the vibroscopy plugin (which is incompatible). No warnings shown on install, load, usage, etc. Great if you can approve, so we can merge and proceed 🙏 If for some unforeseen reason, the message shows up in a user interface, we can iterate.

"Please use the `structure_uuid` dependency instead. "
"`input_structure` is now a property that loads the "
"structure by uuid."
),
DeprecationWarning,
stacklevel=2,
)
trait = "structure_uuid"
else:
trait = dependency
else: # from sibling
sibling, trait = dependency_parts
target_model = self.get_model(sibling)
Expand Down
Loading