upload: nonexistent paths are silently ignored
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with _partition_upload_assets() and under_paths() in dandi/upload.py, where a missing path matches nothing, then report_omitted_paths(). Check how path_is_subpath() handles a path that equals a prefix, and the commented-out click.Path(exists=True) in cmd_upload. Done means a missing path without --sync fails and names it (broken symlinks still accepted), and with --sync a path matching nothing on the server gets a warning. The --sync deletion question needs a maintainer decision first.
索引モデルが issue の本文から書いたものです。
説明
dandi upload says nothing when a requested path does not exist locally. With a typo such as dandi upload sub-1/ (meant sub-01/), nothing reports the path. Reading upload(), the run then goes ahead with only dandiset.yaml.
Found while reviewing #1932, which makes find_dandi_files() raise FileNotFoundError for missing paths (#1094). That PR does not reach upload, because upload() never passes the requested paths to find_dandi_files(). It walks the whole Dandiset with dandiset.assets(allow_all=True), then filters with under_paths() in _partition_upload_assets() (dandi/upload.py). A missing path matches nothing:
>>> _partition_upload_assets(dandiset.assets(allow_all=True), [PurePosixPath("missing.nwb")], False)
([], [])
Nothing is selected and nothing is omitted, so report_omitted_paths() has nothing to warn about either. The click.Path(exists=True) on the paths argument of cmd_upload is commented out.
--sync rules out a blanket error
A missing path can be intentional with --sync. After rm -r sub-01, dandi upload --sync sub-01 offers to delete the remote assets under sub-01/. With --sync, a missing path currently gives:
| Missing local path | On the server | Result |
|---|---|---|
directory, e.g. sub-01 |
assets under sub-01/ |
offered for deletion (expected) |
file, e.g. sub-01/a.nwb |
sub-01/a.nwb |
not deleted, because path_is_subpath() returns False when the path equals the prefix |
typo, e.g. sub-1 |
nothing | nothing happens, no message |
Possible behavior
- Without
--sync: fail before doing anything and name the missing paths, asdandi validatealready does withLinkAwarePath(lexists=True). Broken symlinks, i.e. unfetched DataLad/git-annex content, should still be accepted. - With
--sync: accept a missing path only if it matches something on the server, and warn or error otherwise. Separately, decide whether--syncshould delete a remote file when that file's own path was given and is gone locally.
- 主要言語
- Python
- スター
- 28
- フォーク
- 37
- 平均マージ
- 3日 21時間
- マージ済み PR(30日)
- 13
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dandi/dandi-cli のほかの issue
-
pynwb metadata: get neurodata types再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
Extract asset anatomy from HERD ontology links in NWB files対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
-
`metadata.nwb.get_metadata()` validates the whole BIDS dataset for every NWB file, then discards the result対応中かも @CodyCBakerPhD が 23 日前に担当しました。 オープンBIDS performance
dandi/dandi-cli#1962 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
`bids_version` is always `None` since the switch to bids-validator-deno対応中かも @yarikoptic-gitmate が 2 日前に担当しました。 オープンBIDS bug
難易度 3/5 半日 初心者へのやさしさ 45/100
dandi/dandi-cli#1961 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
dandi/dandi-cli#1920 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
dandi/dandi-cli の issue をすべて見る
似ている issue
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
awslabs/social-messaging-agent-runtime-toolkit#140 ·
メンテナーはふだん 1 日以内に返信
-
subtask
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
fga-eps-mds/2026.2-MeasureSoftGram-DOC#187 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
txn2/mcp-data-platform#2493 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
YO-WHATS-UP2/minigit#78 ·
メンテナーはふだん 3 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
liberation-data/drivine-python#432 ·
メンテナーはふだん 1 日以内に返信