upload: nonexistent paths are silently ignored
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 28
- Fork
- 37
- Merge medio
- 3g 21h
- PR unite (30g)
- 13
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di dandi/dandi-cli
-
pynwb metadata: get neurodata typesForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Extract asset anatomy from HERD ontology links in NWB filesForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 1 giorno
-
`metadata.nwb.get_metadata()` validates the whole BIDS dataset for every NWB file, then discards the resultForse già presa @CodyCBakerPhD l’ha presa 23 giorni fa. ApertaBIDS performance
dandi/dandi-cli#1962 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
`bids_version` is always `None` since the switch to bids-validator-denoForse già presa @yarikoptic-gitmate l’ha presa 2 giorni fa. ApertaBIDS bug
Difficoltà 3/5 Mezza giornata Idoneità per principianti 45/100
dandi/dandi-cli#1961 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
dandi/dandi-cli#1920 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di dandi/dandi-cli
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
its-me-prash/vwgroup-connect-ha#2019 ·
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
KonstantinStarovoytov/kitden#21 ·
I maintainer di solito rispondono entro 1 giorno
-
RefactorAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
ehmatthes/gh-profiler#166 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
smart-on-fhir/smart-fetch#73 ·
-
good first issue help wanted
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
RizgarOzan/playcal#13 ·