Skip to content

feature/SOF 7894 tests - #301

Merged
timurbazhirov merged 7 commits into
mainfrom
feature/SOF-7894-tests
May 12, 2026
Merged

feature/SOF 7894 tests#301
timurbazhirov merged 7 commits into
mainfrom
feature/SOF-7894-tests

Conversation

@VsevolodX

@VsevolodX VsevolodX commented May 12, 2026

Copy link
Copy Markdown
Member
  • update: add interface + use correct import
  • update: load from emfs
  • update: only api client
  • update: fix symlink
  • chore: versions
  • update: revert

Summary by CodeRabbit

Release Notes

  • Chores
    • Updated example notebooks including material creation and quantum espresso calculations to use improved asynchronous job-waiting operations for enhanced reliability
    • Configured new API client notebook environment with required package dependencies
    • Added new example material structure data file (C(001)-Ni(111) interface) for materials designer workflow reference

Review Change Stack

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@coderabbitai

coderabbitai Bot commented May 12, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@VsevolodX has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 58 minutes and 27 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3020da0f-1fdf-4894-9313-1a4d03350fe2

📥 Commits

Reviewing files that changed from the base of the PR and between 2a771f1 and 7f256b3.

📒 Files selected for processing (1)
  • examples/material/create_material.ipynb
📝 Walkthrough

Walkthrough

This PR updates example notebooks and configuration to integrate a new API client package and adopts asynchronous job-waiting patterns. A new api_client notebook entry is configured, the material creation example switches to use it, and the workflow example moves to async job handling.

Changes

Example Notebooks and Configuration Updates

Layer / File(s) Summary
API Client Configuration and Integration
config.yml, examples/material/create_material.ipynb
A new notebook entry named api_client is added to config.yml with mat3ra-api-client package dependencies. The create_material.ipynb example is updated to install api_client instead of api_examples via the setup micropip call.
Asynchronous Job Waiting Pattern
examples/workflow/qe_scf_calculation.ipynb
The qe_scf_calculation.ipynb notebook replaces the synchronous wait_for_jobs_to_finish import with the asynchronous wait_for_jobs_to_finish_async variant from utils.api, aligning with the later await usage in the notebook.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Exabyte-io/api-examples#298: Modifies the same qe_scf_calculation.ipynb notebook to replace the synchronous wait_for_jobs_to_finish helper with the async variant.
  • Exabyte-io/api-examples#285: Updates notebooks to use wait_for_jobs_to_finish_async, the async job-wait helper that is being adopted here.

Suggested reviewers

  • timurbazhirov

Poem

🐇 A client awakens in config's embrace,
Examples now run at an async pace,
Jobs finish fast when we await,
With api_client, we create!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'feature/SOF 7894 tests' is vague and generic, using branch naming convention rather than describing actual changeset content; it doesn't convey what the PR meaningfully accomplishes. Use a descriptive title that summarizes the main change, such as 'Update notebooks to use api_client and async job helpers' or similar wording that reflects the actual modifications made.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/SOF-7894-tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@config.yml`:
- Around line 75-76: The notebook mapping contains a malformed YAML entry: an
unkeyed list item "mat3ra-api-client" appears under the notebook section instead
of being the value of the api_client key; fix by making "api_client" a proper
key with "mat3ra-api-client" as its value (correct indentation and colon),
ensuring the notebook mapping contains a valid api_client: mat3ra-api-client
entry so the config loader can parse it.

In `@other/materials_designer/uploads/C`(001)-Ni(111)-Interface.json:
- Line 1: The file C(001)-Ni(111)-Interface.json currently contains a raw path
string ("../../experiments/jupyterlite/uploads/C(001)-Ni(111)-Interface.json")
instead of JSON, which will break JSON loaders; fix it by either replacing the
file contents with valid JSON data matching the expected schema for
material/interface metadata (e.g., an object with the required fields) or remove
this file and create an actual filesystem symlink pointing to the target path so
consumers read real JSON from the referenced file; ensure the final committed
file is valid JSON (or a real symlink) so JSON parsers can load it without
error.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 146c2548-5b33-4ffc-b7d8-fe9e96aac042

📥 Commits

Reviewing files that changed from the base of the PR and between 87b7706 and 2a771f1.

📒 Files selected for processing (5)
  • config.yml
  • examples/material/create_material.ipynb
  • examples/workflow/qe_scf_calculation.ipynb
  • other/experiments/jupyterlite/uploads/C(001)-Ni(111)-Interface.json
  • other/materials_designer/uploads/C(001)-Ni(111)-Interface.json

Comment thread config.yml Outdated
Comment on lines +75 to +76
- name: api_client
- mat3ra-api-client

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Fix malformed YAML for api_client notebook entry.

Line 76 is an unkeyed list item under the notebook mapping, which makes this section invalid for the expected schema and can break config loading.

Suggested fix
   - name: api_client
-      - mat3ra-api-client
+    packages_common:
+      - mat3ra-api-client
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: api_client
- mat3ra-api-client
- name: api_client
packages_common:
- mat3ra-api-client
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config.yml` around lines 75 - 76, The notebook mapping contains a malformed
YAML entry: an unkeyed list item "mat3ra-api-client" appears under the notebook
section instead of being the value of the api_client key; fix by making
"api_client" a proper key with "mat3ra-api-client" as its value (correct
indentation and colon), ensuring the notebook mapping contains a valid
api_client: mat3ra-api-client entry so the config loader can parse it.

@@ -0,0 +1 @@
../../experiments/jupyterlite/uploads/C(001)-Ni(111)-Interface.json No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

*.json file is not valid JSON and will break JSON loaders.

At Line 1, the file contains a raw path string, not JSON content. If the intent is to alias another file, commit this as an actual symlink; otherwise replace it with valid JSON data.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@other/materials_designer/uploads/C`(001)-Ni(111)-Interface.json at line 1,
The file C(001)-Ni(111)-Interface.json currently contains a raw path string
("../../experiments/jupyterlite/uploads/C(001)-Ni(111)-Interface.json") instead
of JSON, which will break JSON loaders; fix it by either replacing the file
contents with valid JSON data matching the expected schema for
material/interface metadata (e.g., an object with the required fields) or remove
this file and create an actual filesystem symlink pointing to the target path so
consumers read real JSON from the referenced file; ensure the final committed
file is valid JSON (or a real symlink) so JSON parsers can load it without
error.

@timurbazhirov
timurbazhirov merged commit 8e157e6 into main May 12, 2026
5 checks passed
@timurbazhirov
timurbazhirov deleted the feature/SOF-7894-tests branch May 12, 2026 02:01
@coderabbitai coderabbitai Bot mentioned this pull request Jun 5, 2026
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.

2 participants