keepset 0.28.1 → 0.29.1
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 +2 -2
- package/dist/{bundled-CSQH5LeG.js → bundled-Ql23qj97.js} +398 -268
- package/dist/{categories-DkkYCbGk.d.ts → categories-DC0uTkzn.d.ts} +26 -17
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/node/fetch-dataset.d.ts +1 -1
- package/dist/node/fetch-dataset.js +4 -4
- package/dist-cli/keepset.mjs +8 -5
- package/package.json +1 -1
- package/schemas/entry.schema.json +1 -1
- package/schemas/manifest.schema.json +1 -1
|
@@ -4,6 +4,8 @@ import { z } from "zod";
|
|
|
4
4
|
/** A stable identifier: an entry id, a catalogue id. It starts with a letter or digit, so no id can be `__proto__` or any other name that begins with an underscore. Entry ids stay the same across forks, which is what lets two catalogues be compared entry by entry. */
|
|
5
5
|
declare const IdSchema: z.ZodString;
|
|
6
6
|
/** A key of an entry's `properties` or `expectedCounts` record: an identifier that starts with a letter, so it can never be `__proto__` or another name Object.prototype reacts to on assignment. */
|
|
7
|
+
/** A subject: the field of study a dataset is relevant to, as a lowercase slug of words joined by hyphens, such as `operations-research`. It is separate from the entry's domain (its topic), its tags (the node fields it carries) and its namespace (the source it comes from), and it is the value a search filters by. */
|
|
8
|
+
declare const SubjectSchema: z.ZodString;
|
|
7
9
|
/** An alias: an id, or a path of ids joined by `/` such as `foo/graphs/bar`. A bare id is a name inside the entry's own namespace; a path is a name of its own, in the group its leading segments name. The segment pattern repeats the one in `IdSchema` so that each part of a path is an id. */
|
|
8
10
|
declare const AliasSchema: z.ZodString;
|
|
9
11
|
/** The path a dataset sits under in a collection, outermost segment first, such as `["suitesparse", "gset"]`. Each segment is an id, so a segment can never contain the `/` that joins a namespace to a name. */
|
|
@@ -401,7 +403,7 @@ type CrosswalkReference = z.infer<typeof CrosswalkReferenceSchema>;
|
|
|
401
403
|
/** The meta keys a fetched result takes from the entry's own descriptor, which its `properties` therefore may not also set. */
|
|
402
404
|
declare const RESERVED_META_KEYS: readonly ["id", "name"];
|
|
403
405
|
/**
|
|
404
|
-
* One catalogue entry: the descriptor (id, optional namespace and aliases, name, description, domain, tags), the category whose target the entry resolves to, where the bytes come from, the licence and citations, the recipe, the crosswalk, the counts a fetched result is expected to have and the dataset's recorded properties. The kind of data is the category's (`kindOf(category)`), never a second field that could disagree with it.
|
|
406
|
+
* One catalogue entry: the descriptor (id, optional namespace and aliases, name, description, domain, subjects, tags), the category whose target the entry resolves to, where the bytes come from, the licence and citations, the recipe, the crosswalk, the counts a fetched result is expected to have and the dataset's recorded properties. The kind of data is the category's (`kindOf(category)`), never a second field that could disagree with it.
|
|
405
407
|
*/
|
|
406
408
|
declare const EntrySchema: z.ZodObject<{
|
|
407
409
|
id: z.ZodString;
|
|
@@ -410,10 +412,11 @@ declare const EntrySchema: z.ZodObject<{
|
|
|
410
412
|
name: z.ZodString;
|
|
411
413
|
description: z.ZodOptional<z.ZodString>;
|
|
412
414
|
domain: z.ZodOptional<z.ZodString>;
|
|
415
|
+
subjects: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
413
416
|
tags: z.ZodArray<z.ZodString>;
|
|
414
417
|
category: z.ZodEnum<{
|
|
415
418
|
"graph/v1": "graph/v1";
|
|
416
|
-
"
|
|
419
|
+
"tasks/v1": "tasks/v1";
|
|
417
420
|
}>;
|
|
418
421
|
sources: z.ZodArray<z.ZodObject<{
|
|
419
422
|
url: z.ZodURL;
|
|
@@ -609,7 +612,7 @@ declare const EntrySchema: z.ZodObject<{
|
|
|
609
612
|
id: string;
|
|
610
613
|
name: string;
|
|
611
614
|
tags: string[];
|
|
612
|
-
category: "graph/v1" | "
|
|
615
|
+
category: "graph/v1" | "tasks/v1";
|
|
613
616
|
sources: {
|
|
614
617
|
url: string;
|
|
615
618
|
retrieved: string;
|
|
@@ -750,6 +753,7 @@ declare const EntrySchema: z.ZodObject<{
|
|
|
750
753
|
aliases?: string[] | undefined;
|
|
751
754
|
description?: string | undefined;
|
|
752
755
|
domain?: string | undefined;
|
|
756
|
+
subjects?: string[] | undefined;
|
|
753
757
|
};
|
|
754
758
|
};
|
|
755
759
|
type Entry = z.infer<typeof EntrySchema>;
|
|
@@ -852,10 +856,11 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
852
856
|
name: z.ZodString;
|
|
853
857
|
description: z.ZodOptional<z.ZodString>;
|
|
854
858
|
domain: z.ZodOptional<z.ZodString>;
|
|
859
|
+
subjects: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
855
860
|
tags: z.ZodArray<z.ZodString>;
|
|
856
861
|
category: z.ZodEnum<{
|
|
857
862
|
"graph/v1": "graph/v1";
|
|
858
|
-
"
|
|
863
|
+
"tasks/v1": "tasks/v1";
|
|
859
864
|
}>;
|
|
860
865
|
sources: z.ZodArray<z.ZodObject<{
|
|
861
866
|
url: z.ZodURL;
|
|
@@ -1051,7 +1056,7 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
1051
1056
|
id: string;
|
|
1052
1057
|
name: string;
|
|
1053
1058
|
tags: string[];
|
|
1054
|
-
category: "graph/v1" | "
|
|
1059
|
+
category: "graph/v1" | "tasks/v1";
|
|
1055
1060
|
sources: {
|
|
1056
1061
|
url: string;
|
|
1057
1062
|
retrieved: string;
|
|
@@ -1192,6 +1197,7 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
1192
1197
|
aliases?: string[] | undefined;
|
|
1193
1198
|
description?: string | undefined;
|
|
1194
1199
|
domain?: string | undefined;
|
|
1200
|
+
subjects?: string[] | undefined;
|
|
1195
1201
|
};
|
|
1196
1202
|
}>;
|
|
1197
1203
|
}, z.core.$strict> & {
|
|
@@ -1214,7 +1220,7 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
1214
1220
|
id: string;
|
|
1215
1221
|
name: string;
|
|
1216
1222
|
tags: string[];
|
|
1217
|
-
category: "graph/v1" | "
|
|
1223
|
+
category: "graph/v1" | "tasks/v1";
|
|
1218
1224
|
sources: {
|
|
1219
1225
|
url: string;
|
|
1220
1226
|
retrieved: string;
|
|
@@ -1355,6 +1361,7 @@ declare const CatalogueIndexSchema: z.ZodObject<{
|
|
|
1355
1361
|
aliases?: string[] | undefined;
|
|
1356
1362
|
description?: string | undefined;
|
|
1357
1363
|
domain?: string | undefined;
|
|
1364
|
+
subjects?: string[] | undefined;
|
|
1358
1365
|
}[];
|
|
1359
1366
|
};
|
|
1360
1367
|
};
|
|
@@ -1374,9 +1381,11 @@ interface DatasetQuery {
|
|
|
1374
1381
|
readonly category?: string;
|
|
1375
1382
|
/** The entry's domain, matched exactly. */
|
|
1376
1383
|
readonly domain?: string;
|
|
1384
|
+
/** A subject slug such as `operations-research`, matched exactly against the entry's subjects. */
|
|
1385
|
+
readonly subject?: string;
|
|
1377
1386
|
/** A group path such as `suitesparse` or `suitesparse/gset`, in which any segment may be an alias the manifest gives it: matches the entries in that group, in any group beneath it, and the entries a path alias files there. */
|
|
1378
1387
|
readonly namespace?: string;
|
|
1379
|
-
/** Text that must appear, ignoring case, in the entry's id, an alias, one of its groups, name, description, domain or one of its tags. */
|
|
1388
|
+
/** Text that must appear, ignoring case, in the entry's id, an alias, one of its groups, name, description, domain, one of its subjects or one of its tags. */
|
|
1380
1389
|
readonly text?: string;
|
|
1381
1390
|
}
|
|
1382
1391
|
/** One namespace in the tree of groups: its path, its last segment, and how many distinct entries sit in it or in any namespace beneath it. */
|
|
@@ -1487,11 +1496,11 @@ declare function collectionOf<Document extends object>(document: z.ZodType<Docum
|
|
|
1487
1496
|
is: (value: unknown) => value is Collection<Document>;
|
|
1488
1497
|
};
|
|
1489
1498
|
//#endregion
|
|
1490
|
-
//#region src/targets/
|
|
1499
|
+
//#region src/targets/tasks-v1.d.ts
|
|
1491
1500
|
/**
|
|
1492
|
-
* A
|
|
1501
|
+
* A task: a place or case to visit or serve, such as a stop of a route or a case in a register, flat so a twindex crosswalk can map a table's columns onto it (a wildcard path must keep the same shape on both sides). The target fixes only what the datasets share and lets a crosswalk map any further column through under its own name, as graph/v1 does. `lat` and `lon` are WGS84 degrees and `x` and `y` are planar coordinates in the dataset's own system; `duration` and `travelTime` are seconds, `prize` is the dataset's own reward measure, and `prizeProbability` is the chance the reward is collected. `skill` and `territory` name what is needed to serve the node and where it sits, `status` is where it is in its lifecycle, and `opened`, `closed` and `deadline` are its lifecycle times as the source writes them, a deadline being a number where the source gives a time of day.
|
|
1493
1502
|
*/
|
|
1494
|
-
declare const
|
|
1503
|
+
declare const TaskSchema: z.ZodObject<{
|
|
1495
1504
|
id: z.ZodString;
|
|
1496
1505
|
lat: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1497
1506
|
lon: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -1508,11 +1517,11 @@ declare const OrNodeSchema: z.ZodObject<{
|
|
|
1508
1517
|
closed: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1509
1518
|
deadline: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
1510
1519
|
}, z.core.$loose>;
|
|
1511
|
-
type
|
|
1520
|
+
type Task = z.infer<typeof TaskSchema>;
|
|
1512
1521
|
/**
|
|
1513
|
-
* The
|
|
1522
|
+
* The tasks/v1 normalisation target: `{ meta, nodes }`, a set of tasks as the nodes it offers to visit or serve, whether it comes from a routing benchmark or from an open data register of permits and complaints. It describes the result `fetchDataset` resolves an entry to, not what a source file may contain. Beyond the field shapes it checks that node ids are unique. It has no arcs: a source that carries a travel matrix or arc list keeps it out of this version.
|
|
1514
1523
|
*/
|
|
1515
|
-
declare const
|
|
1524
|
+
declare const TasksV1Schema: z.ZodObject<{
|
|
1516
1525
|
meta: z.ZodPreprocess<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, unknown>;
|
|
1517
1526
|
nodes: z.ZodArray<z.ZodObject<{
|
|
1518
1527
|
id: z.ZodString;
|
|
@@ -1554,19 +1563,19 @@ declare const OrV1Schema: z.ZodObject<{
|
|
|
1554
1563
|
}[];
|
|
1555
1564
|
};
|
|
1556
1565
|
};
|
|
1557
|
-
type
|
|
1566
|
+
type TasksV1 = z.infer<typeof TasksV1Schema>;
|
|
1558
1567
|
//#endregion
|
|
1559
1568
|
//#region src/categories.d.ts
|
|
1560
1569
|
/** Every category id the registry knows. A category id is `<kind>/v<version>`: the kind of data, and the version of its normalisation target, so a breaking change to a target is a new category rather than an edit to an old one. */
|
|
1561
1570
|
declare const CategoryIdSchema: z.ZodEnum<{
|
|
1562
1571
|
"graph/v1": "graph/v1";
|
|
1563
|
-
"
|
|
1572
|
+
"tasks/v1": "tasks/v1";
|
|
1564
1573
|
}>;
|
|
1565
1574
|
type CategoryId = z.infer<typeof CategoryIdSchema>;
|
|
1566
1575
|
/** The normalisation target each category resolves to, keyed by category id. */
|
|
1567
1576
|
interface CategoryTargets {
|
|
1568
1577
|
readonly "graph/v1": GraphV1;
|
|
1569
|
-
readonly "
|
|
1578
|
+
readonly "tasks/v1": TasksV1;
|
|
1570
1579
|
}
|
|
1571
1580
|
/** The normalised shape of any category: what `fetchDataset` can resolve to. */
|
|
1572
1581
|
type CategoryTarget = CategoryTargets[CategoryId];
|
|
@@ -1630,4 +1639,4 @@ declare function countedKeys(id: CategoryId, collection: boolean): readonly stri
|
|
|
1630
1639
|
*/
|
|
1631
1640
|
declare function countTarget(id: CategoryId, target: CategoryTarget | CollectionTarget): ReadonlyMap<string, number>;
|
|
1632
1641
|
//#endregion
|
|
1633
|
-
export { CrosswalkReference as $, Catalogue as A, ManifestSchema as B, JsonScalarSchema as C, GraphNodeSchema as D, GraphNode as E, NamespaceNode as F, ArchiveMember as G, parseManifest as H, createCatalogue as I, Citation as J, ArchiveMemberSchema as K, Lineage as L, CatalogueIndexSchema as M, Dataset as N, GraphV1 as O, DatasetQuery as P, ColumnNameSchema as Q, LineageSchema as R, JsonScalar as S,
|
|
1642
|
+
export { CrosswalkReference as $, Catalogue as A, ManifestSchema as B, JsonScalarSchema as C, waybackUrl as Ct, GraphNodeSchema as D, GraphNode as E, NamespaceNode as F, ArchiveMember as G, parseManifest as H, createCatalogue as I, Citation as J, ArchiveMemberSchema as K, Lineage as L, CatalogueIndexSchema as M, Dataset as N, GraphV1 as O, DatasetQuery as P, ColumnNameSchema as Q, LineageSchema as R, JsonScalar as S, parseEntry as St, GraphEdgeSchema as T, AliasSchema as U, SemVerSchema as V, Archive as W, CollectionArchive as X, CitationSchema as Y, CollectionArchiveSchema as Z, TasksV1 as _, SnapshotSchema as _t, CategoryTargets as a, IdSchema as at, Instance as b, SubjectSchema as bt, countTarget as c, Namespace as ct, getCollectionTarget as d, ParserSchema as dt, CrosswalkReferenceSchema as et, getTarget as f, RESERVED_META_KEYS as ft, TaskSchema as g, Snapshot as gt, Task as h, RelativePathSchema as ht, CategoryTarget as i, HttpUrlSchema as it, CatalogueIndex as j, GraphV1Schema as k, countedKeys as l, NamespaceSchema as lt, listCategories as m, RecipeSchema as mt, CategoryId as n, Entry as nt, CollectionTarget as o, Licence as ot, kindOf as p, Recipe as pt, ArchiveSchema as q, CategoryIdSchema as r, EntrySchema as rt, CountedKey as s, LicenceSchema as st, Category as t, DocumentArchive as tt, getCategory as u, Parser as ut, TasksV1Schema as v, Source as vt, GraphEdge as w, collectionOf as x, WaybackTimestampSchema as xt, Collection as y, SourceSchema as yt, Manifest as z };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as CrosswalkReference, A as Catalogue, B as ManifestSchema, C as JsonScalarSchema, D as GraphNodeSchema, E as GraphNode, F as NamespaceNode, G as ArchiveMember, H as parseManifest, I as createCatalogue, J as Citation, K as ArchiveMemberSchema, L as Lineage, M as CatalogueIndexSchema, N as Dataset, O as GraphV1, P as DatasetQuery, Q as ColumnNameSchema, R as LineageSchema, S as JsonScalar, St as
|
|
1
|
+
import { $ as CrosswalkReference, A as Catalogue, B as ManifestSchema, C as JsonScalarSchema, Ct as waybackUrl, D as GraphNodeSchema, E as GraphNode, F as NamespaceNode, G as ArchiveMember, H as parseManifest, I as createCatalogue, J as Citation, K as ArchiveMemberSchema, L as Lineage, M as CatalogueIndexSchema, N as Dataset, O as GraphV1, P as DatasetQuery, Q as ColumnNameSchema, R as LineageSchema, S as JsonScalar, St as parseEntry, T as GraphEdgeSchema, U as AliasSchema, V as SemVerSchema, W as Archive, X as CollectionArchive, Y as CitationSchema, Z as CollectionArchiveSchema, _ as TasksV1, _t as SnapshotSchema, a as CategoryTargets, at as IdSchema, b as Instance, bt as SubjectSchema, c as countTarget, ct as Namespace, d as getCollectionTarget, dt as ParserSchema, et as CrosswalkReferenceSchema, f as getTarget, ft as RESERVED_META_KEYS, g as TaskSchema, gt as Snapshot, h as Task, ht as RelativePathSchema, i as CategoryTarget, it as HttpUrlSchema, j as CatalogueIndex, k as GraphV1Schema, l as countedKeys, lt as NamespaceSchema, m as listCategories, mt as RecipeSchema, n as CategoryId, nt as Entry, o as CollectionTarget, ot as Licence, p as kindOf, pt as Recipe, q as ArchiveSchema, r as CategoryIdSchema, rt as EntrySchema, s as CountedKey, st as LicenceSchema, t as Category, tt as DocumentArchive, u as getCategory, ut as Parser, v as TasksV1Schema, vt as Source, w as GraphEdge, x as collectionOf, xt as WaybackTimestampSchema, y as Collection, yt as SourceSchema, z as Manifest } from "./categories-DC0uTkzn.js";
|
|
2
2
|
import { Crosswalk } from "twindex";
|
|
3
3
|
//#region src/errors.d.ts
|
|
4
4
|
/** The root of this package's error taxonomy: every error keepset throws is a `KeepsetError`, so callers can catch the family with one check. */
|
|
@@ -117,4 +117,4 @@ export declare function serialise(doc: Entry | Manifest | Crosswalk): string;
|
|
|
117
117
|
*/
|
|
118
118
|
export declare function validateDataset(dataset: Dataset): SyntaxIssue[];
|
|
119
119
|
//#endregion
|
|
120
|
-
export { AliasSchema, type Archive, type ArchiveMember, ArchiveMemberSchema, ArchiveSchema, type Catalogue, type CatalogueIndex, CatalogueIndexSchema, type Category, type CategoryId, CategoryIdSchema, type CategoryTarget, type CategoryTargets, type Citation, CitationSchema, type Collection, type CollectionArchive, CollectionArchiveSchema, type CollectionTarget, ColumnNameSchema, type CountedKey, type CrosswalkReference, CrosswalkReferenceSchema, type Dataset, type DatasetQuery, type DocumentArchive, type Entry, type EntryNames, EntrySchema, type GraphEdge, GraphEdgeSchema, type GraphNode, GraphNodeSchema, type GraphV1, GraphV1Schema, HttpUrlSchema, IdSchema, type Instance, type JsonScalar, JsonScalarSchema, type Licence, LicenceSchema, type Lineage, LineageSchema, type Manifest, ManifestSchema, type Namespace, type NamespaceNode, NamespaceSchema, type
|
|
120
|
+
export { AliasSchema, type Archive, type ArchiveMember, ArchiveMemberSchema, ArchiveSchema, type Catalogue, type CatalogueIndex, CatalogueIndexSchema, type Category, type CategoryId, CategoryIdSchema, type CategoryTarget, type CategoryTargets, type Citation, CitationSchema, type Collection, type CollectionArchive, CollectionArchiveSchema, type CollectionTarget, ColumnNameSchema, type CountedKey, type CrosswalkReference, CrosswalkReferenceSchema, type Dataset, type DatasetQuery, type DocumentArchive, type Entry, type EntryNames, EntrySchema, type GraphEdge, GraphEdgeSchema, type GraphNode, GraphNodeSchema, type GraphV1, GraphV1Schema, HttpUrlSchema, IdSchema, type Instance, type JsonScalar, JsonScalarSchema, type Licence, LicenceSchema, type Lineage, LineageSchema, type Manifest, ManifestSchema, type Namespace, type NamespaceNode, NamespaceSchema, type Parser, ParserSchema, RESERVED_META_KEYS, type Recipe, RecipeSchema, type RecipeStep, RelativePathSchema, type SegmentAliases, SemVerSchema, type Snapshot, SnapshotSchema, type Source, SourceSchema, SubjectSchema, type SyntaxIssue, type Task, TaskSchema, type TasksV1, TasksV1Schema, WaybackTimestampSchema, collectionOf, countTarget, countedKeys, createCatalogue, getCategory, getCollectionTarget, getTarget, kindOf, listCategories, parseEntry, parseManifest, waybackUrl };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as ArchiveError, A as WaybackTimestampSchema, B as countedKeys, C as ParserSchema, D as SnapshotSchema, E as RelativePathSchema, F as groupsOf, G as listCategories, H as getCollectionTarget, I as namesOf, J as collectionOf, K as TaskSchema, M as toIssues, N as waybackUrl, O as SourceSchema, P as NAME_SEPARATOR, Q as JsonScalarSchema, R as CategoryIdSchema, S as NamespaceSchema, T as RecipeSchema, U as getTarget, V as getCategory, W as kindOf, X as GraphNodeSchema, Y as GraphEdgeSchema, Z as GraphV1Schema, _ as CrosswalkReferenceSchema, a as CatalogueIndexSchema, at as RecipeError, b as IdSchema, c as ManifestSchema, d as AliasSchema, et as CatalogueSyntaxError, f as ArchiveMemberSchema, g as ColumnNameSchema, h as CollectionArchiveSchema, i as listNamespaces, it as NativeParseError, j as parseEntry, k as SubjectSchema, l as SemVerSchema, m as CitationSchema, n as getManifest, nt as DatasetNotFoundError, o as createCatalogue, ot as UnknownCategoryError, p as ArchiveSchema, q as TasksV1Schema, r as listDatasets, rt as KeepsetError, s as LineageSchema, t as getDataset, tt as DatasetAmbiguousError, u as parseManifest, v as EntrySchema, w as RESERVED_META_KEYS, x as LicenceSchema, y as HttpUrlSchema, z as countTarget } from "./bundled-Ql23qj97.js";
|
|
2
2
|
import { validateCrosswalk } from "twindex";
|
|
3
3
|
//#region src/serialise.ts
|
|
4
4
|
/**
|
|
@@ -57,4 +57,4 @@ function validateDataset(dataset) {
|
|
|
57
57
|
return issues;
|
|
58
58
|
}
|
|
59
59
|
//#endregion
|
|
60
|
-
export { AliasSchema, ArchiveError, ArchiveMemberSchema, ArchiveSchema, CatalogueIndexSchema, CatalogueSyntaxError, CategoryIdSchema, CitationSchema, CollectionArchiveSchema, ColumnNameSchema, CrosswalkReferenceSchema, DatasetAmbiguousError, DatasetNotFoundError, EntrySchema, GraphEdgeSchema, GraphNodeSchema, GraphV1Schema, HttpUrlSchema, IdSchema, JsonScalarSchema, KeepsetError, LicenceSchema, LineageSchema, ManifestSchema, NAME_SEPARATOR, NamespaceSchema, NativeParseError,
|
|
60
|
+
export { AliasSchema, ArchiveError, ArchiveMemberSchema, ArchiveSchema, CatalogueIndexSchema, CatalogueSyntaxError, CategoryIdSchema, CitationSchema, CollectionArchiveSchema, ColumnNameSchema, CrosswalkReferenceSchema, DatasetAmbiguousError, DatasetNotFoundError, EntrySchema, GraphEdgeSchema, GraphNodeSchema, GraphV1Schema, HttpUrlSchema, IdSchema, JsonScalarSchema, KeepsetError, LicenceSchema, LineageSchema, ManifestSchema, NAME_SEPARATOR, NamespaceSchema, NativeParseError, ParserSchema, RESERVED_META_KEYS, RecipeError, RecipeSchema, RelativePathSchema, SemVerSchema, SnapshotSchema, SourceSchema, SubjectSchema, TaskSchema, TasksV1Schema, UnknownCategoryError, WaybackTimestampSchema, collectionOf, countTarget, countedKeys, createCatalogue, getCategory, getCollectionTarget, getDataset, getManifest, getTarget, groupsOf, kindOf, listCategories, listDatasets, listNamespaces, namesOf, parseEntry, parseManifest, serialise, validateDataset, waybackUrl };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as Dataset, gt as Snapshot, i as CategoryTarget, nt as Entry, o as CollectionTarget, vt as Source } from "../categories-
|
|
1
|
+
import { N as Dataset, gt as Snapshot, i as CategoryTarget, nt as Entry, o as CollectionTarget, vt as Source } from "../categories-DC0uTkzn.js";
|
|
2
2
|
//#region src/node/fetch-dataset.d.ts
|
|
3
3
|
/** The network port a recipe downloads through: `downloadRaw` by default, which returns the bytes exactly as served, or a stand-in under test. */
|
|
4
4
|
export type FetchPort = (url: string, init: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ as ArchiveError, H as getCollectionTarget, L as getOwn, U as getTarget, at as RecipeError, it as NativeParseError, rt as KeepsetError, t as getDataset, z as countTarget } from "../bundled-Ql23qj97.js";
|
|
2
2
|
import { RoundTripMismatchError, assertRoundTrip, encode } from "twindex";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
@@ -1230,7 +1230,7 @@ function required(header, key) {
|
|
|
1230
1230
|
return value;
|
|
1231
1231
|
}
|
|
1232
1232
|
/**
|
|
1233
|
-
* Parses a TSPLIB style orienteering instance of type `POP` (probabilistic orienteering, Angelelli and others) or `COP` (clustered orienteering), in the layout TSPLIB95 (Reinelt) defines: `KEY : value` header lines and bare keyword sections. The nodes are 1 to `DIMENSION`. The planar weight types keep their coordinates as `x` and `y` and `GEO` converts them to `lat` and `lon`; an `EXPLICIT` file has no coordinates, so its nodes have only the prize data. A `POP` file's `NODE_PRIZE_PROBABILITY_SECTION` gives each node its prize and probability. A `COP` file has no prize on a node: its prizes belong to sets of nodes that may overlap, so each node lists the sets it is in under `clusters` and the sets' prizes are the `setPrizes` metadata, and nothing is divided among the members. The weight matrix is not read, as
|
|
1233
|
+
* Parses a TSPLIB style orienteering instance of type `POP` (probabilistic orienteering, Angelelli and others) or `COP` (clustered orienteering), in the layout TSPLIB95 (Reinelt) defines: `KEY : value` header lines and bare keyword sections. The nodes are 1 to `DIMENSION`. The planar weight types keep their coordinates as `x` and `y` and `GEO` converts them to `lat` and `lon`; an `EXPLICIT` file has no coordinates, so its nodes have only the prize data. A `POP` file's `NODE_PRIZE_PROBABILITY_SECTION` gives each node its prize and probability. A `COP` file has no prize on a node: its prizes belong to sets of nodes that may overlap, so each node lists the sets it is in under `clusters` and the sets' prizes are the `setPrizes` metadata, and nothing is divided among the members. The weight matrix is not read, as tasks/v1 has no arcs.
|
|
1234
1234
|
* @param text - The file text.
|
|
1235
1235
|
* @returns The instance: its header values as `meta` and its nodes in id order.
|
|
1236
1236
|
* @throws NativeParseError naming the line for an unsupported type or weight type, a missing key or section, a node id outside 1 to `DIMENSION` or missing from a section that must cover every node, or a set that names a node outside that range.
|
|
@@ -1450,7 +1450,7 @@ function sectionsOf(rows) {
|
|
|
1450
1450
|
};
|
|
1451
1451
|
}
|
|
1452
1452
|
/**
|
|
1453
|
-
* Parses a VeRoLog Solver Challenge 2019 instance (the technician and truck routing problem of ORTEC's challenge): `KEY = value` header lines, then the sections MACHINES (id, size, idle penalty), LOCATIONS (id, x, y), REQUESTS (id, location, first day, last day, machine, amount) and TECHNICIANS (id, home location, maximum distance per day, maximum installations per day, then a 0 or 1 flag per machine for the machines the technician can install). Location 1 is the depot. The nodes are the depot, then one node per request at its location's position, carrying the request's day window, machine and amount; the machines and technicians stay unread beyond the technician count, as
|
|
1453
|
+
* Parses a VeRoLog Solver Challenge 2019 instance (the technician and truck routing problem of ORTEC's challenge): `KEY = value` header lines, then the sections MACHINES (id, size, idle penalty), LOCATIONS (id, x, y), REQUESTS (id, location, first day, last day, machine, amount) and TECHNICIANS (id, home location, maximum distance per day, maximum installations per day, then a 0 or 1 flag per machine for the machines the technician can install). Location 1 is the depot. The nodes are the depot, then one node per request at its location's position, carrying the request's day window, machine and amount; the machines and technicians stay unread beyond the technician count, as tasks/v1 has no place for a fleet. The days are day numbers, not times, and distances are the integer coordinates' own units.
|
|
1454
1454
|
* @param text - The file text.
|
|
1455
1455
|
* @returns The instance: its header values as `meta` and its nodes.
|
|
1456
1456
|
* @throws NativeParseError naming the line for a header line that is missing, out of order or not of its type, a section that is out of order or short, a row whose ids or length are wrong, or a request whose location, machine or days are outside the file's.
|
|
@@ -1776,7 +1776,7 @@ function listOf(ids) {
|
|
|
1776
1776
|
return distinct.length === 0 ? null : distinct.join(",");
|
|
1777
1777
|
}
|
|
1778
1778
|
/**
|
|
1779
|
-
* Parses a VRP-REP instance (the XML format of the VRP-REP repository) in the layout its technician routing instances use: an `instance` with `info`, a `network` of `node` elements with `cx` and `cy`, a `fleet` of vehicle profiles that each depart from a node, `requests` that each sit at a node and name the skill and resources they need, and `drivers` whose profiles list the skills a vehicle type's driver has. Each node becomes a row with its position and `type`; a node's request skills and resources, and the skills of the drivers whose vehicles depart from it, are attached to it. Fleet costs and resource stocks are not read, as
|
|
1779
|
+
* Parses a VRP-REP instance (the XML format of the VRP-REP repository) in the layout its technician routing instances use: an `instance` with `info`, a `network` of `node` elements with `cx` and `cy`, a `fleet` of vehicle profiles that each depart from a node, `requests` that each sit at a node and name the skill and resources they need, and `drivers` whose profiles list the skills a vehicle type's driver has. Each node becomes a row with its position and `type`; a node's request skills and resources, and the skills of the drivers whose vehicles depart from it, are attached to it. Fleet costs and resource stocks are not read, as tasks/v1 has no place for them.
|
|
1780
1780
|
* @param text - The file text.
|
|
1781
1781
|
* @returns The instance: its dataset and name as `meta`, and its nodes in document order.
|
|
1782
1782
|
* @throws NativeParseError for malformed XML, a root that is not `instance`, a missing element or attribute, a coordinate that is not a number, a repeated node id, or a request or vehicle that names a node the network lacks.
|
package/dist-cli/keepset.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { KeepsetError, NAME_SEPARATOR, countTarget, getDataset, listDatasets, li
|
|
|
4
4
|
import { fetchDataset, roundTripDataset } from "keepset/node";
|
|
5
5
|
import { parseArgs } from "node:util";
|
|
6
6
|
//#region package.json
|
|
7
|
-
var version = "0.
|
|
7
|
+
var version = "0.29.1";
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region cli/run.ts
|
|
10
10
|
/**
|
|
@@ -19,11 +19,11 @@ function selectorText(selector) {
|
|
|
19
19
|
const usage = `Usage: keepset <command> [options]
|
|
20
20
|
|
|
21
21
|
Commands:
|
|
22
|
-
search [text] [--kind <kind>] [--domain <domain>] [--
|
|
23
|
-
[--category <id>] [--json]
|
|
22
|
+
search [text] [--kind <kind>] [--domain <domain>] [--subject <subject>]
|
|
23
|
+
[--namespace <path>] [--category <id>] [--json]
|
|
24
24
|
list the datasets whose id, alias, namespace, name,
|
|
25
|
-
description, domain or tags contain the text,
|
|
26
|
-
kind, domain, namespace (and every namespace beneath it,
|
|
25
|
+
description, domain, subjects or tags contain the text,
|
|
26
|
+
filtered by kind, domain, subject, namespace (and every namespace beneath it,
|
|
27
27
|
segment aliases allowed) or category
|
|
28
28
|
namespaces [path] [--json]
|
|
29
29
|
list the namespaces directly beneath a path, or the
|
|
@@ -61,6 +61,7 @@ function parseCommandLine(args) {
|
|
|
61
61
|
options: {
|
|
62
62
|
kind: { type: "string" },
|
|
63
63
|
domain: { type: "string" },
|
|
64
|
+
subject: { type: "string" },
|
|
64
65
|
namespace: { type: "string" },
|
|
65
66
|
category: { type: "string" },
|
|
66
67
|
json: { type: "boolean" },
|
|
@@ -112,6 +113,7 @@ function formatShow(dataset) {
|
|
|
112
113
|
lines.push("", `category: ${entry.category} (kind ${dataset.kind})`, `catalogue: ${dataset.catalogue.id} ${dataset.catalogue.version}`);
|
|
113
114
|
if (entry.namespace !== void 0) lines.push(`namespace: ${entry.namespace.join(NAME_SEPARATOR)}`);
|
|
114
115
|
if (entry.aliases !== void 0) lines.push(`aliases: ${entry.aliases.join(", ")}`);
|
|
116
|
+
if (entry.subjects !== void 0) lines.push(`subjects: ${entry.subjects.join(", ")}`);
|
|
115
117
|
if (entry.domain !== void 0) lines.push(`domain: ${entry.domain}`);
|
|
116
118
|
if (entry.tags.length > 0) lines.push(`tags: ${entry.tags.join(", ")}`);
|
|
117
119
|
const { licence } = entry;
|
|
@@ -198,6 +200,7 @@ async function run(args, library, io) {
|
|
|
198
200
|
...text === void 0 ? {} : { text },
|
|
199
201
|
...values.kind === void 0 ? {} : { kind: values.kind },
|
|
200
202
|
...values.domain === void 0 ? {} : { domain: values.domain },
|
|
203
|
+
...values.subject === void 0 ? {} : { subject: values.subject },
|
|
201
204
|
...values.namespace === void 0 ? {} : { namespace: values.namespace },
|
|
202
205
|
...values.category === void 0 ? {} : { category: values.category }
|
|
203
206
|
};
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$defs":{"Crosswalk":{"$ref":"https://cdn.jsdelivr.net/npm/twindex@0.1.4/schemas/twindex.schema.json"},"Entry":{"additionalProperties":false,"properties":{"aliases":{"items":{"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*(?:\\/[A-Za-z0-9][A-Za-z0-9._-]*)*$","type":"string"},"minItems":1,"type":"array"},"category":{"enum":["graph/v1","or/v1"],"type":"string"},"citations":{"items":{"additionalProperties":false,"properties":{"doi":{"pattern":"^10\\.\\d{4,9}\\/\\S+$","type":"string"},"text":{"minLength":1,"type":"string"},"url":{"format":"uri","type":"string"}},"required":["text"],"type":"object"},"type":"array"},"crosswalk":{"anyOf":[{"$ref":"#/$defs/Crosswalk"},{"additionalProperties":false,"properties":{"file":{"type":"string"}},"required":["file"],"type":"object"}]},"description":{"minLength":1,"type":"string"},"domain":{"minLength":1,"type":"string"},"expectedCounts":{"additionalProperties":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"propertyNames":{"pattern":"^[A-Za-z][A-Za-z0-9]*$","type":"string"},"type":"object"},"id":{"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"},"licence":{"oneOf":[{"additionalProperties":false,"properties":{"id":{"pattern":"^[A-Za-z0-9][A-Za-z0-9.+-]*$","type":"string"},"kind":{"const":"spdx","type":"string"}},"required":["kind","id"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"custom","type":"string"},"name":{"minLength":1,"type":"string"},"url":{"format":"uri","type":"string"}},"required":["kind","name","url"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"unrecorded","type":"string"}},"required":["kind"],"type":"object"}]},"name":{"minLength":1,"type":"string"},"namespace":{"items":{"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"},"minItems":1,"type":"array"},"properties":{"additionalProperties":{"type":["string","number","boolean","null"]},"propertyNames":{"pattern":"^[A-Za-z][A-Za-z0-9]*$","type":"string"},"type":"object"},"recipe":{"oneOf":[{"additionalProperties":false,"properties":{"archive":{"anyOf":[{"additionalProperties":false,"properties":{"kind":{"const":"none","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"gzip","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"enum":["zip","tar","tar.gz"],"type":"string"},"member":{"anyOf":[{"additionalProperties":false,"properties":{"path":{"type":"string"}},"required":["path"],"type":"object"},{"additionalProperties":false,"properties":{"extensions":{"items":{"pattern":"^\\.[A-Za-z0-9][A-Za-z0-9.]*$","type":"string"},"minItems":1,"type":"array"}},"required":["extensions"],"type":"object"},{"additionalProperties":false,"properties":{"pattern":{"minLength":1,"type":"string"}},"required":["pattern"],"type":"object"}]}},"required":["kind","member"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"enum":["zip","tar","tar.gz"],"type":"string"},"members":{"anyOf":[{"additionalProperties":false,"properties":{"path":{"type":"string"}},"required":["path"],"type":"object"},{"additionalProperties":false,"properties":{"extensions":{"items":{"pattern":"^\\.[A-Za-z0-9][A-Za-z0-9.]*$","type":"string"},"minItems":1,"type":"array"}},"required":["extensions"],"type":"object"},{"additionalProperties":false,"properties":{"pattern":{"minLength":1,"type":"string"}},"required":["pattern"],"type":"object"}]}},"required":["kind","members"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"xlsx","type":"string"},"sheet":{"minLength":1,"type":"string"}},"required":["kind","sheet"],"type":"object"}]},"paging":{"oneOf":[{"additionalProperties":false,"properties":{"kind":{"const":"arcgis-query","type":"string"},"orderBy":{"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","type":"string"}},"required":["kind","orderBy"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"socrata-resource","type":"string"},"pageSize":{"maximum":9007199254740991,"minimum":1,"type":"integer"}},"required":["kind","pageSize"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"ckan-datastore","type":"string"},"pageSize":{"maximum":9007199254740991,"minimum":1,"type":"integer"}},"required":["kind","pageSize"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"openfema","type":"string"},"pageSize":{"maximum":9007199254740991,"minimum":1,"type":"integer"}},"required":["kind","pageSize"],"type":"object"}]},"parser":{"oneOf":[{"additionalProperties":false,"properties":{"commentPrefixes":{"items":{"minLength":1,"type":"string"},"type":"array"},"delimiter":{"enum":["detect","whitespace","tab","comma","space"],"type":"string"},"encoding":{"enum":["utf-8","latin1"],"type":"string"},"format":{"const":"edge-list","type":"string"},"skipLines":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"sourceColumn":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"targetColumn":{"maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["format","encoding","delimiter","skipLines","commentPrefixes","sourceColumn","targetColumn"],"type":"object"},{"additionalProperties":false,"properties":{"encoding":{"enum":["utf-8","latin1"],"type":"string"},"format":{"const":"matrix-market","type":"string"}},"required":["format","encoding"],"type":"object"},{"additionalProperties":false,"properties":{"encoding":{"enum":["utf-8","latin1"],"type":"string"},"format":{"const":"gml","type":"string"}},"required":["format","encoding"],"type":"object"},{"additionalProperties":false,"properties":{"encoding":{"enum":["utf-8","latin1"],"type":"string"},"format":{"const":"pajek","type":"string"}},"required":["format","encoding"],"type":"object"},{"additionalProperties":false,"properties":{"encoding":{"enum":["utf-8","latin1"],"type":"string"},"format":{"const":"customer-points","type":"string"}},"required":["format","encoding"],"type":"object"},{"additionalProperties":false,"properties":{"encoding":{"enum":["utf-8","latin1"],"type":"string"},"format":{"const":"solomon","type":"string"}},"required":["format","encoding"],"type":"object"},{"additionalProperties":false,"properties":{"encoding":{"enum":["utf-8","latin1"],"type":"string"},"format":{"const":"top","type":"string"}},"required":["format","encoding"],"type":"object"},{"additionalProperties":false,"properties":{"encoding":{"enum":["utf-8","latin1"],"type":"string"},"format":{"const":"toptw","type":"string"}},"required":["format","encoding"],"type":"object"},{"additionalProperties":false,"properties":{"encoding":{"enum":["utf-8","latin1"],"type":"string"},"format":{"const":"tsplib","type":"string"}},"required":["format","encoding"],"type":"object"},{"additionalProperties":false,"properties":{"encoding":{"const":"utf-8","type":"string"},"format":{"const":"verolog-2019","type":"string"}},"required":["format","encoding"],"type":"object"},{"additionalProperties":false,"properties":{"encoding":{"const":"utf-8","type":"string"},"format":{"const":"vrp-rep","type":"string"}},"required":["format","encoding"],"type":"object"},{"additionalProperties":false,"properties":{"columns":{"items":{"pattern":"^[A-Za-z](?:[A-Za-z0-9_]*[A-Za-z0-9])?$","type":"string"},"type":"array"},"delimiter":{"enum":["comma","tab","semicolon"],"type":"string"},"encoding":{"enum":["utf-8","latin1"],"type":"string"},"format":{"const":"csv-table","type":"string"},"idColumn":{"anyOf":[{"pattern":"^[A-Za-z](?:[A-Za-z0-9_]*[A-Za-z0-9])?$","type":"string"},{"type":"null"}]},"nullValues":{"items":{"minLength":1,"type":"string"},"type":"array"},"numericColumns":{"items":{"additionalProperties":false,"properties":{"column":{"pattern":"^[A-Za-z](?:[A-Za-z0-9_]*[A-Za-z0-9])?$","type":"string"},"factor":{"exclusiveMinimum":0,"type":"number"}},"required":["column","factor"],"type":"object"},"type":"array"},"skipLines":{"maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["format","encoding","delimiter","skipLines","idColumn","numericColumns"],"type":"object"},{"additionalProperties":false,"properties":{"columns":{"items":{"pattern":"^[A-Za-z](?:[A-Za-z0-9_]*[A-Za-z0-9])?$","type":"string"},"minItems":1,"type":"array"},"dateColumns":{"items":{"pattern":"^[A-Za-z](?:[A-Za-z0-9_]*[A-Za-z0-9])?$","type":"string"},"type":"array"},"encoding":{"const":"utf-8","type":"string"},"format":{"const":"geojson","type":"string"},"idColumn":{"anyOf":[{"pattern":"^[A-Za-z](?:[A-Za-z0-9_]*[A-Za-z0-9])?$","type":"string"},{"type":"null"}]},"numericColumns":{"items":{"additionalProperties":false,"properties":{"column":{"pattern":"^[A-Za-z](?:[A-Za-z0-9_]*[A-Za-z0-9])?$","type":"string"},"factor":{"exclusiveMinimum":0,"type":"number"}},"required":["column","factor"],"type":"object"},"type":"array"}},"required":["format","encoding","idColumn","numericColumns","dateColumns","columns"],"type":"object"}]},"source":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"status":{"const":"fetchable","type":"string"}},"required":["status","source","archive","parser"],"type":"object"},{"additionalProperties":false,"properties":{"reason":{"minLength":1,"type":"string"},"status":{"const":"not-fetchable","type":"string"}},"required":["status","reason"],"type":"object"}]},"sources":{"items":{"additionalProperties":false,"properties":{"retrieved":{"format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","type":"string"},"snapshot":{"additionalProperties":false,"properties":{"timestamp":{"pattern":"^\\d{8}(?:\\d{6})?$","type":"string"},"url":{"format":"uri","type":"string"}},"required":["url","timestamp"],"type":"object"},"status":{"enum":["live","dead"],"type":"string"},"url":{"format":"uri","type":"string"}},"required":["url","retrieved","status"],"type":"object"},"minItems":1,"type":"array"},"tags":{"items":{"minLength":1,"type":"string"},"type":"array"}},"required":["id","name","tags","category","sources","licence","citations","recipe","crosswalk","expectedCounts","properties"],"type":"object"}},"$id":"https://cdn.jsdelivr.net/npm/keepset@0.28.1/schemas/entry.schema.json","$ref":"#/$defs/Entry","$schema":"https://json-schema.org/draft/2020-12/schema"}
|
|
1
|
+
{"$defs":{"Crosswalk":{"$ref":"https://cdn.jsdelivr.net/npm/twindex@0.1.4/schemas/twindex.schema.json"},"Entry":{"additionalProperties":false,"properties":{"aliases":{"items":{"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*(?:\\/[A-Za-z0-9][A-Za-z0-9._-]*)*$","type":"string"},"minItems":1,"type":"array"},"category":{"enum":["graph/v1","tasks/v1"],"type":"string"},"citations":{"items":{"additionalProperties":false,"properties":{"doi":{"pattern":"^10\\.\\d{4,9}\\/\\S+$","type":"string"},"text":{"minLength":1,"type":"string"},"url":{"format":"uri","type":"string"}},"required":["text"],"type":"object"},"type":"array"},"crosswalk":{"anyOf":[{"$ref":"#/$defs/Crosswalk"},{"additionalProperties":false,"properties":{"file":{"type":"string"}},"required":["file"],"type":"object"}]},"description":{"minLength":1,"type":"string"},"domain":{"minLength":1,"type":"string"},"expectedCounts":{"additionalProperties":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"propertyNames":{"pattern":"^[A-Za-z][A-Za-z0-9]*$","type":"string"},"type":"object"},"id":{"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"},"licence":{"oneOf":[{"additionalProperties":false,"properties":{"id":{"pattern":"^[A-Za-z0-9][A-Za-z0-9.+-]*$","type":"string"},"kind":{"const":"spdx","type":"string"}},"required":["kind","id"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"custom","type":"string"},"name":{"minLength":1,"type":"string"},"url":{"format":"uri","type":"string"}},"required":["kind","name","url"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"unrecorded","type":"string"}},"required":["kind"],"type":"object"}]},"name":{"minLength":1,"type":"string"},"namespace":{"items":{"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"},"minItems":1,"type":"array"},"properties":{"additionalProperties":{"type":["string","number","boolean","null"]},"propertyNames":{"pattern":"^[A-Za-z][A-Za-z0-9]*$","type":"string"},"type":"object"},"recipe":{"oneOf":[{"additionalProperties":false,"properties":{"archive":{"anyOf":[{"additionalProperties":false,"properties":{"kind":{"const":"none","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"gzip","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"enum":["zip","tar","tar.gz"],"type":"string"},"member":{"anyOf":[{"additionalProperties":false,"properties":{"path":{"type":"string"}},"required":["path"],"type":"object"},{"additionalProperties":false,"properties":{"extensions":{"items":{"pattern":"^\\.[A-Za-z0-9][A-Za-z0-9.]*$","type":"string"},"minItems":1,"type":"array"}},"required":["extensions"],"type":"object"},{"additionalProperties":false,"properties":{"pattern":{"minLength":1,"type":"string"}},"required":["pattern"],"type":"object"}]}},"required":["kind","member"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"enum":["zip","tar","tar.gz"],"type":"string"},"members":{"anyOf":[{"additionalProperties":false,"properties":{"path":{"type":"string"}},"required":["path"],"type":"object"},{"additionalProperties":false,"properties":{"extensions":{"items":{"pattern":"^\\.[A-Za-z0-9][A-Za-z0-9.]*$","type":"string"},"minItems":1,"type":"array"}},"required":["extensions"],"type":"object"},{"additionalProperties":false,"properties":{"pattern":{"minLength":1,"type":"string"}},"required":["pattern"],"type":"object"}]}},"required":["kind","members"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"xlsx","type":"string"},"sheet":{"minLength":1,"type":"string"}},"required":["kind","sheet"],"type":"object"}]},"paging":{"oneOf":[{"additionalProperties":false,"properties":{"kind":{"const":"arcgis-query","type":"string"},"orderBy":{"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","type":"string"}},"required":["kind","orderBy"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"socrata-resource","type":"string"},"pageSize":{"maximum":9007199254740991,"minimum":1,"type":"integer"}},"required":["kind","pageSize"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"ckan-datastore","type":"string"},"pageSize":{"maximum":9007199254740991,"minimum":1,"type":"integer"}},"required":["kind","pageSize"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"openfema","type":"string"},"pageSize":{"maximum":9007199254740991,"minimum":1,"type":"integer"}},"required":["kind","pageSize"],"type":"object"}]},"parser":{"oneOf":[{"additionalProperties":false,"properties":{"commentPrefixes":{"items":{"minLength":1,"type":"string"},"type":"array"},"delimiter":{"enum":["detect","whitespace","tab","comma","space"],"type":"string"},"encoding":{"enum":["utf-8","latin1"],"type":"string"},"format":{"const":"edge-list","type":"string"},"skipLines":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"sourceColumn":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"targetColumn":{"maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["format","encoding","delimiter","skipLines","commentPrefixes","sourceColumn","targetColumn"],"type":"object"},{"additionalProperties":false,"properties":{"encoding":{"enum":["utf-8","latin1"],"type":"string"},"format":{"const":"matrix-market","type":"string"}},"required":["format","encoding"],"type":"object"},{"additionalProperties":false,"properties":{"encoding":{"enum":["utf-8","latin1"],"type":"string"},"format":{"const":"gml","type":"string"}},"required":["format","encoding"],"type":"object"},{"additionalProperties":false,"properties":{"encoding":{"enum":["utf-8","latin1"],"type":"string"},"format":{"const":"pajek","type":"string"}},"required":["format","encoding"],"type":"object"},{"additionalProperties":false,"properties":{"encoding":{"enum":["utf-8","latin1"],"type":"string"},"format":{"const":"customer-points","type":"string"}},"required":["format","encoding"],"type":"object"},{"additionalProperties":false,"properties":{"encoding":{"enum":["utf-8","latin1"],"type":"string"},"format":{"const":"solomon","type":"string"}},"required":["format","encoding"],"type":"object"},{"additionalProperties":false,"properties":{"encoding":{"enum":["utf-8","latin1"],"type":"string"},"format":{"const":"top","type":"string"}},"required":["format","encoding"],"type":"object"},{"additionalProperties":false,"properties":{"encoding":{"enum":["utf-8","latin1"],"type":"string"},"format":{"const":"toptw","type":"string"}},"required":["format","encoding"],"type":"object"},{"additionalProperties":false,"properties":{"encoding":{"enum":["utf-8","latin1"],"type":"string"},"format":{"const":"tsplib","type":"string"}},"required":["format","encoding"],"type":"object"},{"additionalProperties":false,"properties":{"encoding":{"const":"utf-8","type":"string"},"format":{"const":"verolog-2019","type":"string"}},"required":["format","encoding"],"type":"object"},{"additionalProperties":false,"properties":{"encoding":{"const":"utf-8","type":"string"},"format":{"const":"vrp-rep","type":"string"}},"required":["format","encoding"],"type":"object"},{"additionalProperties":false,"properties":{"columns":{"items":{"pattern":"^[A-Za-z](?:[A-Za-z0-9_]*[A-Za-z0-9])?$","type":"string"},"type":"array"},"delimiter":{"enum":["comma","tab","semicolon"],"type":"string"},"encoding":{"enum":["utf-8","latin1"],"type":"string"},"format":{"const":"csv-table","type":"string"},"idColumn":{"anyOf":[{"pattern":"^[A-Za-z](?:[A-Za-z0-9_]*[A-Za-z0-9])?$","type":"string"},{"type":"null"}]},"nullValues":{"items":{"minLength":1,"type":"string"},"type":"array"},"numericColumns":{"items":{"additionalProperties":false,"properties":{"column":{"pattern":"^[A-Za-z](?:[A-Za-z0-9_]*[A-Za-z0-9])?$","type":"string"},"factor":{"exclusiveMinimum":0,"type":"number"}},"required":["column","factor"],"type":"object"},"type":"array"},"skipLines":{"maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["format","encoding","delimiter","skipLines","idColumn","numericColumns"],"type":"object"},{"additionalProperties":false,"properties":{"columns":{"items":{"pattern":"^[A-Za-z](?:[A-Za-z0-9_]*[A-Za-z0-9])?$","type":"string"},"minItems":1,"type":"array"},"dateColumns":{"items":{"pattern":"^[A-Za-z](?:[A-Za-z0-9_]*[A-Za-z0-9])?$","type":"string"},"type":"array"},"encoding":{"const":"utf-8","type":"string"},"format":{"const":"geojson","type":"string"},"idColumn":{"anyOf":[{"pattern":"^[A-Za-z](?:[A-Za-z0-9_]*[A-Za-z0-9])?$","type":"string"},{"type":"null"}]},"numericColumns":{"items":{"additionalProperties":false,"properties":{"column":{"pattern":"^[A-Za-z](?:[A-Za-z0-9_]*[A-Za-z0-9])?$","type":"string"},"factor":{"exclusiveMinimum":0,"type":"number"}},"required":["column","factor"],"type":"object"},"type":"array"}},"required":["format","encoding","idColumn","numericColumns","dateColumns","columns"],"type":"object"}]},"source":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"status":{"const":"fetchable","type":"string"}},"required":["status","source","archive","parser"],"type":"object"},{"additionalProperties":false,"properties":{"reason":{"minLength":1,"type":"string"},"status":{"const":"not-fetchable","type":"string"}},"required":["status","reason"],"type":"object"}]},"sources":{"items":{"additionalProperties":false,"properties":{"retrieved":{"format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","type":"string"},"snapshot":{"additionalProperties":false,"properties":{"timestamp":{"pattern":"^\\d{8}(?:\\d{6})?$","type":"string"},"url":{"format":"uri","type":"string"}},"required":["url","timestamp"],"type":"object"},"status":{"enum":["live","dead"],"type":"string"},"url":{"format":"uri","type":"string"}},"required":["url","retrieved","status"],"type":"object"},"minItems":1,"type":"array"},"subjects":{"items":{"pattern":"^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$","type":"string"},"minItems":1,"type":"array"},"tags":{"items":{"minLength":1,"type":"string"},"type":"array"}},"required":["id","name","tags","category","sources","licence","citations","recipe","crosswalk","expectedCounts","properties"],"type":"object"}},"$id":"https://cdn.jsdelivr.net/npm/keepset@0.29.1/schemas/entry.schema.json","$ref":"#/$defs/Entry","$schema":"https://json-schema.org/draft/2020-12/schema"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$defs":{"Manifest":{"additionalProperties":false,"properties":{"description":{"minLength":1,"type":"string"},"id":{"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"},"lineage":{"additionalProperties":false,"properties":{"catalogue":{"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"},"repository":{"format":"uri","type":"string"},"version":{"pattern":"^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$","type":"string"}},"required":["catalogue","version","repository"],"type":"object"},"name":{"minLength":1,"type":"string"},"namespaceAliases":{"additionalProperties":{"items":{"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"},"minItems":1,"type":"array"},"propertyNames":{"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"},"type":"object"},"repository":{"format":"uri","type":"string"},"version":{"pattern":"^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$","type":"string"}},"required":["id","name","description","version","repository"],"type":"object"}},"$id":"https://cdn.jsdelivr.net/npm/keepset@0.
|
|
1
|
+
{"$defs":{"Manifest":{"additionalProperties":false,"properties":{"description":{"minLength":1,"type":"string"},"id":{"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"},"lineage":{"additionalProperties":false,"properties":{"catalogue":{"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"},"repository":{"format":"uri","type":"string"},"version":{"pattern":"^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$","type":"string"}},"required":["catalogue","version","repository"],"type":"object"},"name":{"minLength":1,"type":"string"},"namespaceAliases":{"additionalProperties":{"items":{"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"},"minItems":1,"type":"array"},"propertyNames":{"pattern":"^[A-Za-z0-9][A-Za-z0-9._-]*$","type":"string"},"type":"object"},"repository":{"format":"uri","type":"string"},"version":{"pattern":"^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$","type":"string"}},"required":["id","name","description","version","repository"],"type":"object"}},"$id":"https://cdn.jsdelivr.net/npm/keepset@0.29.1/schemas/manifest.schema.json","$ref":"#/$defs/Manifest","$schema":"https://json-schema.org/draft/2020-12/schema"}
|