upload: nonexistent paths are silently ignored
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 28
- Forks
- 37
- Merge medio
- 3 d 21 h
- PR fusionados (30 d)
- 13
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de dandi/dandi-cli
-
pynwb metadata: get neurodata typesQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Extract asset anatomy from HERD ontology links in NWB filesPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 1 día
-
`metadata.nwb.get_metadata()` validates the whole BIDS dataset for every NWB file, then discards the resultPosiblemente ocupada @CodyCBakerPhD la tomó hace 24 días. AbiertoBIDS performance
dandi/dandi-cli#1962 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
`bids_version` is always `None` since the switch to bids-validator-denoPosiblemente ocupada @yarikoptic-gitmate la tomó hace 3 días. AbiertoBIDS bug
Dificultad 3/5 Medio día Aptitud para principiantes 45/100
dandi/dandi-cli#1961 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
dandi/dandi-cli#1920 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de dandi/dandi-cli
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
micropython/micropython#19906 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
FinanceFlash/unvibecode#597 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
TomAnthony/YourOwnWeigh#21 ·
Los mantenedores suelen responder en 1 día
-
[BUG]: Compliance rules never see Unity Catalog views as viewsPosiblemente ocupada @wagnercsantos la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
databrickslabs/ontos#1348 ·
Los mantenedores suelen responder en 3 días
-
Deprecated datetime.utcnow() is called on every log line (DeprecationWarning on Python 3.12+)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días