-
Notifications
You must be signed in to change notification settings - Fork 5
SOF-7824 update: use properties API #269
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
base: main
Are you sure you want to change the base?
Changes from all commits
d658dea
570aa51
79da9a5
d29ef14
e9c54a4
1ccfc9d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,3 +70,4 @@ notebooks: | |
| - requests | ||
| - mat3ra-ade | ||
| - mat3ra-wode | ||
| - mat3ra-prode | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,13 +8,15 @@ dependencies = [ | |
| # ase >=3.25.0 is required for supercell to be generated, | ||
| # otherwise on 3.21.1 we encountered negative number of atoms during supercell generation | ||
| "ase>=3.25.0", | ||
| "mat3ra-api-client>=2026.1.23.post0", | ||
| # Use a valid PEP 508 URL for a local file dependency: file URIs must be absolute and include three slashes | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Misleading comment — references The comment on Line 11 says "file URIs must be absolute and include three slashes", which describes ✏️ Suggested fix- # Use a valid PEP 508 URL for a local file dependency: file URIs must be absolute and include three slashes
- "mat3ra-api-client @ git+https://github.com/Exabyte-io/api-client.git@a329f363893ee96832b5c1a3c514ade28f0839cb",
+ # Pinned to a specific commit until a new PyPI release is available; replace once mat3ra-api-client >= <target_version> is published
+ "mat3ra-api-client @ git+https://github.com/Exabyte-io/api-client.git@a329f363893ee96832b5c1a3c514ade28f0839cb",🤖 Prompt for AI Agents |
||
| "mat3ra-api-client @ git+https://github.com/Exabyte-io/api-client.git@a329f363893ee96832b5c1a3c514ade28f0839cb", | ||
| "matplotlib>=3.4.1", | ||
| "pandas>=1.5.3", | ||
| "pymatgen==2024.4.13", | ||
| "mat3ra-made>=2025.8.13.post0", | ||
| "mat3ra-utils>=2024.6.11.post0", | ||
| "mat3ra-wode" | ||
| "mat3ra-wode", | ||
| "mat3ra-prode @ git+https://github.com/Exabyte-io/prode.git@5b2e02ddbaf5dd473f0acaf1e1d76ddadc6bb184" | ||
| ] | ||
|
|
||
| [project.optional-dependencies] | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -390,9 +390,9 @@ def visualize_workflow(workflow, level: int = 2) -> None: | |||||||||||||||||
| display_JSON(workflow_config, level=level) | ||||||||||||||||||
|
|
||||||||||||||||||
|
|
||||||||||||||||||
| def render_prove(results, width=900, title="Properties", extra_config=None): | ||||||||||||||||||
| def visualize_properties(results, width=900, title="Properties", extra_config=None): | ||||||||||||||||||
| """ | ||||||||||||||||||
| Render Prove results viewer in a notebook (Jupyter / Colab / Pyodide). | ||||||||||||||||||
| Visualize properties using a Prove viewer. | ||||||||||||||||||
|
|
||||||||||||||||||
| Args: | ||||||||||||||||||
| results: List[dict] of property JSON objects (or a single dict). | ||||||||||||||||||
|
|
@@ -403,6 +403,9 @@ def render_prove(results, width=900, title="Properties", extra_config=None): | |||||||||||||||||
| if isinstance(results, dict): | ||||||||||||||||||
| results = [results] | ||||||||||||||||||
|
|
||||||||||||||||||
| # Only keep the properties we can display | ||||||||||||||||||
| results = [r for r in results if "value" in r or "values" in r] | ||||||||||||||||||
|
|
||||||||||||||||||
|
Comment on lines
+406
to
+408
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add an early-return guard and a warning for the empty-after-filter case. Items without 🛡️ Proposed fix # Only keep the properties we can display
results = [r for r in results if "value" in r or "values" in r]
+
+ if not results:
+ print("render_prove: no displayable properties found (each item must contain 'value' or 'values').")
+ return📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||
| timestamp = time.time() | ||||||||||||||||||
| div_id = f"prove-{timestamp}" | ||||||||||||||||||
| results_json = json.dumps(results) | ||||||||||||||||||
|
|
||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.