Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion data/pen-compat/HUION-pen-compat.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@
"GT1902",
"GT2701",
"GT2402",
"GT2702"
"GT2702",
"Q640M"
]
},
{
Expand All @@ -181,6 +182,13 @@
"GT156V2"
]
},
{
"Brand": "HUION",
"PenId": "PW600C",
"TabletIds": [
"KP1202"
]
},
{
"Brand": "HUION",
"PenId": "PW600L",
Expand Down
3 changes: 2 additions & 1 deletion data/pen-compat/UGEE-pen-compat.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"Brand": "UGEE",
"PenId": "PH12",
"TabletIds": [
"U1200"
"U1200",
"U1600"
]
}
]
Expand Down
12 changes: 12 additions & 0 deletions data/pen-compat/WACOM-pen-compat.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@
"DTH-A140"
]
},
{
"Brand": "WACOM",
"PenId": "FP-320",
"TabletIds": [
"DTF-720"
]
},
{
"Brand": "WACOM",
"PenId": "GP-110",
Expand Down Expand Up @@ -252,7 +259,9 @@
"DTH-135",
"DTH-167",
"DTH-172",
"DTH-2200",
"DTH-227",
"DTH-2400",
"DTH-246",
"DTH-271",
"DTK-1300",
Expand All @@ -269,6 +278,7 @@
"PTH-460",
"PTH-650",
"PTH-651",
"PTH-651SE",
"PTH-660",
"PTH-850",
"PTH-851",
Expand Down Expand Up @@ -336,6 +346,7 @@
"DTH-246",
"DTH-271",
"DTH-3220",
"DTH-W1320",
"DTH-W1321",
"DTH-W1620",
"DTH-W1621",
Expand Down Expand Up @@ -456,6 +467,7 @@
"CTH-461",
"CTH-470",
"CTH-480",
"CTH-660",
"CTH-661",
"CTH-670",
"CTH-680",
Expand Down
17 changes: 12 additions & 5 deletions data/pen-compat/XPPEN-pen-compat.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"CT1060",
"CT430",
"CT640",
"G640"
"G430S",
"G640",
"STAR03V2"
]
},
{
Expand All @@ -29,7 +31,8 @@
"Brand": "XPPEN",
"PenId": "P03",
"TabletIds": [
"DECO01"
"DECO01",
"STAR05"
]
},
{
Expand All @@ -39,15 +42,17 @@
"ARTIST15.6",
"DECO01V2",
"DECO01V3",
"DECO03"
"DECO03",
"G640SV2"
]
},
{
"Brand": "XPPEN",
"PenId": "P05D",
"TabletIds": [
"DECOMINI4",
"DECOMINI7"
"DECOMINI7",
"DECOMINI7V2"
]
},
{
Expand All @@ -62,7 +67,9 @@
"PenId": "P06",
"TabletIds": [
"ARTIST12",
"DECO02"
"DECO02",
"STAR06",
"STAR06C"
]
},
{
Expand Down
23 changes: 12 additions & 11 deletions data/tablets/WACOM-tablets.json
Original file line number Diff line number Diff line change
Expand Up @@ -1752,7 +1752,7 @@
"EntityId": "wacom.tablet.ctl4100wl",
"_id": "8e17d9b8-7a38-4c37-9add-6bdc82091525",
"_CreateDate": "2025-12-12T12:33:46.983Z",
"_ModifiedDate": "2026-10-02T16:41:18.000Z"
"_ModifiedDate": "2026-10-02T19:57:22.862Z"
},
"Model": {
"Brand": "WACOM",
Expand Down Expand Up @@ -1840,7 +1840,8 @@
},
"Density": "100",
"ReportRate": "133",
"Tilt": "0"
"Tilt": "0",
"Type": "PASSIVE_EMR"
},
"Physical": {
"Dimensions": {
Expand Down Expand Up @@ -4733,7 +4734,7 @@
"EntityId": "wacom.tablet.dth246",
"_id": "62cd9b73-c996-422b-93c4-4c128acdaf6e",
"_CreateDate": "2025-12-12T12:33:46.983Z",
"_ModifiedDate": "2026-10-02T17:46:31.000Z"
"_ModifiedDate": "2026-10-02T19:57:18.221Z"
},
"Model": {
"Brand": "WACOM",
Expand Down Expand Up @@ -4857,8 +4858,8 @@
},
"Physical": {
"Dimensions": {
"Width": 340,
"Height": 568,
"Width": 568,
"Height": 340,
"Depth": 21
},
"Weight": "5000",
Expand Down Expand Up @@ -6655,7 +6656,7 @@
"EntityId": "wacom.tablet.dtk168",
"_id": "fae638fa-e305-434a-a2a6-f6852ec8c02e",
"_CreateDate": "2025-12-12T12:33:46.983Z",
"_ModifiedDate": "2026-10-02T18:08:36.000Z"
"_ModifiedDate": "2026-10-02T19:57:21.120Z"
},
"Model": {
"Brand": "WACOM",
Expand Down Expand Up @@ -6767,8 +6768,8 @@
},
"Physical": {
"Dimensions": {
"Width": 259,
"Height": 384,
"Width": 384,
"Height": 259,
"Depth": 15
},
"Weight": "2000",
Expand Down Expand Up @@ -7381,7 +7382,7 @@
"EntityId": "wacom.tablet.dtk246",
"_id": "98f59bc7-4ba6-49f0-b3b2-4acafcffe64c",
"_CreateDate": "2025-12-12T12:33:46.983Z",
"_ModifiedDate": "2026-06-18T18:13:44.058Z"
"_ModifiedDate": "2026-10-02T19:57:19.680Z"
},
"Model": {
"Brand": "WACOM",
Expand Down Expand Up @@ -7454,8 +7455,8 @@
},
"Physical": {
"Dimensions": {
"Width": 340,
"Height": 568,
"Width": 568,
"Height": 340,
"Depth": 21
},
"Weight": "4800"
Expand Down
4 changes: 2 additions & 2 deletions data/version.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
"xppen.pen.pd04b": 2
}
},
"sourceDigest": "9a0850225955e89f0cd9325a54bd4198f3600d6223231e5793cb66e9dba83b6d",
"sourceDigest": "e914caa30753ecd0fdfcadcd6bb6d0ec6237b934b567a68e04d234b85e8e1352",
"bundles": [
{
"path": "tablets/APPLE-tablets.json",
Expand Down Expand Up @@ -163,7 +163,7 @@
},
{
"path": "tablets/WACOM-tablets.json",
"sha256": "0fb81a90cd349ca91ec8f221ad538888da45d5270c929da1b463337a79ea8a43",
"sha256": "21de51f4e044ec2e39ecf19b54a90b2e1a4901508678b688c8a58ad6b07eb406",
"count": 197
},
{
Expand Down
33 changes: 33 additions & 0 deletions lib/data-quality-included-pen.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,36 @@ describe("IncludedPen checks", () => {
]);
});
});

