Skip to content

Doc: Add StashCalculation explanation to RTD #6861

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

Merged
merged 3 commits into from
Jun 6, 2025

Conversation

khsrali
Copy link
Contributor

@khsrali khsrali commented May 6, 2025

Following #6839

.. code-block:: python

from aiida.common.datastructures import StashMode
from aiida.orm import load_node
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
from aiida.orm import load_node
from aiida.orm import load_node, load_computer


inputs = {
'metadata': {
'computer': Computer.collection.get(label="localhost"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'computer': Computer.collection.get(label="localhost"),
'computer': load_computer(label="localhost"),

Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't load_computer much simples than Computer.collection.get?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Both do the same job. Do you mean from user friendliness point of view?
Then yes maybe

Copy link
Contributor

@agoscinski agoscinski left a comment

Choose a reason for hiding this comment

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

Can we make computer optional in the StashCalculation? So by default the computer of the calcjob is used. Then in the docs we do not even mention it. Or we mention it in a separate section. I am not sure how the validation process kicks before one can change the metadata in the Calcjob.

https://github.com/aiidateam/aiida-core/pull/6861/files#r2081325332

I don't mean to make it in this PR optional, but if it is possible I would do it in another PR before merging this one

EDIT: discussed with @khsrali --> created issue for this #6871

EDIT#2: discussed with @agoscinski --> closed issue #6871

@khsrali khsrali requested a review from agoscinski May 23, 2025 14:32
Copy link

codecov bot commented May 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.61%. Comparing base (ee87c79) to head (fb6746e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6861      +/-   ##
==========================================
+ Coverage   78.59%   78.61%   +0.02%     
==========================================
  Files         564      564              
  Lines       43128    43128              
==========================================
+ Hits        33891    33899       +8     
+ Misses       9237     9229       -8     

☔ 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.

@khsrali khsrali linked an issue May 23, 2025 that may be closed by this pull request
Copy link
Contributor

@agoscinski agoscinski left a comment

Choose a reason for hiding this comment

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

@khsrali
Copy link
Contributor Author

khsrali commented Jun 5, 2025

NOTE:

.value has to come back.. pydantic doesn't do it for a calcjob..

@agoscinski agoscinski force-pushed the doc/stashing-caljob branch from bf168ba to 20efa61 Compare June 6, 2025 10:23
@agoscinski
Copy link
Contributor

agoscinski commented Jun 6, 2025

@khsrali can you squash merge. Not sure if you want specific commit message.

EDIT: Sorry I want to finish up for release so I squashed. I hope message is fine

@agoscinski agoscinski force-pushed the doc/stashing-caljob branch from 20efa61 to fb6746e Compare June 6, 2025 19:26
@agoscinski agoscinski changed the title Doc: adding explanation on StashCalculation Doc: Add StashCalculation explanation to RTD Jun 6, 2025
@agoscinski agoscinski merged commit 85a84fc into aiidateam:main Jun 6, 2025
12 checks passed
@agoscinski agoscinski deleted the doc/stashing-caljob branch June 6, 2025 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Docs: Update instruction of Stashing
2 participants