Skip to content

Fix copying of the folder in caching#1745

Merged
giovannipizzi merged 5 commits into
aiidateam:developfrom
greschd:fix_cache_folder
Jul 13, 2018
Merged

Fix copying of the folder in caching#1745
giovannipizzi merged 5 commits into
aiidateam:developfrom
greschd:fix_cache_folder

Conversation

@greschd
Copy link
Copy Markdown
Member

@greschd greschd commented Jul 12, 2018

Fixes #1744 for the develop branch.

@greschd greschd requested a review from giovannipizzi July 12, 2018 12:34
self.add_path(cache_node.get_abs_path(path), path)
self.folder.replace_with_folder(
cache_node.folder.get_abs_path(''),
overwrite=True
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you explicitly set move=False? Just in case we change inadvertently the default.
also, in the test above

  1. just as a note, raw_input will be there only for JobCalculations
  2. maybe you can check that 'raw_input' is still there also in the node you cached from, to avoid that by mistake we remove the files?
    Thanks!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah, makes sense.

  1. I knew that, but put it explicitly in the test now.
  2. Also done.

I guess Node.copy was already broken for a while, but wasn't really used for much.

Cheers!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

FYI: Node.copy, now removed from develop, was used to create a "copy" of the calculation, to possibly modify the inputs and resubmit - so it was intended that it didn't copy the raw_inputs.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ah I see.. well then I guess I saw that method and used it in a wrong way 🙂

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Wait, doesn't that mean #1746 is wrong because it changes the behavior of copy?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ops... yes! I didn't realize there you changed copy, I thought it was the implementation of caching only... could you fix?

@codecov-io
Copy link
Copy Markdown

codecov-io commented Jul 12, 2018

Codecov Report

Merging #1745 into develop will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1745      +/-   ##
===========================================
- Coverage    57.16%   57.16%   -0.01%     
===========================================
  Files          275      275              
  Lines        33912    33911       -1     
===========================================
- Hits         19386    19385       -1     
  Misses       14526    14526
Impacted Files Coverage Δ
aiida/orm/implementation/general/node.py 77.95% <100%> (-0.04%) ⬇️
aiida/common/folders.py 80.23% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 75473e7...1a14ccb. Read the comment docs.

@giovannipizzi giovannipizzi merged commit 563854a into aiidateam:develop Jul 13, 2018
@greschd greschd deleted the fix_cache_folder branch December 13, 2019 15:36
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.

3 participants