Skip to content

Conversation

@edan-bainglass
Copy link
Member

Recent changes to Materials Cloud and/or the OPTIMADE client have broken the OptimadeQueryWidget. This PR updates the ipyoptimade dependency and fixes the use of the package in the widget, restoring access to the Materials Cloud database.

@codecov
Copy link

codecov bot commented Aug 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.29%. Comparing base (8e613f3) to head (a1643fd).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #703   +/-   ##
=======================================
  Coverage   84.29%   84.29%           
=======================================
  Files          18       18           
  Lines        3584     3584           
=======================================
  Hits         3021     3021           
  Misses        563      563           
Flag Coverage Δ
python-3.11 84.29% <ø> (ø)
python-3.9 84.30% <ø> (ø)

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.

Thanks! Leaving review up to @superstar54 since I am not using Optimade in my app and have no experience with it.

Comment on lines -192 to -195
provider_database_groupings=kwargs.pop(
"provider_database_groupings",
default_parameters.PROVIDER_DATABASE_GROUPINGS,
),
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this affect any functionality? Was this used in QeApp?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure what the provide_database_groupings argument was used for. Maybe @eimrek can comment on its removal in ipyoptimade v1.0.0. As for the widget itself, it is used in the QE app as one of the structure importers. Recent changes in MC (again, I'll let @eimrek comment here) rendered ipyoptimade<1.0.0 incompatible with the MC database.

Copy link
Contributor

Choose a reason for hiding this comment

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

I was more asking about whether provider_database_groupings argument is used in QeApp (or elsewhere).

Copy link
Member Author

Choose a reason for hiding this comment

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

provider_database_groupings was not made publicly accessible by ipyoptimade. For info, see the relevant PR - aiidalab/ipyoptimade#21

Copy link
Member

Choose a reason for hiding this comment

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

IIRC, provide_database_groupings was used to separate our materials cloud optimade DBs into two groups: main and contributed. I think I had a problem with it at some point and it made sense to just remove it.

@danielhollas
Copy link
Contributor

Looking at aiidalab/ipyoptimade#21 actually reminded me why we originally could not easily upgrade ipyoptimade --- that PR bumped the minimum ipywidgets version to 8.1, and we do not yet support this version (see in-progress PR #644) . However, it seems that support for earlier ipywidget version was added back in aiidalab/ipyoptimade@2876092 and released in version 1.2.0. So I think the minimum version here should be specified as ~1.2

@edan-bainglass edan-bainglass changed the title Update to ipyoptimade~=1.0 Fix ipyoptimade version Aug 27, 2025
@edan-bainglass
Copy link
Member Author

Looking at aiidalab/ipyoptimade#21 actually reminded me why we originally could not easily upgrade ipyoptimade --- that PR bumped the minimum ipywidgets version to 8.1, and we do not yet support this version (see in-progress PR #644) . However, it seems that support for earlier ipywidget version was added back in aiidalab/ipyoptimade@2876092 and released in version 1.2.0. So I think the minimum version here should be specified as ~1.2

Actually, looks like we need to set the minimum version to >=1.2.1 - see #473.

Copy link
Member

@superstar54 superstar54 left a comment

Choose a reason for hiding this comment

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

Hi all, I tested this PR in the latest QE app image. Select the database, click elements on the periodic table, and search; the widget works.

@edan-bainglass edan-bainglass merged commit bf7eb89 into master Aug 27, 2025
11 checks passed
@edan-bainglass edan-bainglass deleted the fix-optimade branch August 27, 2025 06:54
@edan-bainglass
Copy link
Member Author

@danielhollas release?

@danielhollas
Copy link
Contributor

Sure, go ahead! Master seems to contain mostly bug fixes so 2.4.1 seems appropriate?

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.

5 participants