Skip to content

Conversation

@yakutovicha
Copy link
Member

fixes #473

@codecov
Copy link

codecov bot commented Nov 22, 2024

Codecov Report

❌ Patch coverage is 84.61538% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.23%. Comparing base (3c65b82) to head (238c637).

Files with missing lines Patch % Lines
aiidalab_widgets_base/structures.py 81.81% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #644      +/-   ##
==========================================
- Coverage   84.29%   84.23%   -0.06%     
==========================================
  Files          18       18              
  Lines        3584     3590       +6     
==========================================
+ Hits         3021     3024       +3     
- Misses        563      566       +3     
Flag Coverage Δ
python-3.11 84.23% <84.61%> (-0.06%) ⬇️
python-3.9 84.24% <84.61%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@danielhollas danielhollas left a comment

Choose a reason for hiding this comment

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

Whoops, I had some comments during the hackathon that I forgot to submit.

ipytree~=0.2
traitlets~=5.4
ipywidgets~=7.7
widgetsnbextension<3.6.3
Copy link
Contributor

Choose a reason for hiding this comment

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

Great to remove this. 🚀 Have you tested that the original reason for this widgetsnbextension pin no longer applies? (I think it was because of the NodeTree widget was broken?)

EDIT: It looks like we still need the widgetsnbextension based on our experience of omitting it in aiidalab-home. See this issue aiidalab/aiidalab-docker-stack#512 Definitely will need testing.

@yakutovicha yakutovicha force-pushed the update/support-ipw-8.x branch from cd75987 to 2df17d6 Compare February 4, 2025 15:02
@yakutovicha yakutovicha force-pushed the update/support-ipw-8.x branch from 78d43f5 to c44b634 Compare February 5, 2025 22:40
@yakutovicha yakutovicha marked this pull request as ready for review November 10, 2025 11:17
Comment on lines +121 to +122
if importers: # Otherwise ipywidgets 8.x throws an error when setting a title for non-existing tab.
select_panel.set_title(0, "Select structure")
Copy link
Member

Choose a reason for hiding this comment

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

Sure. But also MADICES/MADICES-2025#27. The API has changed. Unclear yet (need to test) if titles can be provided directly on Tab definition, but in any case, we can open a separate issue to update to the newer API of .titles.

Comment on lines +429 to +438
def get_unified_representation(value):
"""This function ensures backwards compatibility w.r.t. ipywidgets 7.x"""
try:
return [
(fname, item["content"]) for fname, item in value.items()
] # ipywidgets 7.x
except AttributeError:
return [
(f["name"], f.content.tobytes()) for f in value
] # ipywidgets 8.x
Copy link
Member

Choose a reason for hiding this comment

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

Since we're moving to 8, wouldn't it make more sense to do "try 8, except... do 7"?

Comment on lines +150 to +151
ipw.link((self.accordion, "selected_index"), (self, "selected_index"))
self.selected_index = 0
Copy link
Member

Choose a reason for hiding this comment

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

Seems unrelated. What was this about?

Comment on lines +40 to +46
expected_tab_titles = [
"Geometry Optimization",
"Geometry analysis",
"Isotherm",
]
for i in range(len(open_node_in_app.tab.children)):
assert open_node_in_app.tab.get_title(i) == expected_tab_titles[i]
Copy link
Member

Choose a reason for hiding this comment

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

Is this strictly needed for version 8, or a drive-by update?

Copy link
Member

@edan-bainglass edan-bainglass left a comment

Choose a reason for hiding this comment

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

Thanks @yakutovicha. A few comments for now.

@danielhollas
Copy link
Contributor

Thanks a ton for working on this @yakutovicha. Before merging I'd like to test this on my app once I am back from holidays next week. (and obviously somebody should test on QeApp)

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.

Support ipywidget 8.x

4 participants