Skip to content

[ENH] size of the datasets without their derivatives and sourcedata folders - #32

Merged
Remi-Gau merged 2 commits into
mainfrom
enh/raw-size
Nov 3, 2026
Merged

Remi-Gau merged 2 commits into
mainfrom
enh/raw-size

Conversation

@Remi-Gau

Copy link
Copy Markdown
Contributor

The size of the datasets (size, from datalad status --annex all) includes the content of their derivatives and sourcedata folders, which can be large and are not standardized.

New field: raw_size

  • The size in bytes of the annexed files, without the derivatives, sourcedata (and source) folders at the root of the dataset.
  • From the size in the git-annex keys of the files (git annex find --branch=HEAD --format='${bytesize}\t${file}\n'): fast (no datalad status), even if the content of the files is not downloaded.
  • The files of the last commit, whatever the state of the working tree: for example the local copy of ds004572 had all its files staged as deleted, and the working tree gave 0 bytes instead of 46.8 GB.
  • Read when indexing a dataset, and can be updated with bids_inventory update --fields raw_size (both sources).

In the dashboard

wrangle_data gives size (and mean_size, per participant) in bytes from raw_size when known, otherwise from the size reported by datalad. The sizes of datalad are now read in binary units (2.2 GB is 2.2 × 1024³ bytes, they were read as 2.2 × 10⁹).

Listings

  • OpenNeuro: raw_size for 1,920 of the 1,929 datasets: 130.7 TB instead of 182.8 TB. Not for 6 datasets not installed locally yet, and 3 whose local copy is not initialized with git-annex (ds004186, ds004935, ds006391): they keep the size of datalad.
  • Other datasets: all 131 (3.6 TB instead of 3.7 TB).
  • Some datasets are now larger than their previous size: it had been read from an older copy (for example ds006182: 6.7 GB in the superdataset from May 2025, 30.6 GiB in its copy from February 2026). Datasets with only derivatives (ds006253) have a raw_size of 0.

🤖 Generated with Claude Code

Remi-Gau and others added 2 commits October 20, 2026 14:54
…olders

- new field raw_size: the size in bytes of the annexed files of the last commit
  (git annex find --branch=HEAD, from the size in their git-annex keys, even if their
  content is not downloaded), without the derivatives, sourcedata and source folders at
  the root of the dataset; can be updated with bids_inventory update --fields raw_size
- wrangle_data: size (and mean_size) in bytes from raw_size when known, otherwise from
  the size reported by datalad, now read in binary units (2.2 GB is 2.2 * 1024**3 bytes)
- listings updated: 1,920 of 1,929 openneuro datasets (130.7 TB instead of 182.8 TB),
  and the 131 others

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Remi-Gau
Remi-Gau merged commit 00d3265 into main Nov 3, 2026
7 checks passed
@Remi-Gau
Remi-Gau deleted the enh/raw-size branch November 3, 2026 13:22
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.

1 participant