Skip to content

Commit 4d2944d

Browse files
authored
Revert "V0.6.6 rc0 (#16)" (#18)
This reverts commit 886b5a8.
1 parent 886b5a8 commit 4d2944d

File tree

983 files changed

+70871
-128296
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

983 files changed

+70871
-128296
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ jobs:
1717
matrix:
1818
validator:
1919
- codec
20-
- traces
2120
- stf/accumulate
2221
- stf/assurances
2322
- stf/authorizations

README.md

Lines changed: 0 additions & 13 deletions

lib/bin_to_json.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,13 @@ def decode(self):
3131
return decoded
3232

3333

34-
def convert_to_json(filename, subsystem_type, spec_name = None):
35-
if spec_name in ("tiny", "full"):
36-
spec.set_spec(spec_name)
37-
print("* Converting:", filename)
34+
def convert_to_json(filename, subsystem_type):
3835
with open(filename, 'rb') as file:
3936
blob = file.read()
4037
scale_bytes = ScaleBytes(blob)
4138
dump = subsystem_type(data=scale_bytes)
4239
decoded = dump.decode()
43-
json_filename = str(filename).replace('.bin', '.json')
40+
json_filename = filename.replace('.bin', '.json')
4441
with open(json_filename, 'w') as json_file:
4542
json.dump(decoded, json_file, indent=4)
4643
json_file.write('\n')
@@ -50,4 +47,5 @@ def convert_group(group_name, spec_name, subsystem_type):
5047
spec.set_spec(spec_name)
5148
print(f"\n[Converting {group_name} ({spec_name})]")
5249
for file in glob.glob(f"{spec_name}/*.bin"):
50+
print("* Converting:", file)
5351
convert_to_json(file, subsystem_type)

lib/validate_asn1.py

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -76,30 +76,24 @@ def path_to_type_name(path):
7676
return name
7777

7878

79-
def validate(schema, json_file, root_type = None, json_tweaks_callback = None):
79+
def validate(schema, json_file, json_tweaks_callback=None):
8080
"""Validate a JSON file against an ASN.1 schema.
8181
82+
The root type for decoding is determined as follows:
83+
- If the schema contains "TestCase", use that type
84+
- Otherwise, derive the type from the filename (e.g., "my_type.json" → "MyType")
85+
8286
Args:
8387
schema: Compiled ASN.1 schema
8488
json_file: Path to JSON file to validate
85-
root_type_name: Optional schema type name to be used to parse the json_file
8689
json_tweaks_callback: Optional callback to modify JSON before validation
87-
88-
If the `root_type_name` arg is None or is not present in the schema, then the root
89-
type for decoding is determined as follows:
90-
- If the schema contains "TestCase", use that type
91-
- Otherwise, derive the type from the filename (e.g., "my_type.json" → "MyType")
92-
9390
"""
94-
print("* Validating:", json_file)
95-
9691
# Determine root type used for decoding
97-
if root_type is None:
98-
if "TestCase" in schema.types:
99-
root_type = "TestCase"
100-
else:
101-
# Auto-detect root type from filename
102-
root_type = path_to_type_name(json_file)
92+
if "TestCase" in schema.types:
93+
root_type = "TestCase"
94+
else:
95+
# Auto-detect root type from filename
96+
root_type = path_to_type_name(json_file)
10397

10498
# Read and prepare JSON
10599
with open(json_file, "rb") as f:
@@ -127,7 +121,7 @@ def validate_group(group_name, group_schema, spec_name, json_tweaks_callback=Non
127121
Args:
128122
group_name: Name of the validation group (for display)
129123
group_schema: ASN.1 schema file name (or None for base schema only)
130-
spec_name: Specification name ("tiny", "full")
124+
spec_name: Specification name ("tiny", "full", or "data")
131125
json_tweaks_callback: Optional callback to modify JSON before validation
132126
"""
133127
print(f"\n[Validating {group_name} ({spec_name})]")
@@ -140,4 +134,5 @@ def validate_group(group_name, group_schema, spec_name, json_tweaks_callback=Non
140134
# Compile schema and validate all JSON files
141135
schema = asn1tools.compile_files(schema_files, codec="jer")
142136
for json_file in glob.glob(f"{spec_name}/*.json"):
143-
validate(schema, json_file, None, json_tweaks_callback)
137+
print("* Validating:", json_file)
138+
validate(schema, json_file, json_tweaks_callback)

scripts/convert-all.sh

Lines changed: 0 additions & 24 deletions
This file was deleted.

scripts/validate-all.sh

Lines changed: 0 additions & 24 deletions
This file was deleted.
-12.2 KB
Binary file not shown.

stf/accumulate/full/accumulate_ready_queued_reports-1.json

Lines changed: 20 additions & 20 deletions
Large diffs are not rendered by default.
-12.2 KB
Binary file not shown.

stf/accumulate/full/enqueue_and_unlock_chain-1.json

Lines changed: 14 additions & 14 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)