describe("IncludedPen vs pen-compat", () => {
function compatIssues(tabletIds: string[] | null) {
put("tablets/WACOM-tablets.json", {
DrawingTablets: [tablet({ ReleaseYear: "2016", IncludedPen: ["wacom.pen.kp504e"] })],
});
put("pens/WACOM-pens.json", {
Pens: [{ EntityId: "wacom.pen.kp504e", Brand: "WACOM", PenId: "KP-504E", ReleaseYear: "2016" }],
});
put("pen-compat/WACOM-pen-compat.json", {
PenCompat: tabletIds ? [{ Brand: "WACOM", PenId: "KP-504E", TabletIds: tabletIds }] : [],
});
return runDataQuality(dataDir)
.filter((i) => i.field === "PenCompat")
.map((i) => `${i.issue}: ${i.value}`);
}

it("accepts an included pen whose compat row lists the tablet", () => {
expect(compatIssues(["T0", "T1"])).toEqual([]);
});

it("reports an included pen whose compat row leaves the tablet out", () => {
expect(compatIssues(["T0"])).toEqual([
"ships a pen its pen-compat row doesn't list: wacom.pen.kp504e (add T1 to WACOM KP-504E)",
]);
});

it("reports an included pen with no compat row at all", () => {
expect(compatIssues(null)).toEqual([
"ships a pen its pen-compat row doesn't list: wacom.pen.kp504e (add T1 to WACOM KP-504E)",
]);
});
});
35 changes: 35 additions & 0 deletions lib/data-quality.ts
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,41 @@ function runCrossEntityChecks(dataDir: string): Issue[] {
}
}

