Skip to content

Commit ce5c454

Browse files
committed
feature warnings to errors
1 parent abcc46f commit ce5c454

File tree

4 files changed

+22
-37
lines changed

4 files changed

+22
-37
lines changed

conformance-search/src/types/json.ts

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
export type Coverage = {
2+
not_found: {
3+
count: number;
4+
percentage: number;
5+
boxes: string[];
6+
missing_extensions: string[];
7+
paths: string[];
8+
};
29
lists: {
310
boxes: {
4-
covered: Array<string>;
5-
not_covered: Array<string>;
6-
under_consideration: Array<string>;
11+
covered: string[];
12+
not_covered: string[];
13+
under_consideration: string[];
714
};
815
features: {
9-
covered: Array<string>;
10-
not_covered: Array<string>;
11-
under_consideration: Array<string>;
16+
covered: string[];
17+
not_covered: string[];
18+
under_consideration: string[];
1219
};
1320
};
1421
path_file_map: {
@@ -28,8 +35,6 @@ export type Coverage = {
2835
count: number;
2936
published_features: number;
3037
under_consideration_features: number;
31-
features_from_spec: number;
32-
features_from_file: number;
3338
};
3439
files: {
3540
count: number;
@@ -39,15 +44,16 @@ export type Coverage = {
3944
boxes: {
4045
count: number;
4146
};
42-
spec_info: Array<{
47+
spec_info: {
4348
ISO: string;
4449
name: string;
4550
version: number;
4651
date: number;
52+
mp4ra_reference: string[];
4753
link: string;
48-
amendmends?: Array<string>;
49-
corrigenda?: Array<string>;
50-
}>;
54+
amendmends?: string[];
55+
corrigenda?: string[];
56+
}[];
5157
};
5258

5359
export type FileMetadata = {
@@ -65,8 +71,8 @@ export type FileMetadata = {
6571
conforms_to: {
6672
ISO: string;
6773
version: number;
68-
amendmends?: Array<string>;
69-
corrigenda?: Array<string>;
74+
amendmends?: string[];
75+
corrigenda?: string[];
7076
}[];
7177
notes:
7278
| string
@@ -79,7 +85,6 @@ export type FeatureFileMap = {
7985
key: string;
8086
description: string;
8187
spec: string;
82-
added_from_file: "spec" | "file";
8388
files: string[];
8489
};
8590

src/construct/coverage.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ def main():
5757
"count": "Total number of features",
5858
"published_features": "Number of features that has published files",
5959
"under_consideration_features": "Number of features that exclusively has under consideration files",
60-
"features_from_spec": "Number of features that are from the spec",
61-
"features_from_file": "Number of features that are added from files because they were not found in the spec",
6260
},
6361
"files": {
6462
"count": "Number of files that were submitted",
@@ -215,12 +213,6 @@ def main():
215213
and all(["under_consideration" in p for p in f["files"]])
216214
]
217215
),
218-
"features_from_spec": len(
219-
[f for f in files["feature_file_map"].values() if f["source"] == "spec"]
220-
),
221-
"features_from_file": len(
222-
[f for f in files["feature_file_map"].values() if f["source"] == "file"]
223-
),
224216
}
225217

226218
LISTS = {

src/construct/dictionary.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ def main():
2222

2323
# In case we missed some specs
2424
for feature in files["feature_file_map"].values():
25-
# FIXME: This shouldn't be necessary
26-
if feature["spec"] == "N/A":
27-
continue
2825
specs.add(feature["spec"])
2926

3027
# Sort the sets

src/construct/files.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ def main():
213213
"key": key,
214214
"description": value,
215215
"spec": spec,
216-
"source": "spec",
217216
"files": [],
218217
}
219218
else:
@@ -225,17 +224,9 @@ def main():
225224
if feature in feature_file_map:
226225
feature_file_map[feature]["files"].append(path)
227226
else:
228-
# FIXME: This should be an error
229-
logger.warning(
230-
f'Feature "{feature}" not found in user_defined.json. Adding a empty entry for now.'
227+
logger.error(
228+
f'Feature "{feature}" not found in standard features. File: {path}'
231229
)
232-
feature_file_map[feature] = {
233-
"key": feature,
234-
"description": "N/A",
235-
"spec": "N/A",
236-
"source": "file",
237-
"files": [path],
238-
}
239230

240231
# Sort files
241232
for key, value in feature_file_map.items():

0 commit comments

Comments
 (0)