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

Make ´delete_existing_job´ available to the ´AtomisticGenericJob´ class #196

Merged
merged 3 commits into from
May 17, 2021

Conversation

raynol-dsouza
Copy link
Contributor

The AtomisticGenericJob class inherits from the GenericJobCore/GenericJob class. While the GenericJobCore.copy_to() has the argument delete_existing_job, AtomisticGenericJob.copy_to() doesn't. Since Protocol jobs create child jobs, the workflows of some of the them rely on an existing child job being deleted, while using copy_to(). Hence, the PR.

In addition, PyCharm kept complaining that the copy_to() of AtomisticGenericJob did not have the same signature as the copy_to() of GenericJobCore.

@raynol-dsouza raynol-dsouza requested review from pmrv and liamhuber May 13, 2021 00:40
@raynol-dsouza raynol-dsouza changed the title Make delete_existing_job´ available to the AtomisticGenericJob´ class Make ´delete_existing_job´ available to the ´AtomisticGenericJob´ class May 13, 2021
@coveralls
Copy link

coveralls commented May 13, 2021

Pull Request Test Coverage Report for Build 849156107

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.006%) to 67.126%

Totals Coverage Status
Change from base Build 831005000: 0.006%
Covered Lines: 10575
Relevant Lines: 15754

💛 - Coveralls

@liamhuber
Copy link
Member

Will not get to the review until Monday, but nice catch!

Copy link
Member

@liamhuber liamhuber left a comment

Choose a reason for hiding this comment

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

The functional code looks perfect; I streamlined the docstring part over in #200 so please review and merge that first.

Not related to your PR, but while we're touching this bit of code: I was unhappy to see that the extra functionality in this child class (a) used not instead of an explicit is not None check, and (b) wasn't covered in the unit tests. So once we get this signature fix in, I'll go write a new unit test.

No duplicated docstring text
Copy link
Contributor

@pmrv pmrv left a comment

Choose a reason for hiding this comment

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

Looks good to me, but I had a itch to make it a bit cleaner in pyiron_base and open this and this.

This would make this PR not necessary, but I feel the new PR needs a bit more architecture discussion, so I'd suggest we merge this so that @raynol-dsouza gets this work done and then work on the tests in the new PR.

@liamhuber
Copy link
Member

This would make this PR not necessary, but I feel the new PR needs a bit more architecture discussion, so I'd suggest we merge this so that @raynol-dsouza gets this work done and then work on the tests in the new PR.

Yeah, I like this. I'm a giant fan of solving the problem as close to the source as possible, but for the sake of immediacy there's no reason to delay merging this more local fix!

@raynol-dsouza raynol-dsouza merged commit 66996ab into master May 17, 2021
@delete-merged-branch delete-merged-branch bot deleted the copy_to branch May 17, 2021 15:44
@raynol-dsouza raynol-dsouza restored the copy_to branch June 1, 2021 04:20
@samwaseda samwaseda deleted the copy_to branch July 5, 2021 08:37
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.

4 participants