// A pen a tablet ships with works with that tablet, so pen-compat must say
// so. Sixteen tablets shipped a pen their pen-compat row didn't list, and
// the pen pages showed those tablets as incompatible (DrawTabData #54).
const compatKeys = new Set<string>();
for (const { record } of penCompat) {
const brand = getString(record, "Brand");
const penId = getString(record, "PenId");
const tabletIds = (record as { TabletIds?: unknown }).TabletIds;
if (!brand || !penId || !Array.isArray(tabletIds)) continue;
for (const tid of tabletIds) compatKeys.add(`${brand}|${penId}|${tid}`);
}
const penById = new Map<string, { brand?: string; penId?: string }>();
for (const { record } of pens) {
const id = getString(record, "EntityId");
if (id) penById.set(id, { brand: getString(record, "Brand"), penId: getString(record, "PenId") });
}
for (const { file, record } of tablets) {
const included = (record.Model as { IncludedPen?: unknown } | undefined)?.IncludedPen;
const tabletId = getNestedString(record, "Model", "Id");
if (!Array.isArray(included) || !tabletId) continue;
for (const penEntityId of included) {
const pen = typeof penEntityId === "string" ? penById.get(penEntityId) : undefined;
if (!pen?.brand || !pen.penId) continue; // unknown pens are reported above
if (!compatKeys.has(`${pen.brand}|${pen.penId}|${tabletId}`)) {
issues.push({
file,
entityId: getEntityId(record),
field: "PenCompat",
issue: "ships a pen its pen-compat row doesn't list",
value: `${penEntityId} (add ${tabletId} to ${pen.brand} ${pen.penId})`,
});
}
}
}

// Pressure response references
const pressureResponse = readAllInDir(
dataDir,
Expand Down
5 changes: 3 additions & 2 deletions source/tablets/wacom/wacom.tablet.ctl4100wl.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"EntityId": "wacom.tablet.ctl4100wl",
"_id": "8e17d9b8-7a38-4c37-9add-6bdc82091525",
"_CreateDate": "2025-12-12T12:33:46.983Z",
"_ModifiedDate": "2026-10-02T16:41:18.000Z"
"_ModifiedDate": "2026-10-02T19:57:22.862Z"
},
"Model": {
"Brand": "WACOM",
Expand Down Expand Up @@ -91,7 +91,8 @@
},
"Density": "100",
"ReportRate": "133",
"Tilt": "0"
"Tilt": "0",
"Type": "PASSIVE_EMR"
},
"Physical": {
"Dimensions": {
Expand Down
6 changes: 3 additions & 3 deletions source/tablets/wacom/wacom.tablet.dth246.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"EntityId": "wacom.tablet.dth246",
"_id": "62cd9b73-c996-422b-93c4-4c128acdaf6e",
"_CreateDate": "2025-12-12T12:33:46.983Z",
"_ModifiedDate": "2026-10-02T17:46:31.000Z"
"_ModifiedDate": "2026-10-02T19:57:18.221Z"
},
"Model": {
"Brand": "WACOM",
Expand Down Expand Up @@ -127,8 +127,8 @@
},
"Physical": {
"Dimensions": {
"Width": 340,
"Height": 568,
"Width": 568,
"Height": 340,
"Depth": 21
},
"Weight": "5000",
Expand Down
6 changes: 3 additions & 3 deletions source/tablets/wacom/wacom.tablet.dtk168.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"EntityId": "wacom.tablet.dtk168",
"_id": "fae638fa-e305-434a-a2a6-f6852ec8c02e",
"_CreateDate": "2025-12-12T12:33:46.983Z",
"_ModifiedDate": "2026-10-02T18:08:36.000Z"
"_ModifiedDate": "2026-10-02T19:57:21.120Z"
},
"Model": {
"Brand": "WACOM",
Expand Down Expand Up @@ -115,8 +115,8 @@
},
"Physical": {
"Dimensions": {
"Width": 259,
"Height": 384,
"Width": 384,
"Height": 259,
"Depth": 15
},
"Weight": "2000",
Expand Down
6 changes: 3 additions & 3 deletions source/tablets/wacom/wacom.tablet.dtk246.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"EntityId": "wacom.tablet.dtk246",
"_id": "98f59bc7-4ba6-49f0-b3b2-4acafcffe64c",
"_CreateDate": "2025-12-12T12:33:46.983Z",
"_ModifiedDate": "2026-06-18T18:13:44.058Z"
"_ModifiedDate": "2026-10-02T19:57:19.680Z"
},
"Model": {
"Brand": "WACOM",
Expand Down Expand Up @@ -76,8 +76,8 @@
},
"Physical": {
"Dimensions": {
"Width": 340,
"Height": 568,
"Width": 568,
"Height": 340,
"Depth": 21
},
"Weight": "4800"
Expand Down
Loading