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 implementation for 'file_count' #1405

Merged
merged 28 commits into from
Mar 2, 2023
Merged

Add implementation for 'file_count' #1405

merged 28 commits into from
Mar 2, 2023

Conversation

shahzebsiddiqui
Copy link
Member

No description provided.

… arbitrary directory name and perform a reference count.

Update json schema to add support for 'file_count'

Update method walk_tree to allow for directory traversal to a certain depth by adding an optional argument max_depth
add method search_files where one can perform directory traversal based on regular expression. The 'max_depth' argument can be supported to limit search by directory level

Update regression test for walk_tree and add tests for search_files

Add example buildspec for 'file_count'
…alk_tree' and 'search_tree'.

numfiles will control how many files are returned that can be useful when limiting output.

The file_traverse_limit controls how many files are traversed during directory walk which can be useful
when going through a big directory tree or even '/' where directory walk may not be welcomed.
…s method to organize tests

add method create_file that will be used for creating an empty file
…pecifying extension types.

update regression test to make use of 'create_file' when creating files in 'TestSearchFiles' class
update file_count.yml example
fix issue with file_count check where file count was not done correctly.
make slight changes to file_count.yml
…d to retrieve

files based on files, directory or symlink.

add regression coverage for this feature
…tory

search by files, directory or symbolic link
add example buildspec using filetype property
ensure we pass file_type argument when calling walk_tree and search_files
… for regression test

update method test_file_count to use the new buildspec
@codecov
Copy link

codecov bot commented Feb 28, 2023

Codecov Report

Base: 69.16% // Head: 68.57% // Decreases project coverage by -0.59% ⚠️

Coverage data is based on head (cde6a68) compared to base (15f4b41).
Patch coverage: 58.33% of modified lines in pull request are covered.

❗ Current head cde6a68 differs from pull request most recent head 5d391e8. Consider uploading reports for the commit 5d391e8 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #1405      +/-   ##
==========================================
- Coverage   69.16%   68.57%   -0.59%     
==========================================
  Files          57       57              
  Lines        6329     6453     +124     
  Branches     1122     1158      +36     
==========================================
+ Hits         4377     4425      +48     
- Misses       1950     2026      +76     
  Partials        2        2              
Impacted Files Coverage Δ
buildtest/builders/base.py 54.48% <0.00%> (-0.95%) ⬇️
buildtest/builders/compiler.py 85.51% <ø> (ø)
buildtest/builders/script.py 73.08% <ø> (ø)
buildtest/builders/spack.py 10.14% <ø> (ø)
buildtest/buildsystem/builders.py 76.51% <ø> (ø)
buildtest/buildsystem/parser.py 100.00% <ø> (ø)
buildtest/cli/buildspec.py 94.68% <ø> (ø)
buildtest/cli/cdash.py 88.61% <ø> (ø)
buildtest/cli/clean.py 88.57% <ø> (ø)
buildtest/cli/compilers.py 27.59% <ø> (ø)
... and 25 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@shahzebsiddiqui shahzebsiddiqui self-assigned this Feb 28, 2023
fix a bug during comparison check when calling min() function. One of the argument was a None type.
…estWalkTree where methods don't need access to 'self'
Copy link
Collaborator

@prathmesh4321 prathmesh4321 left a comment

Choose a reason for hiding this comment

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

@shahzebsiddiqui Looks really good !. You can merge this in.

@shahzebsiddiqui shahzebsiddiqui merged commit 5e04679 into devel Mar 2, 2023
@shahzebsiddiqui shahzebsiddiqui deleted the file_count branch March 2, 2023 17:15
@shahzebsiddiqui shahzebsiddiqui linked an issue Mar 3, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Status check based on counting the number of files
2 participants