keepset 0.10.0 → 0.12.0
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.
- package/README.md +18 -1
- package/dist/{bundled-BIBLzetw.js → bundled-DNLiwEcd.js} +1653 -25
- package/dist/{categories-CUf1VecC.d.ts → categories-DzjLQ_fp.d.ts} +46 -10
- package/dist/index.d.ts +43 -3
- package/dist/index.js +2 -2
- package/dist/node/fetch-dataset.d.ts +1 -1
- package/dist/node/fetch-dataset.js +1 -1
- package/dist-cli/keepset.mjs +28 -14
- package/package.json +1 -1
- package/schemas/entry.schema.json +1 -1
- package/schemas/manifest.schema.json +1 -1
package/README.md
CHANGED
|
@@ -35,7 +35,24 @@ npx keepset validate cora
|
|
|
35
35
|
npx keepset roundtrip cora
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
`fetch` writes the normalised result with its provenance beside it; `validate` checks the entry against the entry schema and its crosswalk against twindex's validation without the network; `roundtrip` fetches the dataset and checks that decoding the encoded native document gives it back. Exit status is 0 for an answer, 1 for a negative one (an invalid entry, a round trip that does not hold) and 2 for no answer (bad usage, an unknown
|
|
38
|
+
`fetch` writes the normalised result with its provenance beside it; `validate` checks the entry against the entry schema and its crosswalk against twindex's validation without the network; `roundtrip` fetches the dataset and checks that decoding the encoded native document gives it back. Exit status is 0 for an answer, 1 for a negative one (an invalid entry, a round trip that does not hold) and 2 for no answer (bad usage, an unknown or ambiguous name, a recipe that failed).
|
|
39
|
+
|
|
40
|
+
## Names, aliases and namespaces
|
|
41
|
+
|
|
42
|
+
An entry has one canonical id, flat and stable, and can also carry a namespace (the collection it comes from, such as `suitesparse/gset`) and aliases (other names for the same dataset). The library's `getDataset` and every CLI command that takes a dataset resolve any of these names:
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
npx keepset fetch ss-gset-g53
|
|
46
|
+
npx keepset fetch suitesparse/gset/g53
|
|
47
|
+
npx keepset fetch gset/g53
|
|
48
|
+
npx keepset fetch g53
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
A qualified name joins the namespace to a name with `/`, and any leading part of the namespace may be dropped while the name still means one dataset (a middle part may not be). An entry's own id always wins; otherwise a name that more than one entry answers to is refused with the ids it could mean (`DatasetAmbiguousError` in the library, exit status 2 in the CLI), and the way out is a longer qualified name or the id. Everything a command writes or prints uses the entry's own id, never the name typed.
|
|
52
|
+
|
|
53
|
+
An alias that is a path, such as `foo/graphs/bar`, files the entry in a second group as well: it is a name in its own right, not prefixed by the entry's namespace, and answers to `bar`, `graphs/bar` and `foo/graphs/bar`. The namespace is where an entry comes from and path aliases are cross-listing, so an entry can sit in several groups. The catalogue manifest can also give a namespace segment aliases (`namespaceAliases`, such as `ss` for `suitesparse`), and a name then answers with the alias in the segment's place.
|
|
54
|
+
|
|
55
|
+
`search --namespace suitesparse` (or `listDatasets({ namespace })`) lists a group and every group beneath it, an entry once however many of those it is in. `listNamespaces(path)` lists the namespaces directly beneath a path, or the outermost ones, each with the number of entries at or beneath it.
|
|
39
56
|
|
|
40
57
|
## The entry format
|
|
41
58
|
|