Skip to content

Commit c2d4457

Browse files
authored
Merge pull request #1934 from dandi/claude/docs-cli-options-sync
Update docs: bring the command-line reference in sync with the CLI
2 parents c3931cc + b294fc9 commit c2d4457

5 files changed

Lines changed: 132 additions & 7 deletions

File tree

‎docs/source/cmdline/download.rst‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,23 @@ Options
6565
.. option:: --sync
6666

6767
Delete local assets that do not exist on the server after downloading
68+
69+
.. option:: --zarr FILTER
70+
71+
Only download the entries of Zarr assets that match the given filter. The
72+
filter is either the predefined name ``metadata``, which selects the Zarr
73+
metadata files (``.zarray``, ``.zattrs``, ``.zgroup``, ``.zmetadata``, and
74+
``zarr.json``), or ``TYPE:PATTERN``, where ``TYPE`` is one of:
75+
76+
- ``glob`` — ``PATTERN`` is a glob matched against the entry's path within
77+
the Zarr, with ``**`` matching across directories (e.g.,
78+
``glob:0/**/*``)
79+
80+
- ``path`` — ``PATTERN`` is a path within the Zarr; the entry at that path
81+
and all entries under it are downloaded
82+
83+
- ``regex`` — ``PATTERN`` is a regular expression searched for in the
84+
entry's path within the Zarr
85+
86+
Can be specified multiple times, in which case an entry is downloaded if it
87+
matches any of the filters.

‎docs/source/cmdline/organize.rst‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ Options
6565
What to do if files without sufficient metadata are encountered [default:
6666
``fail``]
6767

68+
.. option:: -J, --jobs N
69+
70+
Number of parallel jobs to use while organizing, e.g., for extracting the
71+
metadata from the files [default: one per CPU core]
72+
6873
.. option:: --media-files-mode [copy|move|symlink|hardlink]
6974

7075
How to relocate video files referenced by NWB files [default: ``symlink``]

‎docs/source/cmdline/upload.rst‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,15 @@ Options
6060
Data should pass validation before uploading. Use of this option is highly
6161
discouraged.
6262

63+
.. option:: --zarr-mode [full|patch]
64+
65+
How to synchronize Zarr assets with the server:
66+
67+
- ``full`` [default] — make the Zarr on the server identical to the local
68+
one, deleting entries on the server that do not exist locally
69+
- ``patch`` — upload new and changed entries only, without deleting
70+
anything on the server
71+
6372

6473
Development Options
6574
-------------------
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
:program:`dandi validate-bids`
2+
==============================
3+
4+
::
5+
6+
dandi [<global options>] validate-bids [<options>] [<path> ...]
7+
8+
Validate BIDS paths.
9+
10+
.. note::
11+
12+
This command is deprecated: :ref:`dandi validate <dandi_validate>`
13+
validates BIDS datasets along with everything else and should be used
14+
instead. ``dandi validate-bids`` now merely invokes it with the given
15+
paths and :option:`--grouping` (after emitting a deprecation warning).
16+
17+
Options
18+
-------
19+
20+
.. option:: -g, --grouping [none|path]
21+
22+
How to group the reported results [default: ``none``]
23+
24+
.. option:: --report-path <path>
25+
26+
Accepted for backwards compatibility but ignored
27+
28+
.. option:: -r, --report
29+
30+
Accepted for backwards compatibility but ignored
31+
32+
.. option:: --schema VERSION
33+
34+
Accepted for backwards compatibility but ignored

‎docs/source/cmdline/validate.rst‎

Lines changed: 64 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,87 @@
1+
.. _dandi_validate:
2+
13
:program:`dandi validate`
24
=========================
35

46
::
57

6-
dandi [<global options>] validate [<path> ...]
8+
dandi [<global options>] validate [<options>] [<path> ...]
79

810
Validate files for data standards compliance.
911

1012
Exits with non-zero exit code if any file is not compliant.
1113

14+
The validation results are automatically saved as a JSON Lines companion file
15+
next to the dandi-cli log file (unless :option:`--output` is used or
16+
:option:`--load` is active). Use :option:`--load` to re-render saved results
17+
later with different grouping, filtering, or format options.
18+
1219
Options
1320
-------
1421

15-
.. option:: -g, --grouping [none|path]
22+
.. option:: -g, --grouping [none|path|severity|id|validator|standard|dandiset]
1623

17-
Set how to group reported errors & warnings: by path or not at all
18-
(default)
24+
How to group the reported results. Repeat the option for hierarchical
25+
nesting, e.g., ``-g severity -g id``. [default: ``none``]
1926

2027
.. option:: --ignore REGEX
2128

22-
Ignore any validation errors & warnings whose ID matches the given regular
29+
Ignore any validation results whose ID matches the given regular
2330
expression
2431

25-
.. option:: --min-severity [HINT|WARNING|ERROR]
32+
.. option:: --min-severity [INFO|HINT|WARNING|ERROR|CRITICAL]
33+
34+
Only display results with severities at or above this level [default:
35+
``HINT``]
36+
37+
.. option:: -f, --format [text|json|json_pp|json_lines|yaml]
38+
39+
Output format [default: ``text``]
40+
41+
.. option:: -o, --output <file>
42+
43+
Write the output to the given file instead of standard output. This
44+
requires a structured :option:`--format`; if none is given, the format is
45+
inferred from the file's extension (``.json``, ``.jsonl``, ``.yaml``, or
46+
``.yml``). :option:`--grouping` cannot be combined with the ``json_lines``
47+
format.
48+
49+
.. option:: --summary, --no-summary
50+
51+
Whether to show summary statistics (counts of results by severity,
52+
validator, and standard) after the results [default: ``--no-summary``]
53+
54+
.. option:: --max-per-group N
55+
56+
Limit the number of results shown per group (or in total when not
57+
grouping); the excess is replaced by a count of omitted results
58+
59+
.. option:: --missing-file-content [error|only-non-data|skip]
60+
61+
How to handle files whose content is unavailable, such as the broken
62+
symbolic links of a DataLad_ dataset (a git-annex_ repository) whose
63+
content has not been fetched:
64+
65+
``error``
66+
Emit a concise ``DANDI.FILE_CONTENT_MISSING`` error for each such file
67+
(default)
68+
69+
``skip``
70+
Skip each such file, emitting a warning
71+
72+
``only-non-data``
73+
Skip content-dependent validators (pynwb, nwbinspector, ...) for each
74+
such file but still validate its path layout
75+
76+
.. option:: --load <file>
77+
78+
Instead of running validation, load previously saved results from the
79+
given JSON Lines file (e.g., an automatically saved companion file) and
80+
render them. Can be specified multiple times; cannot be combined with
81+
paths.
2682

27-
Only display issues with severities above this level (HINT by default)
83+
.. _DataLad: https://www.datalad.org
84+
.. _git-annex: https://git-annex.branchable.com
2885

2986

3087
Development Options

0 commit comments

Comments
 (0)