Skip to content
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

Add error message if Murnaghan.plot is called on unfinished jobs #291

Merged
merged 1 commit into from
Jul 27, 2021
Merged

Conversation

pmrv
Copy link
Contributor

@pmrv pmrv commented Jul 26, 2021

Just a small QoL fix to fail early.

@pmrv pmrv added the enhancement New feature or request label Jul 26, 2021
@coveralls
Copy link

Pull Request Test Coverage Report for Build 1067316977

  • 1 of 2 (50.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 68.075%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pyiron_atomistics/atomistics/master/murnaghan.py 1 2 50.0%
Totals Coverage Status
Change from base Build 1065298154: 0.01%
Covered Lines: 10909
Relevant Lines: 16025

💛 - Coveralls

Comment on lines +778 to +779
if not self.status.finished:
raise ValueError("Job must be successfully run, before calling this method.")
Copy link
Member

Choose a reason for hiding this comment

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

But maybe I want to use the plot method with 10 points if out of my 11 calculation one failed. Meaning I see why you want this while at the same time it might also break the workflow of others.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In my case it was more that the calculations hadn't finished yet, so energy and volume are not in the HDF yet. What about

Suggested change
if not self.status.finished:
raise ValueError("Job must be successfully run, before calling this method.")
if not (self.status.finished or self.status.not_converged):
raise ValueError("Job must be successfully run, before calling this method.")

In case the job aborts, I suppose there's no point in plotting, since there will also be no data in the HDF.

Copy link
Member

Choose a reason for hiding this comment

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

My bad - we can keep the initial modification - when the collect is successful the status is set to finished https://github.com/pyiron/pyiron_base/blob/master/pyiron_base/master/parallel.py#L458 I mixed it up with my own workflow which is based on pyiron tables.

@pmrv pmrv merged commit 192f1af into master Jul 27, 2021
@delete-merged-branch delete-merged-branch bot deleted the murn branch July 27, 2021 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants