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

Node: add the walk method to iterate over repository content #4935

Merged
merged 1 commit into from
May 8, 2021

Conversation

sphuber
Copy link
Contributor

@sphuber sphuber commented May 7, 2021

Fixes #4927

The walk method is added that simply forwards to the same method of
the underlying Repository instance that is assigned to the node. This
allows to recursively iterate over the directories and files that are
stored in the node's repository folder in the style of os.walk.

The `walk` method is added that simply forwards to the same method of
the underlying `Repository` instance that is assigned to the node. This
allows to recursively iterate over the directories and files that are
stored in the node's repository folder in the style of `os.walk`.
@sphuber sphuber force-pushed the fix/4927/add-node-walk branch from 666b749 to d171647 Compare May 7, 2021 21:51
@sphuber sphuber requested a review from ltalirz May 7, 2021 21:51
@codecov
Copy link

codecov bot commented May 7, 2021

Codecov Report

Merging #4935 (d171647) into develop (f49d10b) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4935      +/-   ##
===========================================
+ Coverage    80.05%   80.06%   +0.01%     
===========================================
  Files          515      515              
  Lines        36619    36623       +4     
===========================================
+ Hits         29313    29317       +4     
  Misses        7306     7306              
Flag Coverage Δ
django 74.51% <100.00%> (+0.03%) ⬆️
sqlalchemy 73.44% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aiida/orm/nodes/repository.py 93.91% <100.00%> (+0.32%) ⬆️

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 f49d10b...d171647. Read the comment docs.

Copy link
Member

@ltalirz ltalirz left a comment

Choose a reason for hiding this comment

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

thanks a lot @sphuber !

@ltalirz ltalirz merged commit 403f7e7 into aiidateam:develop May 8, 2021
@sphuber sphuber deleted the fix/4927/add-node-walk branch May 8, 2021 09:43
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.

Expose Repository.walk on the NodeRepositoryMixin level
2 participants