datatrail-cli 1.0.1__tar.gz → 1.0.2__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 (76) hide show
  1. datatrail_cli-1.0.2/.release-please-manifest.json +3 -0
  2. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/CHANGELOG.md +8 -0
  3. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/PKG-INFO +17 -1
  4. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/README.md +16 -0
  5. datatrail_cli-1.0.2/docs/commands.md +34 -0
  6. datatrail_cli-1.0.2/docs/discovery.md +73 -0
  7. datatrail_cli-1.0.2/docs/doctor.md +55 -0
  8. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/docs/index.md +5 -1
  9. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/docs/initialising.md +20 -8
  10. datatrail_cli-1.0.2/docs/user_guide.md +58 -0
  11. datatrail_cli-1.0.2/docs/verify.md +66 -0
  12. datatrail_cli-1.0.2/mkdocs-site.yml +37 -0
  13. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/mkdocs.yml +4 -1
  14. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/pyproject.toml +1 -1
  15. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/uv.lock +1 -1
  16. datatrail_cli-1.0.1/.release-please-manifest.json +0 -3
  17. datatrail_cli-1.0.1/docs/commands.md +0 -30
  18. datatrail_cli-1.0.1/docs/user_guide.md +0 -33
  19. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  20. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  21. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  22. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/.github/workflows/codeql.yml +0 -0
  23. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/.github/workflows/continuous-deployment.yml +0 -0
  24. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/.github/workflows/continuous-integration.yml +0 -0
  25. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/.github/workflows/docs.yml +0 -0
  26. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/.github/workflows/stale.yml +0 -0
  27. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/.gitignore +0 -0
  28. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/.pre-commit-config.yaml +0 -0
  29. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/LICENSE +0 -0
  30. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/docs/clear.md +0 -0
  31. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/docs/cli.md +0 -0
  32. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/docs/images/Datatrail-logo.png +0 -0
  33. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/docs/install.md +0 -0
  34. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/docs/inventory.md +0 -0
  35. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/docs/list.md +0 -0
  36. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/docs/ps.md +0 -0
  37. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/docs/pull-manifest.md +0 -0
  38. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/docs/pull.md +0 -0
  39. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/docs/scout.md +0 -0
  40. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/docs/unregistered.md +0 -0
  41. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/dtcli/__init__.py +0 -0
  42. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/dtcli/clear.py +0 -0
  43. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/dtcli/cli.py +0 -0
  44. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/dtcli/config.py +0 -0
  45. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/dtcli/config.yaml +0 -0
  46. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/dtcli/doctor.py +0 -0
  47. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/dtcli/inventory.py +0 -0
  48. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/dtcli/locking.py +0 -0
  49. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/dtcli/ls.py +0 -0
  50. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/dtcli/ps.py +0 -0
  51. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/dtcli/pull.py +0 -0
  52. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/dtcli/pull_manifest.py +0 -0
  53. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/dtcli/scout.py +0 -0
  54. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/dtcli/src/functions.py +0 -0
  55. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/dtcli/unregistered.py +0 -0
  56. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/dtcli/utilities/cadcclient.py +0 -0
  57. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/dtcli/utilities/results.py +0 -0
  58. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/dtcli/utilities/utilities.py +0 -0
  59. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/dtcli/verify.py +0 -0
  60. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/release-please-config.json +0 -0
  61. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/tests/conftest.py +0 -0
  62. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/tests/test_cadc_summary.py +0 -0
  63. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/tests/test_canfar_permissions.py +0 -0
  64. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/tests/test_cli.py +0 -0
  65. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/tests/test_config.py +0 -0
  66. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/tests/test_doctor.py +0 -0
  67. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/tests/test_functions.py +0 -0
  68. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/tests/test_inventory.py +0 -0
  69. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/tests/test_locking.py +0 -0
  70. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/tests/test_pull_manifest.py +0 -0
  71. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/tests/test_pull_reliability.py +0 -0
  72. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/tests/test_pull_size.py +0 -0
  73. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/tests/test_scout.py +0 -0
  74. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/tests/test_utils.py +0 -0
  75. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/tests/test_verify.py +0 -0
  76. {datatrail_cli-1.0.1 → datatrail_cli-1.0.2}/tox.ini +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "1.0.2"
