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

cli: introduce basic dvc du #10068

Merged
merged 1 commit into from
Dec 12, 2023
Merged

cli: introduce basic dvc du #10068

merged 1 commit into from
Dec 12, 2023

Conversation

efiop
Copy link
Contributor

@efiop efiop commented Nov 7, 2023

  • By default shows du for every entry in path.
  • -s|--summarize to show total.
  • Sizes of directories themselves are considered 0.
  • Humanized size by default.
  • Sizes are as reported by fs/recorded in dvc files.

Example:

$ dvc du . data
285    data/__pycache__
826M   data/cats_dogs
11     data/.gitignore
826M   data/large
16.8M  data/tiny
18.4M  data/mnist
88.8M  data/small
1.73G  data

Note that we already have --size for dvc ls that just shows sizes.

Related https://github.com/iterative/studio/pull/6541
Fixes #4682

Docs coming in a separate PR.

@efiop efiop force-pushed the du branch 2 times, most recently from 6f30696 to ab85aa7 Compare November 9, 2023 01:44
Copy link

codecov bot commented Nov 9, 2023

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (3c31234) 90.63% compared to head (6086fd5) 90.63%.

Files Patch % Lines
dvc/fs/dvc.py 74.07% 4 Missing and 3 partials ⚠️
dvc/repo/du.py 86.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10068      +/-   ##
==========================================
- Coverage   90.63%   90.63%   -0.01%     
==========================================
  Files         496      500       +4     
  Lines       37754    37847      +93     
  Branches     5492     5503      +11     
==========================================
+ Hits        34218    34302      +84     
- Misses       2900     2905       +5     
- Partials      636      640       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@efiop efiop force-pushed the du branch 4 times, most recently from 3c20564 to 6a05cf5 Compare November 10, 2023 01:44
@efiop efiop force-pushed the du branch 2 times, most recently from c6d54cd to df73efd Compare November 28, 2023 12:44
@efiop efiop force-pushed the du branch 4 times, most recently from 53e8009 to 9c699c6 Compare December 7, 2023 16:04
@skshetry
Copy link
Member

skshetry commented Dec 8, 2023

@efiop, what is blocking this PR?

@efiop
Copy link
Contributor Author

efiop commented Dec 8, 2023

@skshetry Nothing, need to get back to it and add some tests.

@efiop efiop changed the title [WIP] cli: introduce basic dvc du cli: introduce basic dvc du Dec 12, 2023
@efiop efiop marked this pull request as ready for review December 12, 2023 21:21
@efiop efiop merged commit 8ccae0a into iterative:main Dec 12, 2023
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Get dataset size from DVC data registry
2 participants