Skip to content
Closed
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ notebooks:
- emfs:/drive/packages/watchdog-2.3.1-py3-none-any.whl
- name: specific_examples
packages_pyodide:
- pandas
- mat3ra-standata
# - mat3ra-notebooks-utils[utils_standata]
- name: analyze_convex_hull
Expand All @@ -75,6 +76,7 @@ notebooks:
packages_pyodide:
- annotated_types>=0.6.0
- jinja2
- pandas
- emfs:/drive/packages/pydantic_core-2.18.2-py3-none-any.whl
- emfs:/drive/packages/pydantic-2.7.1-py3-none-any.whl
- mat3ra-standata
Expand Down
3 changes: 2 additions & 1 deletion examples/job/create_and_submit_job.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,11 @@
},
"outputs": [],
"source": [
"workflow = client.workflows.get(workflow_id)\n",
"config = {\n",
" \"owner\": {\"_id\": OWNER_ID},\n",
" \"_material\": {\"_id\": material_id},\n",
" \"workflow\": {\"_id\": workflow_id},\n",
" \"workflow\": workflow,\n",
" \"name\": JOB_NAME,\n",
"}"
]
Expand Down
19 changes: 15 additions & 4 deletions examples/job/get-file-from-job.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,21 @@
"material_id = client.bank_materials.copy(bank_material_id, owner_id)[\"_id\"]\n",
"materials = client.materials.list({\"owner._id\": owner_id})\n",
"\n",
"# Create the job\n",
"job = client.jobs.create_by_ids(\n",
" materials=materials, workflow_id=workflow_id, project_id=project_id, owner_id=owner_id, prefix=\"Test_Job_Output\"\n",
")[0]\n",
"# Create the job - JobsCreate's schema requires the full workflow document embedded (a job keeps\n",
"# an immutable snapshot of what it actually ran), not just a {\"_id\": ...} reference, so fetch it\n",
"# in full before building the job config (project/material references stay {\"_id\": ...}, which the\n",
"# schema does accept for those fields).\n",
"workflow = client.workflows.get(workflow_id)\n",
"material = materials[0]\n",
"job_config = client.jobs.build_config(\n",
" material_ids=[material[\"_id\"]],\n",
" workflow_id=workflow_id,\n",
" project_id=project_id,\n",
" owner_id=owner_id,\n",
" name=\" \".join((\"Test_Job_Output\", material[\"formula\"])),\n",
")\n",
"job_config[\"workflow\"] = workflow\n",
"job = client.jobs.create(job_config)\n",
"\n",
"# Submit the job\n",
"client.jobs.submit(job[\"_id\"])\n",
Expand Down
2 changes: 1 addition & 1 deletion other/materials_designer/workflows/equation_of_state.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@
"outputs": [],
"source": [
"jobs_set_name = f\"{JOBS_SET_PREFIX} {base_label} {timestamp}\"\n",
"jobs_set = client.jobs.create_set({\"name\": jobs_set_name, \"owner\": {\"_id\": ACCOUNT_ID}})\n",
"jobs_set = client.jobs.create_set({\"name\": jobs_set_name, \"projectId\": project_id})\n",
"print(f\"Created jobs set: {jobs_set['name']} ({jobs_set['_id']})\")"
]
},
Expand Down
9 changes: 2 additions & 7 deletions src/py/mat3ra/notebooks_utils/ipython/entity/property/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
FONT_SIZE_LABEL_STABLE = 16
FONT_SIZE_LABEL_UNSTABLE = 14
FONT_SIZE_LEGEND = 14
TEXT_SHADOW = "2px 2px 4px rgba(0,0,0,0.8), " "-2px -2px 4px rgba(0,0,0,0.8), " "0px 0px 8px rgba(0,0,0,0.9)"

# Markers
MARKER_SIZE = 20
Expand Down Expand Up @@ -60,14 +59,10 @@ def plot_convex_hull(phase_diagram: PhaseDiagram, show_unstable: float = 0.2) ->
trace.marker.size = MARKER_SIZE
if trace.name == "Stable":
trace.textposition = "top center"
trace.textfont = dict(
size=FONT_SIZE_LABEL_STABLE, color=TEXT_COLOR_PRIMARY, family=FONT_FAMILY, shadow=TEXT_SHADOW
)
trace.textfont = dict(size=FONT_SIZE_LABEL_STABLE, color=TEXT_COLOR_PRIMARY, family=FONT_FAMILY)
else:
trace.textposition = "bottom center"
trace.textfont = dict(
size=FONT_SIZE_LABEL_UNSTABLE, color=TEXT_COLOR_UNSTABLE, family=FONT_FAMILY, shadow=TEXT_SHADOW
)
trace.textfont = dict(size=FONT_SIZE_LABEL_UNSTABLE, color=TEXT_COLOR_UNSTABLE, family=FONT_FAMILY)

axis_style = dict(
title=dict(font=dict(size=FONT_SIZE_TITLE, color=TEXT_COLOR_PRIMARY)),
Expand Down
Loading