3
+ }
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.0.2](https://github.com/CHIMEFRB/datatrail-cli/compare/datatrail-cli-v1.0.1...datatrail-cli-v1.0.2) (2026-09-29)
4
+
5
+
6
+ ### Documentation
7
+
8
+ * cover readiness, verification, and recursive discovery ([#201](https://github.com/CHIMEFRB/datatrail-cli/issues/201)) ([b7b4808](https://github.com/CHIMEFRB/datatrail-cli/commit/b7b48084b094f89ce5812182ac85b487478057d7))
9
+ * restore standalone GitHub Pages build ([#199](https://github.com/CHIMEFRB/datatrail-cli/issues/199)) ([476935e](https://github.com/CHIMEFRB/datatrail-cli/commit/476935e9530f196f64ea2551deb89f65f0fece55))
10
+
3
11
  ## [1.0.1](https://github.com/CHIMEFRB/datatrail-cli/compare/datatrail-cli-v1.0.0...datatrail-cli-v1.0.1) (2026-09-29)
4
12
 
5
13
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: datatrail-cli
3
- Version: 1.0.1
3
+ Version: 1.0.2
4
4
  Summary: CHIME/FRB Datatrail CLI
5
5
  Author: CHIME FRB Project Office
6
6
  Author-email: Tarik Zegmott <tarik.zegmott@mcgill.ca>
@@ -113,3 +113,19 @@ datatrail config init --site chime
113
113
  # Ensure valid CADC Certificate exists
114
114
  cadc-get-cert -u [username]
115
115
  ```
116
+
117
+ ## Building the documentation
118
+
119
+ From the repository root, install the locked documentation dependencies with
120
+ [uv](https://docs.astral.sh/uv/), then build the standalone public site:
121
+
122
+ ```shell
123
+ uv sync --locked --group docs
124
+ uv run --no-sync mkdocs build --strict --config-file mkdocs-site.yml
125
+ ```
126
+
127
+ The site is written to `site/`. To preview it locally, run
128
+ `uv run --no-sync mkdocs serve --config-file mkdocs-site.yml`.
129
+ The installed checkout supplies the generated CLI reference. `mkdocs-site.yml`
130
+ adds the public site's theme and rendering extensions while inheriting the
131
+ navigation from `mkdocs.yml`, which remains the handbook configuration.
@@ -85,3 +85,19 @@ datatrail config init --site chime
85
85
  # Ensure valid CADC Certificate exists
86
86
  cadc-get-cert -u [username]
87
87
  ```
88
+
89
+ ## Building the documentation
90
+
91
+ From the repository root, install the locked documentation dependencies with
92
+ [uv](https://docs.astral.sh/uv/), then build the standalone public site:
93
+
94
+ ```shell
95
+ uv sync --locked --group docs
96
+ uv run --no-sync mkdocs build --strict --config-file mkdocs-site.yml
97
+ ```
98
+
99
+ The site is written to `site/`. To preview it locally, run
100
+ `uv run --no-sync mkdocs serve --config-file mkdocs-site.yml`.
101
+ The installed checkout supplies the generated CLI reference. `mkdocs-site.yml`
102
+ adds the public site's theme and rendering extensions while inheriting the
103
+ navigation from `mkdocs.yml`, which remains the handbook configuration.
@@ -0,0 +1,34 @@
1
+ <div align="center">
2
+ <img src="../images/Datatrail-logo.png" width="110", height="100">
3
+ </div>
4
+
5
+ <h1 align="center">Commands</h1>
6
+
7
+ The commands available to you are:
8
+
9
+ - [`clear`](clear.md): Remove a dataset's files at the local or CANFAR site.
10
+ - [`config`](cli.md#datatrail-config): Initialize, inspect, or edit the CLI
11
+ configuration.
12
+ - [`doctor`](doctor.md): Check configuration, server health, certificate validity,
13
+ and authentication to Minoc and Luskan.
14
+ - [`inventory`](inventory.md): Recursively discover datasets and write their
15
+ file replica URIs to a resumable JSON manifest.
16
+ - [`list` / `ls`](list.md): Browse scopes and datasets, filter with `--match`,
17
+ or discover children with `--expand` and `--recursive`.
18
+ - [`ps`](ps.md): Inspect a dataset's files and storage locations. JSON output
19
+ includes common paths for each storage element.
20
+ - [`pull`](pull.md): Download a dataset's files.
21
+ - [`pull-manifest`](pull-manifest.md): Download Minoc files from an inventory
22
+ manifest with resumable transfer state.
23
+ - [`scout`](scout.md): Compare registered and observed file counts and, after
24
+ confirmation, register missing Minoc replicas.
25
+ - [`unregistered`](unregistered.md): Summarize registration failures or search
26
+ for records of a specific event.
27
+ - [`verify`](verify.md): Compare registered Minoc files with Minoc and Luskan
28
+ metadata, reporting missing files, size or checksum mismatches, and
29
+ unavailable metadata.
30
+ - [`version`](cli.md#datatrail-version): Show CLI and server version information.
31
+
32
+ For practical examples, start with the [User Guide](user_guide.md) or the
33
+ [recursive discovery walkthrough](discovery.md). The
34
+ [Reference](cli.md) lists every command and its options.
@@ -0,0 +1,73 @@
1
+ # Discover datasets recursively
2
+
3
+ Use `datatrail list` (or its alias `datatrail ls`) when you know part of a
4
+ dataset name but not where it sits in the hierarchy. Choose how far to explore:
5
+
6
+ - `--match`: Select larger datasets using comma-separated, case-insensitive
7
+ terms. Every term must appear in the combined scope and dataset name.
8
+ - `--expand`: Open each selected larger dataset one level and list its children.
9
+ - `--recursive`: Follow descendants to terminal datasets and record the path
10
+ to each result.
11
+
12
+ ## Start with a bounded search
13
+
14
+ For example, find gain datasets within one scope:
15
+
16
+ ```shell
17
+ datatrail ls gbo.acquisition.processed --match gains
18
+ ```
19
+
20
+ To inspect one level of children, add `--expand`:
21
+
22
+ ```shell
23
+ datatrail ls gbo.acquisition.processed --match gains --expand
24
+ ```
25
+
26
+ To continue through nested datasets, use `--recursive` instead:
27
+
28
+ ```shell
29
+ datatrail ls gbo.acquisition.processed --match gains --recursive
30
+ ```
31
+
32
+ You can omit the scope to search across scopes, but `--expand` and `--recursive`
33
+ then require `--match` to bound the search. Matching selects the starting larger
34
+ datasets; descendants are followed even if their own names do not contain the
35
+ search terms.
36
+
37
+ The recursive walk visits each dataset once, so shared descendants are not
38
+ repeated and cycles cannot loop forever. It retains the first path found in
39
+ sorted order. A dataset with an answered empty child list is terminal.
40
+
41
+ ## Save discovery results for a script
42
+
43
+ ```shell
44
+ datatrail ls gbo.acquisition.processed --match gains --recursive --json > datasets.json
45
+ ```
46
+
47
+ The JSON map contains `results` and `failed`. Each recursive result records its
48
+ `scope`, `dataset`, `parent`, and `path`. See the [list guide](list.md) for output
49
+ examples and ordinary scope or child-dataset queries. A top-level failure can
50
+ return an `error` object instead of a map and exits `1`, so check the process
51
+ status before reading the result fields.
52
+
53
+ !!! warning "Check for incomplete discovery"
54
+
55
+ An unanswered branch is retained as a partial row and recorded in `failed`.
56
+ A partial map with rows still exits `0`; no rows plus unanswered queries exits
57
+ `1`. Scripts that require complete results must also check that `failed` is
58
+ empty.
59
+
60
+ ## Turn discovery into a resumable download
61
+
62
+ `list --recursive` maps datasets. Use [`inventory`](inventory.md) when you also
63
+ need their file replica URIs saved in a durable manifest:
64
+
65
+ ```shell
66
+ datatrail inventory gbo.acquisition.processed --match gains --output gains-inventory.json
67
+ datatrail pull-manifest gains-inventory.json --directory ./gains --cores 4
68
+ ```
69
+
70
+ An inventory can resume unfinished queries. [`pull-manifest`](pull-manifest.md)
71
+ tracks completed transfers in a separate state file so a later run can continue
72
+ without repeating completed downloads. Read both guides for incomplete results,
73
+ state-file ownership, and transfer behavior.
@@ -0,0 +1,55 @@
1
+ # Check readiness with `doctor`
2
+
3
+ Use `doctor` when a command cannot connect, authentication fails, or you want to
4
+ check your setup before downloading data:
5
+
6
+ ```bash
7
+ datatrail doctor
8
+ ```
9
+
10
+ The command reads your existing CLI configuration and certificate, then checks
11
+ Datatrail, Minoc, and Luskan. See [initial setup](initialising.md) if you have not
12
+ configured the CLI or obtained a CADC certificate.
13
+
14
+ ## Understand the checks
15
+
16
+ The text report prints one line per check, labeled `OK` or `FAILED`:
17
+
18
+ | Check | What must pass |
19
+ | --- | --- |
20
+ | `config` | The configuration loads and contains a server URL, certificate path, site, and root mount for that site. |
21
+ | `server` | The configured Datatrail server returns a valid, healthy `/health/check` report, including database and API status. |
22
+ | `certificate` | The configured certificate is readable PEM and its validity period includes the current time. |
23
+ | `minoc` | Minoc's capabilities endpoint responds successfully and confirms authentication with the certificate. |
24
+ | `luskan` | Luskan's capabilities endpoint responds successfully and confirms authentication with the certificate. |
25
+
26
+ If configuration fails, the remaining readiness checks are skipped. If the
27
+ certificate fails, the Minoc and Luskan checks are skipped. Skipped checks appear
28
+ as `FAILED` with a message explaining why they were not checked; they do not
29
+ independently establish that a service is down.
30
+
31
+ A successful report confirms these readiness checks at that moment. It does not
32
+ prove permission to read every dataset, verify file contents, or continuously
33
+ monitor registration workers. The command does not change configuration, renew
34
+ certificates, or download datasets.
35
+
36
+ ## Use the result in a script
37
+
38
+ ```bash
39
+ datatrail doctor --json > doctor.json
40
+ ```
41
+
42
+ `--json` replaces the text report with a JSON object on standard output. It has a
43
+ top-level `ok` boolean and a `checks` object containing `config`, `server`,
44
+ `certificate`, `minoc`, and `luskan`. Each check contains its own `ok` boolean and
45
+ `message`. The report is still written when a check fails.
46
+
47
+ | Exit status | Meaning |
48
+ | --- | --- |
49
+ | `0` | Every readiness check passed. |
50
+ | `1` | At least one readiness check failed or was skipped. |
51
+
52
+ Address the first relevant failure: review [configuration and certificate setup](initialising.md)
53
+ for local problems, or share the failed check and message with the service operator.
54
+ Run `doctor` again after addressing the cause. For dataset metadata checks, use
55
+ [`verify`](verify.md).
@@ -9,7 +9,7 @@ comments: true
9
9
  <h1 align="center">Datatrail CLI</h1>
10
10
 
11
11
  <h4 align="center">
12
- <a src="https://github.com/CHIMEFRB/datatrail-cli/install/">Install</a>
12
+ <a href="install/">Install</a>
13
13
  ·
14
14
  <a href="https://chimefrb.github.io/datatrail-cli/">Docs</a>
15
15
  </h4>
@@ -41,6 +41,10 @@ In order to fully utilise this CLI, you must have an account with
41
41
  [CANFAR](https://www.canfar.net) and access to the either of the following
42
42
  groups: `chime-frb-ro` or `chime-frb-rw`.
43
43
 
44
+ Check your setup with [`doctor`](doctor.md). The [User Guide](user_guide.md)
45
+ covers [recursive dataset discovery](discovery.md), resumable inventory and downloads,
46
+ [`verify`](verify.md), and registration troubleshooting.
47
+
44
48
  ## 🛠️ [Installation](install.md)
45
49
 
46
50
  ## ⚙️ [Initialise](initialising.md)
@@ -56,13 +56,13 @@ one of the outrigger sites. See below for a guide for each of the sites.
56
56
  of 30 days. You must refresh the certificate periodically.
57
57
 
58
58
  If you do not keep your CADC certificate in the default location, you must
59
- update the configuration file to pointt to the correct location.
59
+ update the configuration file to point to the correct location.
60
60
 
61
61
  ```shell
62
62
  # Updating CADC Certificate location
63
- $> datatrail config set vospace_certificate /non/standard/location/cadcproxy.pem
64
- Attempting to set vospace_certificate to /non/standard/location/cadcproxy.pem
65
- Set vospace_certificate to /non/standard/location/cadcproxy.pem
63
+ $> datatrail config set vospace_certfile /non/standard/location/cadcproxy.pem
64
+ Attempting to set vospace_certfile to /non/standard/location/cadcproxy.pem
65
+ Set vospace_certfile to /non/standard/location/cadcproxy.pem
66
66
  ```
67
67
 
68
68
  === "CANFAR"
@@ -123,13 +123,13 @@ one of the outrigger sites. See below for a guide for each of the sites.
123
123
  of 30 days. You must refresh the certificate periodically.
124
124
 
125
125
  If you do not keep your CADC certificate in the default location, you must
126
- update the configuration file to pointt to the correct location.
126
+ update the configuration file to point to the correct location.
127
127
 
128
128
  ```shell
129
129
  # Updating CADC Certificate location
130
- $> datatrail config set vospace_certificate /non/standard/location/cadcproxy.pem
131
- Attempting to set vospace_certificate to /non/standard/location/cadcproxy.pem
132
- Set vospace_certificate to /non/standard/location/cadcproxy.pem
130
+ $> datatrail config set vospace_certfile /non/standard/location/cadcproxy.pem
131
+ Attempting to set vospace_certfile to /non/standard/location/cadcproxy.pem
132
+ Set vospace_certfile to /non/standard/location/cadcproxy.pem
133
133
  ```
134
134
 
135
135
  === "CHIME"
@@ -171,3 +171,15 @@ one of the outrigger sites. See below for a guide for each of the sites.
171
171
  # Ensure valid CADC Certificate exists
172
172
  cadc-get-cert -u [username]
173
173
  ```
174
+
175
+ ## Check your setup
176
+
177
+ After initializing the configuration and obtaining your certificate, run
178
+ [`doctor`](doctor.md) to check configuration, server health, certificate validity,
179
+ and authentication to Minoc and Luskan:
180
+
181
+ ```shell
182
+ datatrail doctor
183
+ ```
184
+
185
+ The [doctor guide](doctor.md) explains failed checks and JSON output for scripts.
@@ -0,0 +1,58 @@
1
+ <div align="center">
2
+ <img src="../images/Datatrail-logo.png" width="110", height="100">
3
+ </div>
4
+
5
+ <h1 align="center">User Guide</h1>
6
+
7
+ ## Set up and check your connection
8
+
9
+ [Install the CLI](install.md), then [initialize its configuration](initialising.md).
10
+ Use [`doctor`](doctor.md) to check your configuration, Datatrail server health,
11
+ CANFAR certificate, and authentication to Minoc and Luskan before working with
12
+ files. The [`config` reference](cli.md#datatrail-config) covers inspecting and
13
+ editing configuration values.
14
+
15
+ ## Find and inspect datasets
16
+
17
+ Start with [Recursive discovery](discovery.md) for a walkthrough of `--match`,
18
+ `--expand`, and `--recursive`, followed by a resumable inventory and download.
19
+
20
+ - [`list` / `ls`](list.md): Browse scopes and datasets. Use `--match` to narrow
21
+ a search, `--expand` to see one level of children, and `--recursive` to follow
22
+ descendants to terminal datasets.
23
+ - [`ps`](ps.md): Inspect a dataset's files and storage locations, including
24
+ per-storage-element common paths in JSON output.
25
+ - [`inventory`](inventory.md): Save recursive discovery and file replica URIs
26
+ in a JSON manifest that can be resumed after an interruption.
27
+
28
+ ## Download and check files
29
+
30
+ For a large collection, use [`inventory`](inventory.md) to save the discovered
31
+ files, then pass that manifest to [`pull-manifest`](pull-manifest.md) to download
32
+ them with resumable progress.
33
+
34
+ - [`pull`](pull.md): Download the files in a dataset.
35
+ - [`pull-manifest`](pull-manifest.md): Download Minoc files from an inventory
36
+ with saved transfer progress and bounded concurrency.
37
+ - [`verify`](verify.md): Compare registered Minoc files with Minoc and Luskan
38
+ metadata to identify missing files, size or checksum mismatches, and
39
+ unavailable metadata.
40
+ - [`clear`](clear.md): Remove a dataset's local or CANFAR files.
41
+
42
+ ## Investigate registration problems
43
+
44
+ - [`scout`](scout.md): Compare registered and observed file counts and review
45
+ discrepancies before confirming repairs.
46
+ - [`unregistered`](unregistered.md): Summarize registration failures or inspect
47
+ records for a specific event, with optional scope and partial-name filters.
48
+
49
+ ## Use results in scripts
50
+
51
+ `list`, `ps`, `doctor`, `verify`, and `unregistered search` support `--json`.
52
+ Their guides explain each output format. `inventory` writes a JSON manifest,
53
+ while `pull-manifest` saves a separate JSON transfer-state file. Consult the
54
+ relevant command's guide for exit status and error handling.
55
+
56
+ The [command overview](commands.md) links to every command, including
57
+ [`version`](cli.md#datatrail-version). The [CLI reference](cli.md) lists all
58
+ arguments and options.
@@ -0,0 +1,66 @@
1
+ # Compare registered Minoc files with `verify`
2
+
3
+ Use `verify` to check whether the Minoc files recorded by Datatrail have consistent
4
+ metadata in Minoc and the Luskan inventory. Datatrail supplies the file list;
5
+ `verify` compares the sizes and MD5 checksums reported by the two CADC services.
6
+
7
+ ```bash
8
+ datatrail verify chime.event.baseband.raw EVENT_ID
9
+ ```
10
+
11
+ Replace the scope and `EVENT_ID` with your dataset's actual identifiers. The CLI
12
+ needs its normal configuration and a valid CADC certificate with service access.
13
+ Use [`doctor`](doctor.md) to troubleshoot configuration or authentication first.
14
+
15
+ ## Read the results
16
+
17
+ The report starts with the scope, dataset, and `registered` count: the number of
18
+ unique Minoc file URIs returned by Datatrail. It then shows these result counts
19
+ and lists the URIs with problems:
20
+
21
+ | Result | Meaning |
22
+ | --- | --- |
23
+ | `present` | Both services returned complete, matching size and checksum metadata. |
24
+ | `missing` | A successful metadata lookup did not return the registered URI from Minoc, Luskan, or both. |
25
+ | `size-mismatch` | Both sizes are available, but their byte counts differ. |
26
+ | `checksum-mismatch` | Both MD5 values are available, but they differ. |
27
+ | `unavailable` | A service request failed, a response was invalid, or required metadata was incomplete. The comparison could not be completed. |
28
+
29
+ One file can have more than one problem, so problem counts need not add up to
30
+ `registered`. An unavailable lookup is not reported as proof that a file is
31
+ missing.
32
+
33
+ !!! note "An empty check can succeed"
34
+
35
+ If Datatrail returns no registered Minoc files, the command reports
36
+ `registered: 0` and succeeds. This does not establish that the dataset has
37
+ been replicated. Inspect its recorded locations with [`ps`](ps.md).
38
+
39
+ This command reads metadata; it does not download files, recompute checksums from
40
+ their contents, or repair registrations. It checks only the registered Minoc
41
+ URIs supplied by Datatrail, so it does not discover unregistered files or verify
42
+ other storage elements. Matching service metadata is not a fresh integrity check
43
+ of the stored bytes.
44
+
45
+ ## Save a detailed report
46
+
47
+ ```bash
48
+ datatrail verify chime.event.baseband.raw EVENT_ID --json > verification.json
49
+ ```
50
+
51
+ `--json` writes a JSON object on standard output, including on verification
52
+ failure. It contains `scope`, `dataset`, `registered`, `ok`, `summary`, and
53
+ `results`. The category keys use underscores (`size_mismatch` and
54
+ `checksum_mismatch`). Detailed results identify the URI, affected services, or
55
+ the differing Minoc and Luskan values as appropriate.
56
+
57
+ | Exit status | Meaning |
58
+ | --- | --- |
59
+ | `0` | No missing files, mismatches, or unavailable metadata were reported; this includes an empty registered file list. |
60
+ | `1` | Missing files or metadata mismatches were found, with no unavailable results. |
61
+ | `2` | At least one result was unavailable, even if other files also had mismatches. |
62
+
63
+ For unavailable results, check service readiness and retry after the underlying
64
+ problem is resolved. For missing files or mismatches, retain the detailed report
65
+ and investigate the dataset with [`ps`](ps.md) and [`scout`](scout.md) before
66
+ requesting corrective work.
@@ -0,0 +1,37 @@
1
+ # Standalone public site; mkdocs.yml remains the handbook navigation source.
2
+ INHERIT: mkdocs.yml
3
+
4
+ site_name: Datatrail CLI
5
+ site_url: https://chimefrb.github.io/datatrail-cli/
6
+ repo_name: CHIMEFRB/datatrail-cli
7
+ repo_url: https://github.com/CHIMEFRB/datatrail-cli
8
+
9
+ theme:
10
+ name: material
11
+ palette:
12
+ scheme: slate
13
+ primary: deep purple
14
+ accent: yellow
15
+ features:
16
+ - navigation.expand
17
+ - navigation.top
18
+ - navigation.tabs
19
+ - navigation.tabs.sticky
20
+ - content.code.copy
21
+
22
+ plugins:
23
+ - search
24
+ - termynal
25
+
26
+ markdown_extensions:
27
+ - admonition
28
+ - attr_list
29
+ - mkdocs-click
30
+ - toc:
31
+ permalink: true
32
+ - pymdownx.details
33
+ - pymdownx.highlight
34
+ - pymdownx.inlinehilite
35
+ - pymdownx.superfences
36
+ - pymdownx.tabbed:
37
+ alternate_style: true
@@ -7,9 +7,11 @@ nav:
7
7
  - User Guide:
8
8
  - Welcome: user_guide.md
9
9
  - Install: install.md
10
- - Initialise: initialising.md
10
+ - Initialize: initialising.md
11
+ - Recursive discovery: discovery.md
11
12
  - Commands:
12
13
  - clear: clear.md
14
+ - doctor: doctor.md
13
15
  - inventory: inventory.md
14
16
  - list: list.md
15
17
  - ps: ps.md
@@ -17,6 +19,7 @@ nav:
17
19
  - pull-manifest: pull-manifest.md
18
20
  - scout: scout.md
19
21
  - unregistered: unregistered.md
22
+ - verify: verify.md
20
23
  - Command Line Interface:
21
24
  - Commands: commands.md
22
25
  - Reference: cli.md
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "datatrail-cli"
3
- version = "1.0.1"
3
+ version = "1.0.2"
4
4
  description = "CHIME/FRB Datatrail CLI"
5
5
  authors = [
6
6
  { name = "CHIME FRB Project Office" },
@@ -508,7 +508,7 @@ wheels = [
508
508
 
509
509
  [[package]]
510
510
  name = "datatrail-cli"
511
- version = "1.0.1"
511
+ version = "1.0.2"
512
512
  source = { editable = "." }
513
513
  dependencies = [
514
514
  { name = "cadcdata" },
@@ -1,3 +0,0 @@
1
- {
2
- ".": "1.0.1"
3
- }
@@ -1,30 +0,0 @@
1
- <div align="center">
2
- <img src="../images/Datatrail-logo.png" width="110", height="100">
3
- </div>
4
-
5
- <h1 align="center">Commands</h1>
6
-
7
- The commands available to you are:
8
-
9
- - `clear`: This removes all files belonging to the 'scope' and 'dataset', only
10
- available for the local and canfar sites.
11
- - `config`: Edit the `.datatrail/config.yaml` configuration file.
12
- - `inventory`: Recursively discover datasets and write their file replica URIs
13
- to a resumable JSON manifest.
14
- - `list`: This list either the 'scopes' available or all of the datasets
15
- belonging to the given dataset.
16
- - `ps`: This provides detailed information for the given 'scope' and 'dataset' combination.
17
- - `pull`: This allows you to download all files belonging to the 'scope' and
18
- 'dataset' provided.
19
- - `pull-manifest`: Download Minoc files from a resumable inventory manifest.
20
- - `scout`: This command provides an overview of what the Datatrail database
21
- thinks is the current number of files for a given dataset at each storage
22
- element, compared to what is observed. If a discrepancy is found at Minoc,
23
- the user can choose to create the file replicas missing for Minoc.
24
- - `unregistered`: This provides insight into datasets which failed to register
25
- with Datatrail, either summarised across the whole unregistered bucket
26
- (`summary`) or for a single event (`search`).
27
- - `version`: List the CLI and server version.
28
-
29
- Detailed information on all of the CLI commands can be found on the
30
- [Reference](cli) page.
@@ -1,33 +0,0 @@
1
- <div align="center">
2
- <img src="../images/Datatrail-logo.png" width="110", height="100">
3
- </div>
4
-
5
- <h1 align="center">User Guide</h1>
6
-
7
- ## 🛠️ [Installation](install.md)
8
-
9
- How to install Datatrail CLI.
10
-
11
- ## ⚙️ [Initialise](initialising.md)
12
-
13
- Performing the initial setup in order to use the Datatrail CLI.
14
-
15
- ## 🗑️ [clear](clear.md)
16
-
17
- Deleting a dataset.
18
-
19
- ## 🗒️ [list](list.md)
20
-
21
- Searching the Datatrail database for scopes and datasets.
22
-
23
- ## 🔍 [ps](ps.md)
24
-
25
- Querying the Datatrail database for details about a dataset.
26
-
27
- ## ⬇️ [pull](pull.md)
28
-
29
- Downloading a dataset.
30
-
31
- ## 🕵️ [scout](scout.md)
32
-
33
- Investigating number of files for a dataset across storage elements.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes