datatrail-cli 1.0.0__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.
- datatrail_cli-1.0.2/.release-please-manifest.json +3 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/CHANGELOG.md +21 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/PKG-INFO +17 -1
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/README.md +16 -0
- datatrail_cli-1.0.2/docs/commands.md +34 -0
- datatrail_cli-1.0.2/docs/discovery.md +73 -0
- datatrail_cli-1.0.2/docs/doctor.md +55 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/docs/index.md +5 -1
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/docs/initialising.md +20 -8
- datatrail_cli-1.0.2/docs/user_guide.md +58 -0
- datatrail_cli-1.0.2/docs/verify.md +66 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/dtcli/pull.py +20 -2
- datatrail_cli-1.0.2/dtcli/scout.py +323 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/dtcli/src/functions.py +66 -3
- datatrail_cli-1.0.2/mkdocs-site.yml +37 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/mkdocs.yml +4 -1
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/pyproject.toml +1 -1
- datatrail_cli-1.0.2/tests/test_canfar_permissions.py +206 -0
- datatrail_cli-1.0.2/tests/test_pull_size.py +164 -0
- datatrail_cli-1.0.2/tests/test_scout.py +419 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/uv.lock +1 -1
- datatrail_cli-1.0.0/.release-please-manifest.json +0 -3
- datatrail_cli-1.0.0/docs/commands.md +0 -30
- datatrail_cli-1.0.0/docs/user_guide.md +0 -33
- datatrail_cli-1.0.0/dtcli/scout.py +0 -233
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/.github/workflows/codeql.yml +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/.github/workflows/continuous-deployment.yml +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/.github/workflows/continuous-integration.yml +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/.github/workflows/docs.yml +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/.github/workflows/stale.yml +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/.gitignore +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/.pre-commit-config.yaml +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/LICENSE +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/docs/clear.md +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/docs/cli.md +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/docs/images/Datatrail-logo.png +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/docs/install.md +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/docs/inventory.md +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/docs/list.md +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/docs/ps.md +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/docs/pull-manifest.md +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/docs/pull.md +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/docs/scout.md +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/docs/unregistered.md +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/dtcli/__init__.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/dtcli/clear.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/dtcli/cli.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/dtcli/config.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/dtcli/config.yaml +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/dtcli/doctor.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/dtcli/inventory.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/dtcli/locking.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/dtcli/ls.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/dtcli/ps.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/dtcli/pull_manifest.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/dtcli/unregistered.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/dtcli/utilities/cadcclient.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/dtcli/utilities/results.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/dtcli/utilities/utilities.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/dtcli/verify.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/release-please-config.json +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/tests/conftest.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/tests/test_cadc_summary.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/tests/test_cli.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/tests/test_config.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/tests/test_doctor.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/tests/test_functions.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/tests/test_inventory.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/tests/test_locking.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/tests/test_pull_manifest.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/tests/test_pull_reliability.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/tests/test_utils.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/tests/test_verify.py +0 -0
- {datatrail_cli-1.0.0 → datatrail_cli-1.0.2}/tox.ini +0 -0
|
@@ -1,5 +1,26 @@
|
|
|
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
|
+
|
|
11
|
+
## [1.0.1](https://github.com/CHIMEFRB/datatrail-cli/compare/datatrail-cli-v1.0.0...datatrail-cli-v1.0.1) (2026-09-29)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* **pull:** continue when optional size query is unavailable ([#195](https://github.com/CHIMEFRB/datatrail-cli/issues/195)) ([b36bbbf](https://github.com/CHIMEFRB/datatrail-cli/commit/b36bbbf90d47eb22f20eaa7a12cfea8f4ae703bb))
|
|
17
|
+
* **scout:** restore discrepancy detection and confirmed repairs ([#197](https://github.com/CHIMEFRB/datatrail-cli/issues/197)) ([54dfbf4](https://github.com/CHIMEFRB/datatrail-cli/commit/54dfbf4b3abf8ff0f7f9db13e5eb7ccdb28ccce1))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Performance Improvements
|
|
21
|
+
|
|
22
|
+
* **pull:** apply CANFAR permissions without subprocesses ([#157](https://github.com/CHIMEFRB/datatrail-cli/issues/157)) ([b8c2230](https://github.com/CHIMEFRB/datatrail-cli/commit/b8c22306432a6b24b435b5ddb421ac5cdcd9e1eb))
|
|
23
|
+
|
|
3
24
|
## [1.0.0](https://github.com/CHIMEFRB/datatrail-cli/compare/datatrail-cli-v0.13.0...datatrail-cli-v1.0.0) (2026-09-28)
|
|
4
25
|
|
|
5
26
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: datatrail-cli
|
|
3
|
-
Version: 1.0.
|
|
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
|
|
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
|
|
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
|
|
64
|
-
Attempting to set
|
|
65
|
-
Set
|
|
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
|
|
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
|
|
131
|
-
Attempting to set
|
|
132
|
-
Set
|
|
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.
|
|
@@ -4,7 +4,13 @@ import logging
|
|
|
4
4
|
from os import cpu_count, path
|
|
5
5
|
|
|
6
6
|
import click
|
|
7
|
-
from
|
|
7
|
+
from cadcutils.exceptions import (
|
|
8
|
+
HttpException,
|
|
9
|
+
InternalServerException,
|
|
10
|
+
TransferException,
|
|
11
|
+
UnexpectedException,
|
|
12
|
+
)
|
|
13
|
+
from requests.exceptions import ConnectionError, SSLError, Timeout
|
|
8
14
|
from rich.console import Console
|
|
9
15
|
from rich.prompt import Confirm
|
|
10
16
|
|
|
@@ -149,6 +155,18 @@ Create one using 'cadc-get-cert -u <USERNAME>'.
|
|
|
149
155
|
"""
|
|
150
156
|
)
|
|
151
157
|
return None
|
|
158
|
+
except (ConnectionError, Timeout, HttpException) as error:
|
|
159
|
+
# CADC also uses the base HttpException for failed connections/retries.
|
|
160
|
+
# Preserve its authentication, certificate, and invalid-request errors.
|
|
161
|
+
if isinstance(error, HttpException) and type(error) not in (
|
|
162
|
+
HttpException,
|
|
163
|
+
InternalServerException,
|
|
164
|
+
TransferException,
|
|
165
|
+
UnexpectedException,
|
|
166
|
+
):
|
|
167
|
+
raise
|
|
168
|
+
logger.debug("Unable to query Luskan for download size", exc_info=True)
|
|
169
|
+
to_download_size = -1
|
|
152
170
|
elif not luskan_up:
|
|
153
171
|
to_download_size = -1
|
|
154
172
|
else:
|
|
@@ -161,7 +179,7 @@ Create one using 'cadc-get-cert -u <USERNAME>'.
|
|
|
161
179
|
f" - {len(files['missing'])} files can be downloaded from minoc.",
|
|
162
180
|
style="yellow",
|
|
163
181
|
)
|
|
164
|
-
if
|
|
182
|
+
if to_download_size >= 0:
|
|
165
183
|
console.print(
|
|
166
184
|
f" - Size to download: {to_download_size:.2f} GB.\n",
|
|
167
185
|
style="yellow",
|