dandi 0.76.4__tar.gz → 0.76.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. {dandi-0.76.4 → dandi-0.76.6}/CHANGELOG.md +35 -0
  2. {dandi-0.76.4/dandi.egg-info → dandi-0.76.6}/PKG-INFO +2 -2
  3. {dandi-0.76.4 → dandi-0.76.6}/dandi/_version.py +3 -3
  4. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/base.py +19 -0
  5. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/cmd_download.py +11 -5
  6. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/cmd_move.py +8 -3
  7. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/cmd_organize.py +9 -4
  8. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/cmd_upload.py +4 -3
  9. dandi-0.76.6/dandi/cli/tests/test_base.py +74 -0
  10. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/tests/test_instances.py +1 -1
  11. {dandi-0.76.4 → dandi-0.76.6}/dandi/consts.py +1 -1
  12. {dandi-0.76.4 → dandi-0.76.6}/dandi/download.py +11 -2
  13. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/fixtures.py +9 -1
  14. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/test_download.py +67 -0
  15. {dandi-0.76.4 → dandi-0.76.6/dandi.egg-info}/PKG-INFO +2 -2
  16. {dandi-0.76.4 → dandi-0.76.6}/dandi.egg-info/SOURCES.txt +1 -0
  17. {dandi-0.76.4 → dandi-0.76.6}/dandi.egg-info/requires.txt +1 -1
  18. {dandi-0.76.4 → dandi-0.76.6}/pyproject.toml +1 -2
  19. {dandi-0.76.4 → dandi-0.76.6}/LICENSE +0 -0
  20. {dandi-0.76.4 → dandi-0.76.6}/MANIFEST.in +0 -0
  21. {dandi-0.76.4 → dandi-0.76.6}/README.md +0 -0
  22. {dandi-0.76.4 → dandi-0.76.6}/dandi/__init__.py +0 -0
  23. {dandi-0.76.4 → dandi-0.76.6}/dandi/bids_validator_deno/__init__.py +0 -0
  24. {dandi-0.76.4 → dandi-0.76.6}/dandi/bids_validator_deno/_models.py +0 -0
  25. {dandi-0.76.4 → dandi-0.76.6}/dandi/bids_validator_deno/_validator.py +0 -0
  26. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/__init__.py +0 -0
  27. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/cmd_delete.py +0 -0
  28. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/cmd_digest.py +0 -0
  29. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/cmd_instances.py +0 -0
  30. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/cmd_ls.py +0 -0
  31. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/cmd_service_scripts.py +0 -0
  32. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/cmd_shell_completion.py +0 -0
  33. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/cmd_validate.py +0 -0
  34. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/command.py +0 -0
  35. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/formatter.py +0 -0
  36. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/tests/__init__.py +0 -0
  37. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/tests/data/update_dandiset_from_doi/biorxiv.json +0 -0
  38. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/tests/data/update_dandiset_from_doi/biorxiv.vcr.yaml +0 -0
  39. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/tests/data/update_dandiset_from_doi/elife.json +0 -0
  40. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/tests/data/update_dandiset_from_doi/elife.vcr.yaml +0 -0
  41. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/tests/data/update_dandiset_from_doi/jneurosci.json +0 -0
  42. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/tests/data/update_dandiset_from_doi/jneurosci.vcr.yaml +0 -0
  43. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/tests/data/update_dandiset_from_doi/nature.json +0 -0
  44. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/tests/data/update_dandiset_from_doi/nature.vcr.yaml +0 -0
  45. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/tests/data/update_dandiset_from_doi/neuron.json +0 -0
  46. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/tests/data/update_dandiset_from_doi/neuron.vcr.yaml +0 -0
  47. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/tests/test_cmd_ls.py +0 -0
  48. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/tests/test_cmd_validate.py +0 -0
  49. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/tests/test_command.py +0 -0
  50. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/tests/test_digest.py +0 -0
  51. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/tests/test_download.py +0 -0
  52. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/tests/test_formatter.py +0 -0
  53. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/tests/test_move.py +0 -0
  54. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/tests/test_service_scripts.py +0 -0
  55. {dandi-0.76.4 → dandi-0.76.6}/dandi/cli/tests/test_shell_completion.py +0 -0
  56. {dandi-0.76.4 → dandi-0.76.6}/dandi/dandiapi.py +0 -0
  57. {dandi-0.76.4 → dandi-0.76.6}/dandi/dandiarchive.py +0 -0
  58. {dandi-0.76.4 → dandi-0.76.6}/dandi/dandiset.py +0 -0
  59. {dandi-0.76.4 → dandi-0.76.6}/dandi/delete.py +0 -0
  60. {dandi-0.76.4 → dandi-0.76.6}/dandi/due.py +0 -0
  61. {dandi-0.76.4 → dandi-0.76.6}/dandi/exceptions.py +0 -0
  62. {dandi-0.76.4 → dandi-0.76.6}/dandi/files/__init__.py +0 -0
  63. {dandi-0.76.4 → dandi-0.76.6}/dandi/files/_private.py +0 -0
  64. {dandi-0.76.4 → dandi-0.76.6}/dandi/files/bases.py +0 -0
  65. {dandi-0.76.4 → dandi-0.76.6}/dandi/files/bids.py +0 -0
  66. {dandi-0.76.4 → dandi-0.76.6}/dandi/files/zarr.py +0 -0
  67. {dandi-0.76.4 → dandi-0.76.6}/dandi/keyring_utils.py +0 -0
  68. {dandi-0.76.4 → dandi-0.76.6}/dandi/metadata/__init__.py +0 -0
  69. {dandi-0.76.4 → dandi-0.76.6}/dandi/metadata/core.py +0 -0
  70. {dandi-0.76.4 → dandi-0.76.6}/dandi/metadata/nwb.py +0 -0
  71. {dandi-0.76.4 → dandi-0.76.6}/dandi/metadata/util.py +0 -0
  72. {dandi-0.76.4 → dandi-0.76.6}/dandi/misctypes.py +0 -0
  73. {dandi-0.76.4 → dandi-0.76.6}/dandi/move.py +0 -0
  74. {dandi-0.76.4 → dandi-0.76.6}/dandi/organize.py +0 -0
  75. {dandi-0.76.4 → dandi-0.76.6}/dandi/pynwb_utils.py +0 -0
  76. {dandi-0.76.4 → dandi-0.76.6}/dandi/pytest_plugin.py +0 -0
  77. {dandi-0.76.4 → dandi-0.76.6}/dandi/support/__init__.py +0 -0
  78. {dandi-0.76.4 → dandi-0.76.6}/dandi/support/digests.py +0 -0
  79. {dandi-0.76.4 → dandi-0.76.6}/dandi/support/iterators.py +0 -0
  80. {dandi-0.76.4 → dandi-0.76.6}/dandi/support/pyout.py +0 -0
  81. {dandi-0.76.4 → dandi-0.76.6}/dandi/support/tests/__init__.py +0 -0
  82. {dandi-0.76.4 → dandi-0.76.6}/dandi/support/tests/test_digests.py +0 -0
  83. {dandi-0.76.4 → dandi-0.76.6}/dandi/support/tests/test_iterators.py +0 -0
  84. {dandi-0.76.4 → dandi-0.76.6}/dandi/support/threaded_walk.py +0 -0
  85. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/__init__.py +0 -0
  86. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/dandiarchive-docker/docker-compose.yml +0 -0
  87. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/metadata/dandimeta_migration.new.json +0 -0
  88. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/metadata/metadata2asset.json +0 -0
  89. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/metadata/metadata2asset_3.json +0 -0
  90. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/metadata/metadata2asset_cellline.json +0 -0
  91. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/metadata/metadata2asset_simple1.json +0 -0
  92. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/array_v3_corrupt_zarr_json.zarr/c/0/0 +0 -0
  93. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/array_v3_corrupt_zarr_json.zarr/c/0/1 +0 -0
  94. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/array_v3_corrupt_zarr_json.zarr/c/1/0 +0 -0
  95. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/array_v3_corrupt_zarr_json.zarr/c/1/1 +0 -0
  96. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/array_v3_corrupt_zarr_json.zarr/zarr.json +0 -0
  97. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/arrays_in_groups_missing_zarr_json.zarr/foo/bar/z/zarr.json +0 -0
  98. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/arrays_in_groups_missing_zarr_json.zarr/foo/bar/zarr.json +0 -0
  99. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/arrays_in_groups_missing_zarr_json.zarr/foo/zarr.json +0 -0
  100. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/arrays_in_groups_missing_zarr_json.zarr/foo1/bar1/z1/zarr.json +0 -0
  101. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/arrays_in_groups_missing_zarr_json.zarr/foo1/bar1/zarr.json +0 -0
  102. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/arrays_in_groups_missing_zarr_json.zarr/foo1/zarr.json +0 -0
  103. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/arrays_in_groups_node_type_problem.zarr/foo/bar/z/zarr.json +0 -0
  104. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/arrays_in_groups_node_type_problem.zarr/foo/bar/zarr.json +0 -0
  105. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/arrays_in_groups_node_type_problem.zarr/foo/zarr.json +0 -0
  106. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/arrays_in_groups_node_type_problem.zarr/foo1/bar1/z1/zarr.json +0 -0
  107. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/arrays_in_groups_node_type_problem.zarr/foo1/bar1/zarr.json +0 -0
  108. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/arrays_in_groups_node_type_problem.zarr/foo1/zarr.json +0 -0
  109. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/arrays_in_groups_node_type_problem.zarr/zarr.json +0 -0
  110. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/single_array_missing_zarr_json.zarr/c/0/0 +0 -0
  111. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/single_array_missing_zarr_json.zarr/c/0/1 +0 -0
  112. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/single_array_missing_zarr_json.zarr/c/1/0 +0 -0
  113. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/single_array_missing_zarr_json.zarr/c/1/1 +0 -0
  114. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/single_array_node_type_problem.zarr/c/0/0 +0 -0
  115. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/single_array_node_type_problem.zarr/c/0/1 +0 -0
  116. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/single_array_node_type_problem.zarr/c/1/0 +0 -0
  117. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/single_array_node_type_problem.zarr/c/1/1 +0 -0
  118. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/invalid_stores/single_array_node_type_problem.zarr/zarr.json +0 -0
  119. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/valid_stores/arrays_in_groups.zarr/foo/bar/z/zarr.json +0 -0
  120. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/valid_stores/arrays_in_groups.zarr/foo/bar/zarr.json +0 -0
  121. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/valid_stores/arrays_in_groups.zarr/foo/zarr.json +0 -0
  122. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/valid_stores/arrays_in_groups.zarr/foo1/bar1/z1/zarr.json +0 -0
  123. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/valid_stores/arrays_in_groups.zarr/foo1/bar1/zarr.json +0 -0
  124. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/valid_stores/arrays_in_groups.zarr/foo1/zarr.json +0 -0
  125. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/valid_stores/arrays_in_groups.zarr/zarr.json +0 -0
  126. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/valid_stores/single_array.zarr/c/0/0 +0 -0
  127. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/valid_stores/single_array.zarr/c/0/1 +0 -0
  128. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/valid_stores/single_array.zarr/c/1/0 +0 -0
  129. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/valid_stores/single_array.zarr/c/1/1 +0 -0
  130. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/data/zarr3_stores/valid_stores/single_array.zarr/zarr.json +0 -0
  131. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/skip.py +0 -0
  132. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/test_bids_validator_deno/test_validator.py +0 -0
  133. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/test_dandiapi.py +0 -0
  134. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/test_dandiarchive.py +0 -0
  135. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/test_dandiset.py +0 -0
  136. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/test_delete.py +0 -0
  137. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/test_files.py +0 -0
  138. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/test_fixtures.py +0 -0
  139. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/test_helpers.py +0 -0
  140. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/test_helptext.py +0 -0
  141. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/test_keyring.py +0 -0
  142. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/test_metadata.py +0 -0
  143. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/test_move.py +0 -0
  144. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/test_organize.py +0 -0
  145. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/test_pynwb_utils.py +0 -0
  146. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/test_upload.py +0 -0
  147. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/test_utils.py +0 -0
  148. {dandi-0.76.4 → dandi-0.76.6}/dandi/tests/xfail.py +0 -0
  149. {dandi-0.76.4 → dandi-0.76.6}/dandi/upload.py +0 -0
  150. {dandi-0.76.4 → dandi-0.76.6}/dandi/utils.py +0 -0
  151. {dandi-0.76.4 → dandi-0.76.6}/dandi/validate/__init__.py +0 -0
  152. {dandi-0.76.4 → dandi-0.76.6}/dandi/validate/_core.py +0 -0
  153. {dandi-0.76.4 → dandi-0.76.6}/dandi/validate/_io.py +0 -0
  154. {dandi-0.76.4 → dandi-0.76.6}/dandi/validate/_types.py +0 -0
  155. {dandi-0.76.4 → dandi-0.76.6}/dandi/validate/tests/__init__.py +0 -0
  156. {dandi-0.76.4 → dandi-0.76.6}/dandi/validate/tests/test_core.py +0 -0
  157. {dandi-0.76.4 → dandi-0.76.6}/dandi/validate/tests/test_io.py +0 -0
  158. {dandi-0.76.4 → dandi-0.76.6}/dandi/validate/tests/test_types.py +0 -0
  159. {dandi-0.76.4 → dandi-0.76.6}/dandi.egg-info/dependency_links.txt +0 -0
  160. {dandi-0.76.4 → dandi-0.76.6}/dandi.egg-info/entry_points.txt +0 -0
  161. {dandi-0.76.4 → dandi-0.76.6}/dandi.egg-info/not-zip-safe +0 -0
  162. {dandi-0.76.4 → dandi-0.76.6}/dandi.egg-info/top_level.txt +0 -0
  163. {dandi-0.76.4 → dandi-0.76.6}/setup.cfg +0 -0
  164. {dandi-0.76.4 → dandi-0.76.6}/setup.py +0 -0
  165. {dandi-0.76.4 → dandi-0.76.6}/tox.ini +0 -0
  166. {dandi-0.76.4 → dandi-0.76.6}/versioneer.py +0 -0
@@ -1,3 +1,38 @@
1
+ # 0.76.6 (Tue Jul 07 2026)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - New EMBER-DANDI sandbox frontend url [#1885](https://github.com/dandi/dandi-cli/pull/1885) ([@NEStock](https://github.com/NEStock))
6
+
7
+ #### Authors: 1
8
+
9
+ - Nicole Tregoning ([@NEStock](https://github.com/NEStock))
10
+
11
+ ---
12
+
13
+ # 0.76.5 (Thu Jul 02 2026)
14
+
15
+ #### 🐛 Bug Fix
16
+
17
+ - Support click >= 8.2.0 [#1883](https://github.com/dandi/dandi-cli/pull/1883) ([@rly](https://github.com/rly) [@yarikoptic](https://github.com/yarikoptic))
18
+ - Only emit "deleting extra files" status when cleanup is needed [#1881](https://github.com/dandi/dandi-cli/pull/1881) ([@claude](https://github.com/claude) [@CodyCBakerPhD](https://github.com/CodyCBakerPhD))
19
+ - Fix dev-deps CI failures: detect pynwb num_samples support via __docval__ [#1882](https://github.com/dandi/dandi-cli/pull/1882) ([@claude](https://github.com/claude) [@CodyCBakerPhD](https://github.com/CodyCBakerPhD))
20
+
21
+ #### 🏠 Internal
22
+
23
+ - [gh-actions](deps): Bump actions/checkout from 6 to 7 [#1880](https://github.com/dandi/dandi-cli/pull/1880) ([@dependabot[bot]](https://github.com/dependabot[bot]) [@CodyCBakerPhD](https://github.com/CodyCBakerPhD))
24
+ - [gh-actions](deps): Bump codecov/codecov-action from 6 to 7 [#1879](https://github.com/dandi/dandi-cli/pull/1879) ([@dependabot[bot]](https://github.com/dependabot[bot]))
25
+
26
+ #### Authors: 5
27
+
28
+ - [@dependabot[bot]](https://github.com/dependabot[bot])
29
+ - Claude ([@claude](https://github.com/claude))
30
+ - Cody Baker ([@CodyCBakerPhD](https://github.com/CodyCBakerPhD))
31
+ - Ryan Ly ([@rly](https://github.com/rly))
32
+ - Yaroslav Halchenko ([@yarikoptic](https://github.com/yarikoptic))
33
+
34
+ ---
35
+
1
36
  # 0.76.4 (Fri Jun 05 2026)
2
37
 
3
38
  #### 🐛 Bug Fix
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dandi
3
- Version: 0.76.4
3
+ Version: 0.76.6
4
4
  Summary: Command line client for interaction with DANDI instances
5
5
  Author-email: DANDI developers <team@dandiarchive.org>
6
6
  Maintainer-email: DANDI developers <team@dandiarchive.org>
@@ -227,7 +227,7 @@ Description-Content-Type: text/markdown
227
227
  License-File: LICENSE
228
228
  Requires-Dist: bidsschematools~=1.0
229
229
  Requires-Dist: bids-validator-deno>=2.0.5
230
- Requires-Dist: click<8.2.0,>=7.1
230
+ Requires-Dist: click>=7.1
231
231
  Requires-Dist: click-didyoumean
232
232
  Requires-Dist: dandischema~=0.12.0
233
233
  Requires-Dist: etelemetry>=0.2.2
@@ -8,11 +8,11 @@ import json
8
8
 
9
9
  version_json = '''
10
10
  {
11
- "date": "2026-06-05T02:20:58+0000",
11
+ "date": "2026-07-07T13:52:19+0000",
12
12
  "dirty": false,
13
13
  "error": null,
14
- "full-revisionid": "3a9f0227a87b964a7d9fe4708712e0fb5265a497",
15
- "version": "0.76.4"
14
+ "full-revisionid": "3f2b6d17910d3e43535355c8bd23480f61caf486",
15
+ "version": "0.76.6"
16
16
  }
17
17
  ''' # END VERSION_JSON
18
18
 
@@ -1,3 +1,4 @@
1
+ from enum import Enum
1
2
  from functools import wraps
2
3
  import os
3
4
 
@@ -29,6 +30,24 @@ class IntColonInt(click.ParamType):
29
30
  return "N[:M]"
30
31
 
31
32
 
33
+ class EnumChoice(click.Choice):
34
+ """A ``click.Choice`` over a ``str``-valued ``Enum``, matched on member values.
35
+
36
+ The available choices presented on the command line are the enum member
37
+ values (e.g. ``error``, ``skip``), and ``convert`` returns the corresponding
38
+ enum member. A string default is converted to its member as well.
39
+ """
40
+
41
+ def __init__(self, enum_cls: type[Enum], case_sensitive: bool = True) -> None:
42
+ self.enum_cls = enum_cls
43
+ super().__init__([e.value for e in enum_cls], case_sensitive=case_sensitive)
44
+
45
+ def convert(self, value, param, ctx):
46
+ if value is None or isinstance(value, self.enum_cls):
47
+ return value
48
+ return self.enum_cls(super().convert(value, param, ctx))
49
+
50
+
32
51
  class ChoiceList(click.ParamType):
33
52
  name = "choice-list"
34
53
 
@@ -5,7 +5,13 @@ import os
5
5
 
6
6
  import click
7
7
 
8
- from .base import ChoiceList, IntColonInt, instance_option, map_to_click_exceptions
8
+ from .base import (
9
+ ChoiceList,
10
+ EnumChoice,
11
+ IntColonInt,
12
+ instance_option,
13
+ map_to_click_exceptions,
14
+ )
9
15
  from ..consts import SyncMode
10
16
  from ..dandiarchive import _dandi_url_parser, parse_dandi_url
11
17
  from ..dandiset import Dandiset
@@ -63,7 +69,7 @@ Download files or entire folders from DANDI.
63
69
  @click.option(
64
70
  "-e",
65
71
  "--existing",
66
- type=click.Choice(list(DownloadExisting)),
72
+ type=EnumChoice(DownloadExisting),
67
73
  # TODO: verify-reupload (to become default)
68
74
  help="How to handle paths that already exist locally. "
69
75
  "For 'error', if the local file exists, display an error and skip downloading that asset. "
@@ -80,12 +86,12 @@ Download files or entire folders from DANDI.
80
86
  "-f",
81
87
  "--format",
82
88
  help="Choose the format/frontend for output. TODO: support all of the ls",
83
- type=click.Choice(list(DownloadFormat)),
89
+ type=EnumChoice(DownloadFormat),
84
90
  default="pyout",
85
91
  )
86
92
  @click.option(
87
93
  "--path-type",
88
- type=click.Choice(list(PathType)),
94
+ type=EnumChoice(PathType),
89
95
  default="exact",
90
96
  help="Whether to interpret asset paths in URLs as exact matches or glob patterns",
91
97
  show_default=True,
@@ -121,7 +127,7 @@ Download files or entire folders from DANDI.
121
127
  is_flag=False,
122
128
  flag_value="ask",
123
129
  default=None,
124
- type=click.Choice(list(SyncMode)),
130
+ type=EnumChoice(SyncMode),
125
131
  help="Delete local assets that do not exist on the server. "
126
132
  "With 'ask' (the default when --sync is passed without a value), prompt before "
127
133
  "deleting. With 'do', delete without prompting.",
@@ -2,7 +2,12 @@ from __future__ import annotations
2
2
 
3
3
  import click
4
4
 
5
- from .base import devel_debug_option, instance_option, map_to_click_exceptions
5
+ from .base import (
6
+ EnumChoice,
7
+ devel_debug_option,
8
+ instance_option,
9
+ map_to_click_exceptions,
10
+ )
6
11
  from ..move import MoveExisting, MoveWorkOn
7
12
 
8
13
 
@@ -16,7 +21,7 @@ from ..move import MoveExisting, MoveWorkOn
16
21
  @click.option(
17
22
  "-e",
18
23
  "--existing",
19
- type=click.Choice(list(MoveExisting)),
24
+ type=EnumChoice(MoveExisting),
20
25
  default="error",
21
26
  help="How to handle assets that would be moved to a destination that already exists",
22
27
  show_default=True,
@@ -30,7 +35,7 @@ from ..move import MoveExisting, MoveWorkOn
30
35
  @click.option(
31
36
  "-w",
32
37
  "--work-on",
33
- type=click.Choice(list(MoveWorkOn)),
38
+ type=EnumChoice(MoveWorkOn),
34
39
  default="auto",
35
40
  help=(
36
41
  "Whether to operate on the local Dandiset, remote Dandiset, or both;"
@@ -2,7 +2,12 @@ from __future__ import annotations
2
2
 
3
3
  import click
4
4
 
5
- from .base import dandiset_path_option, devel_debug_option, map_to_click_exceptions
5
+ from .base import (
6
+ EnumChoice,
7
+ dandiset_path_option,
8
+ devel_debug_option,
9
+ map_to_click_exceptions,
10
+ )
6
11
  from ..consts import dandi_layout_fields
7
12
  from ..organize import CopyMode, FileOperationMode, OrganizeInvalid
8
13
 
@@ -17,7 +22,7 @@ from ..organize import CopyMode, FileOperationMode, OrganizeInvalid
17
22
  @click.option(
18
23
  "--invalid",
19
24
  help="What to do if files without sufficient metadata are encountered.",
20
- type=click.Choice(list(OrganizeInvalid)),
25
+ type=EnumChoice(OrganizeInvalid),
21
26
  default="fail",
22
27
  show_default=True,
23
28
  )
@@ -30,7 +35,7 @@ from ..organize import CopyMode, FileOperationMode, OrganizeInvalid
30
35
  "If 'auto' - whichever of symlink, hardlink, copy is allowed by system. "
31
36
  "The other modes (copy, move, symlink, hardlink) define how data files "
32
37
  "should be made available.",
33
- type=click.Choice(list(FileOperationMode)),
38
+ type=EnumChoice(FileOperationMode),
34
39
  default="auto",
35
40
  show_default=True,
36
41
  )
@@ -45,7 +50,7 @@ from ..organize import CopyMode, FileOperationMode, OrganizeInvalid
45
50
  )
46
51
  @click.option(
47
52
  "--media-files-mode",
48
- type=click.Choice(list(CopyMode)),
53
+ type=EnumChoice(CopyMode),
49
54
  default=None,
50
55
  help="How to relocate video files referenced by NWB files",
51
56
  )
@@ -3,6 +3,7 @@ from __future__ import annotations
3
3
  import click
4
4
 
5
5
  from .base import (
6
+ EnumChoice,
6
7
  IntColonInt,
7
8
  devel_debug_option,
8
9
  devel_option,
@@ -17,7 +18,7 @@ from ..upload import UploadExisting, UploadValidation
17
18
  @click.option(
18
19
  "-e",
19
20
  "--existing",
20
- type=click.Choice(list(UploadExisting)),
21
+ type=EnumChoice(UploadExisting),
21
22
  help="What to do if a file found existing on the server. 'skip' would skip"
22
23
  "the file, 'force' - force reupload, 'overwrite' - force upload if "
23
24
  "either size or modification time differs; 'refresh' - upload only if "
@@ -40,7 +41,7 @@ from ..upload import UploadExisting, UploadValidation
40
41
  is_flag=False,
41
42
  flag_value="ask",
42
43
  default=None,
43
- type=click.Choice(list(SyncMode)),
44
+ type=EnumChoice(SyncMode),
44
45
  help="Delete assets on the server that do not exist locally. "
45
46
  "With 'ask' (the default when --sync is passed without a value), prompt before "
46
47
  "deleting. With 'do', delete without prompting.",
@@ -52,7 +53,7 @@ from ..upload import UploadExisting, UploadValidation
52
53
  "'require' - data must pass validation before upload; "
53
54
  "'skip' - no validation is performed on data before upload; "
54
55
  "'ignore' - data is validated but upload proceeds regardless of validation results.",
55
- type=click.Choice(list(UploadValidation)),
56
+ type=EnumChoice(UploadValidation),
56
57
  default="require",
57
58
  show_default=True,
58
59
  )
@@ -0,0 +1,74 @@
1
+ from enum import Enum
2
+
3
+ import click
4
+ from click.testing import CliRunner
5
+ import pytest
6
+
7
+ from ..base import EnumChoice
8
+
9
+
10
+ class _Existing(str, Enum):
11
+ ERROR = "error"
12
+ SKIP = "skip"
13
+ OVERWRITE = "overwrite-different"
14
+
15
+ def __str__(self) -> str:
16
+ return self.value
17
+
18
+
19
+ def _make_command(**option_kwargs):
20
+ @click.command()
21
+ @click.option("--existing", type=EnumChoice(_Existing), **option_kwargs)
22
+ def cmd(existing):
23
+ click.echo(f"{type(existing).__name__}:{existing!r}")
24
+
25
+ return cmd
26
+
27
+
28
+ @pytest.mark.ai_generated
29
+ def test_enum_choice_accepts_member_value():
30
+ captured = {}
31
+
32
+ @click.command()
33
+ @click.option("--existing", type=EnumChoice(_Existing), default="error")
34
+ def cmd(existing):
35
+ captured["existing"] = existing
36
+
37
+ r = CliRunner().invoke(cmd, ["--existing", "overwrite-different"])
38
+ assert r.exit_code == 0, r.output
39
+ assert captured["existing"] is _Existing.OVERWRITE
40
+
41
+
42
+ @pytest.mark.ai_generated
43
+ def test_enum_choice_rejects_member_name():
44
+ r = CliRunner().invoke(_make_command(default="error"), ["--existing", "SKIP"])
45
+ assert r.exit_code != 0
46
+ assert "'SKIP' is not one of" in r.output
47
+
48
+
49
+ @pytest.mark.ai_generated
50
+ def test_enum_choice_none_default_passes_through():
51
+ captured = {}
52
+
53
+ @click.command()
54
+ @click.option("--existing", type=EnumChoice(_Existing), default=None)
55
+ def cmd(existing):
56
+ captured["existing"] = existing
57
+
58
+ r = CliRunner().invoke(cmd, [])
59
+ assert r.exit_code == 0, r.output
60
+ assert captured["existing"] is None
61
+
62
+
63
+ @pytest.mark.ai_generated
64
+ def test_enum_choice_string_default_converted_to_member():
65
+ captured = {}
66
+
67
+ @click.command()
68
+ @click.option("--existing", type=EnumChoice(_Existing), default="skip")
69
+ def cmd(existing):
70
+ captured["existing"] = existing
71
+
72
+ r = CliRunner().invoke(cmd, [])
73
+ assert r.exit_code == 0, r.output
74
+ assert captured["existing"] is _Existing.SKIP
@@ -24,7 +24,7 @@ def test_cmd_instances(monkeypatch):
24
24
  " gui: https://dandi.emberarchive.org\n"
25
25
  "ember-dandi-sandbox:\n"
26
26
  " api: https://api-dandi.sandbox.emberarchive.org/api\n"
27
- " gui: https://apl-setup--ember-dandi-archive.netlify.app\n"
27
+ " gui: https://dandi.sandbox.emberarchive.org\n"
28
28
  "linc:\n"
29
29
  " api: https://api.lincbrain.org/api\n"
30
30
  " gui: https://lincbrain.org\n"
@@ -167,7 +167,7 @@ known_instances = {
167
167
  ),
168
168
  "ember-dandi-sandbox": DandiInstance(
169
169
  "ember-dandi-sandbox",
170
- "https://apl-setup--ember-dandi-archive.netlify.app",
170
+ "https://dandi.sandbox.emberarchive.org",
171
171
  "https://api-dandi.sandbox.emberarchive.org/api",
172
172
  ),
173
173
  }
@@ -1051,11 +1051,12 @@ def _download_zarr(
1051
1051
  else:
1052
1052
  return
1053
1053
 
1054
- yield {"status": "deleting extra files"}
1055
1054
  remote_paths = set(map(str, entries))
1056
1055
  zarr_basepath = Path(download_path)
1057
- dirs = deque([zarr_basepath])
1056
+
1057
+ announced: bool = False
1058
1058
  empty_dirs: deque[Path] = deque()
1059
+ dirs: deque[Path] = deque([zarr_basepath])
1059
1060
  while dirs:
1060
1061
  d = dirs.popleft()
1061
1062
  is_empty = True
@@ -1066,7 +1067,11 @@ def _download_zarr(
1066
1067
  p.is_file()
1067
1068
  and p.relative_to(zarr_basepath).as_posix() not in remote_paths
1068
1069
  ):
1070
+ if not announced:
1071
+ announced = True
1072
+ yield {"status": "deleting extra files"}
1069
1073
  try:
1074
+ lgr.debug("Deleting extra Zarr file %s", p)
1070
1075
  p.unlink()
1071
1076
  except OSError:
1072
1077
  is_empty = False
@@ -1079,6 +1084,10 @@ def _download_zarr(
1079
1084
  empty_dirs.append(d)
1080
1085
  while empty_dirs:
1081
1086
  d = empty_dirs.popleft()
1087
+ if not announced:
1088
+ announced = True
1089
+ yield {"status": "deleting extra files"}
1090
+ lgr.debug("Removing now-empty Zarr directory %s", d)
1082
1091
  d.rmdir()
1083
1092
  if d.parent != zarr_basepath and not any(d.parent.iterdir()):
1084
1093
  empty_dirs.append(d.parent)
@@ -42,6 +42,11 @@ from ..upload import upload
42
42
 
43
43
  lgr = get_logger()
44
44
 
45
+ # TODO: simply always inject this when minimal supported pynwb is above 3.1.3
46
+ _imgseries_takes_num_samples = any(
47
+ arg["name"] == "num_samples"
48
+ for arg in getattr(ImageSeries.__init__, "__docval__", {}).get("args", [])
49
+ )
45
50
 
46
51
  BIDS_TESTDATA_SELECTION = [
47
52
  "asl003",
@@ -812,7 +817,7 @@ def _create_nwb_files(video_list: list[tuple[Path, Path]]) -> Path:
812
817
  devices=[device],
813
818
  )
814
819
 
815
- image_series = ImageSeries(
820
+ imgseries_kwargs: dict[str, Any] = dict(
816
821
  name=f"MouseWhiskers{i}",
817
822
  format="external",
818
823
  external_file=[str(vid_1), str(vid_2)],
@@ -820,6 +825,9 @@ def _create_nwb_files(video_list: list[tuple[Path, Path]]) -> Path:
820
825
  starting_time=0.0,
821
826
  rate=150.0,
822
827
  )
828
+ if _imgseries_takes_num_samples:
829
+ imgseries_kwargs["num_samples"] = 4
830
+ image_series = ImageSeries(**imgseries_kwargs)
823
831
  nwbfile.add_acquisition(image_series)
824
832
 
825
833
  nwbfile_path = base_nwb_path / f"{name}.nwb"
@@ -456,6 +456,73 @@ def test_download_zarr(tmp_path: Path, zarr_dandiset: SampleDandiset) -> None:
456
456
  )
457
457
 
458
458
 
459
+ def _zarr_download_statuses(
460
+ dandiset: SampleDandiset,
461
+ output_dir: Path,
462
+ existing: DownloadExisting = DownloadExisting.ERROR,
463
+ ) -> list[dict]:
464
+ return list(
465
+ Downloader(
466
+ url=DandisetURL(
467
+ instance=dandiset.api.instance,
468
+ dandiset_id=dandiset.dandiset.identifier,
469
+ version_id=dandiset.dandiset.version_id,
470
+ ),
471
+ output_dir=output_dir,
472
+ existing=existing,
473
+ get_metadata=True,
474
+ get_assets=True,
475
+ preserve_tree=False,
476
+ jobs_per_zarr=None,
477
+ on_error="raise",
478
+ ).download_generator()
479
+ )
480
+
481
+
482
+ @pytest.mark.ai_generated
483
+ def test_download_zarr_clean_no_deleting_status(
484
+ tmp_path: Path, zarr_dandiset: SampleDandiset
485
+ ) -> None:
486
+ # On a fresh, first-time download every local file corresponds to a remote
487
+ # entry, so nothing is deleted and the "deleting extra files" status must
488
+ # not be emitted.
489
+ statuses = _zarr_download_statuses(zarr_dandiset, tmp_path)
490
+ assert not any(s.get("status") == "deleting extra files" for s in statuses)
491
+ assert_dirtrees_eq(
492
+ zarr_dandiset.dspath / "sample.zarr",
493
+ tmp_path / zarr_dandiset.dandiset_id / "sample.zarr",
494
+ )
495
+
496
+
497
+ @pytest.mark.ai_generated
498
+ def test_download_zarr_deletes_orphan_files(
499
+ tmp_path: Path, zarr_dandiset: SampleDandiset
500
+ ) -> None:
501
+ # First download cleanly.
502
+ download(zarr_dandiset.dandiset.version_api_url, tmp_path)
503
+ zarr_root = tmp_path / zarr_dandiset.dandiset_id / "sample.zarr"
504
+ # Introduce orphaned local files (and a now-extra subdirectory) that do not
505
+ # correspond to any remote Zarr entry.
506
+ orphan_file = zarr_root / "orphan.bin"
507
+ orphan_file.write_bytes(b"not a real zarr entry")
508
+ orphan_dir = zarr_root / "orphan_dir"
509
+ orphan_dir.mkdir()
510
+ (orphan_dir / "nested_orphan.bin").write_bytes(b"also extra")
511
+ assert orphan_file.exists()
512
+ assert orphan_dir.exists()
513
+ # Re-download: cleanup must remove the orphans and announce it.
514
+ statuses = _zarr_download_statuses(
515
+ zarr_dandiset, tmp_path, existing=DownloadExisting.OVERWRITE
516
+ )
517
+ assert any(s.get("status") == "deleting extra files" for s in statuses)
518
+ assert not orphan_file.exists()
519
+ assert not orphan_dir.exists()
520
+ assert_dirtrees_eq(
521
+ zarr_dandiset.dspath / "sample.zarr",
522
+ zarr_root,
523
+ )
524
+
525
+
459
526
  def test_download_different_zarr(tmp_path: Path, zarr_dandiset: SampleDandiset) -> None:
460
527
  dd = tmp_path / zarr_dandiset.dandiset_id
461
528
  dd.mkdir()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dandi
3
- Version: 0.76.4
3
+ Version: 0.76.6
4
4
  Summary: Command line client for interaction with DANDI instances
5
5
  Author-email: DANDI developers <team@dandiarchive.org>
6
6
  Maintainer-email: DANDI developers <team@dandiarchive.org>
@@ -227,7 +227,7 @@ Description-Content-Type: text/markdown
227
227
  License-File: LICENSE
228
228
  Requires-Dist: bidsschematools~=1.0
229
229
  Requires-Dist: bids-validator-deno>=2.0.5
230
- Requires-Dist: click<8.2.0,>=7.1
230
+ Requires-Dist: click>=7.1
231
231
  Requires-Dist: click-didyoumean
232
232
  Requires-Dist: dandischema~=0.12.0
233
233
  Requires-Dist: etelemetry>=0.2.2
@@ -51,6 +51,7 @@ dandi/cli/cmd_validate.py
51
51
  dandi/cli/command.py
52
52
  dandi/cli/formatter.py
53
53
  dandi/cli/tests/__init__.py
54
+ dandi/cli/tests/test_base.py
54
55
  dandi/cli/tests/test_cmd_ls.py
55
56
  dandi/cli/tests/test_cmd_validate.py
56
57
  dandi/cli/tests/test_command.py
@@ -1,6 +1,6 @@
1
1
  bidsschematools~=1.0
2
2
  bids-validator-deno>=2.0.5
3
- click<8.2.0,>=7.1
3
+ click>=7.1
4
4
  click-didyoumean
5
5
  dandischema~=0.12.0
6
6
  etelemetry>=0.2.2
@@ -46,8 +46,7 @@ classifiers = [
46
46
  dependencies = [
47
47
  "bidsschematools ~= 1.0",
48
48
  "bids-validator-deno >= 2.0.5",
49
- # >=8.2.0: https://github.com/pallets/click/issues/2911
50
- "click >= 7.1, <8.2.0",
49
+ "click >= 7.1",
51
50
  "click-didyoumean",
52
51
  "dandischema ~= 0.12.0",
53
52
  "etelemetry >= 0.2.2",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes