ethspecify 0.2.6__tar.gz → 0.2.8__tar.gz
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.
Potentially problematic release.
This version of ethspecify might be problematic. Click here for more details.
- {ethspecify-0.2.6 → ethspecify-0.2.8}/PKG-INFO +1 -1
- {ethspecify-0.2.6 → ethspecify-0.2.8}/ethspecify/cli.py +10 -3
- {ethspecify-0.2.6 → ethspecify-0.2.8}/ethspecify/core.py +21 -4
- {ethspecify-0.2.6 → ethspecify-0.2.8}/ethspecify.egg-info/PKG-INFO +1 -1
- {ethspecify-0.2.6 → ethspecify-0.2.8}/setup.py +1 -1
- {ethspecify-0.2.6 → ethspecify-0.2.8}/LICENSE +0 -0
- {ethspecify-0.2.6 → ethspecify-0.2.8}/README.md +0 -0
- {ethspecify-0.2.6 → ethspecify-0.2.8}/ethspecify/__init__.py +0 -0
- {ethspecify-0.2.6 → ethspecify-0.2.8}/ethspecify.egg-info/SOURCES.txt +0 -0
- {ethspecify-0.2.6 → ethspecify-0.2.8}/ethspecify.egg-info/dependency_links.txt +0 -0
- {ethspecify-0.2.6 → ethspecify-0.2.8}/ethspecify.egg-info/entry_points.txt +0 -0
- {ethspecify-0.2.6 → ethspecify-0.2.8}/ethspecify.egg-info/requires.txt +0 -0
- {ethspecify-0.2.6 → ethspecify-0.2.8}/ethspecify.egg-info/top_level.txt +0 -0
- {ethspecify-0.2.6 → ethspecify-0.2.8}/setup.cfg +0 -0
|
@@ -26,13 +26,14 @@ def process(args):
|
|
|
26
26
|
def list_tags(args):
|
|
27
27
|
"""List all available tags with their fork history."""
|
|
28
28
|
preset = getattr(args, 'preset', 'mainnet')
|
|
29
|
-
|
|
29
|
+
version = getattr(args, 'version', 'nightly')
|
|
30
|
+
return _list_tags_with_history(args, preset, version)
|
|
30
31
|
|
|
31
32
|
|
|
32
|
-
def _list_tags_with_history(args, preset):
|
|
33
|
+
def _list_tags_with_history(args, preset, version):
|
|
33
34
|
"""List all tags with their fork history."""
|
|
34
35
|
try:
|
|
35
|
-
history = get_spec_item_history(preset)
|
|
36
|
+
history = get_spec_item_history(preset, version)
|
|
36
37
|
except ValueError as e:
|
|
37
38
|
print(f"Error: {e}")
|
|
38
39
|
return 1
|
|
@@ -205,6 +206,12 @@ def main():
|
|
|
205
206
|
help="Filter tags by search term",
|
|
206
207
|
default=None,
|
|
207
208
|
)
|
|
209
|
+
list_tags_parser.add_argument(
|
|
210
|
+
"--version",
|
|
211
|
+
type=str,
|
|
212
|
+
help="Specification version to use (default: nightly)",
|
|
213
|
+
default="nightly",
|
|
214
|
+
)
|
|
208
215
|
|
|
209
216
|
# Parser for 'check' command
|
|
210
217
|
check_parser = subparsers.add_parser("check", help="Check spec reference coverage and validity")
|
|
@@ -232,10 +232,16 @@ def get_spec(attributes, preset, fork, version="nightly"):
|
|
|
232
232
|
+ " = "
|
|
233
233
|
+ pyspec[preset][fork]["custom_types"][attributes["custom_type"]]
|
|
234
234
|
)
|
|
235
|
-
elif "ssz_object" in attributes:
|
|
235
|
+
elif "ssz_object" in attributes or "container" in attributes:
|
|
236
236
|
if spec is not None:
|
|
237
237
|
raise Exception(f"Tag can only specify one spec item")
|
|
238
|
-
|
|
238
|
+
if "ssz_object" in attributes and "container" in attributes:
|
|
239
|
+
raise Exception(f"cannot contain 'ssz_object' and 'container'")
|
|
240
|
+
if "ssz_object" in attributes:
|
|
241
|
+
object_name = attributes["ssz_object"]
|
|
242
|
+
else:
|
|
243
|
+
object_name = attributes["container"]
|
|
244
|
+
spec = pyspec[preset][fork]["ssz_objects"][object_name]
|
|
239
245
|
elif "dataclass" in attributes:
|
|
240
246
|
if spec is not None:
|
|
241
247
|
raise Exception(f"Tag can only specify one spec item")
|
|
@@ -614,6 +620,7 @@ def check_source_files(yaml_file, project_root, exceptions=None):
|
|
|
614
620
|
'config_var': 'configs',
|
|
615
621
|
'preset_var': 'presets',
|
|
616
622
|
'ssz_object': 'ssz_objects',
|
|
623
|
+
'container': 'ssz_objects',
|
|
617
624
|
'dataclass': 'dataclasses',
|
|
618
625
|
'custom_type': 'custom_types'
|
|
619
626
|
}
|
|
@@ -758,7 +765,7 @@ def extract_spec_tags_from_yaml(yaml_file, tag_type=None):
|
|
|
758
765
|
|
|
759
766
|
# Known tag type attributes
|
|
760
767
|
tag_attributes = ['fn', 'function', 'constant_var', 'config_var', 'preset_var',
|
|
761
|
-
'ssz_object', 'dataclass', 'custom_type']
|
|
768
|
+
'ssz_object', 'container', 'dataclass', 'custom_type']
|
|
762
769
|
|
|
763
770
|
try:
|
|
764
771
|
with open(yaml_file, 'r') as f:
|
|
@@ -807,6 +814,9 @@ def extract_spec_tags_from_yaml(yaml_file, tag_type=None):
|
|
|
807
814
|
# Normalize function to fn
|
|
808
815
|
if found_tag_type == 'function':
|
|
809
816
|
found_tag_type = 'fn'
|
|
817
|
+
# Normalize container to ssz_object
|
|
818
|
+
if found_tag_type == 'container':
|
|
819
|
+
found_tag_type = 'ssz_object'
|
|
810
820
|
break
|
|
811
821
|
|
|
812
822
|
if found_tag_type and 'fork' in attrs:
|
|
@@ -849,13 +859,16 @@ def generate_specrefs_from_files(files_with_spec_tags, project_dir):
|
|
|
849
859
|
|
|
850
860
|
# Check each possible spec attribute
|
|
851
861
|
for attr_name in ['fn', 'function', 'constant_var', 'config_var',
|
|
852
|
-
'preset_var', 'ssz_object', 'dataclass', 'custom_type']:
|
|
862
|
+
'preset_var', 'ssz_object', 'container', 'dataclass', 'custom_type']:
|
|
853
863
|
if attr_name in attrs:
|
|
854
864
|
spec_type = attr_name
|
|
855
865
|
spec_name = attrs[attr_name]
|
|
856
866
|
break
|
|
857
867
|
|
|
858
868
|
if spec_type and spec_name:
|
|
869
|
+
# Normalize container to ssz_object for consistency
|
|
870
|
+
if spec_type == 'container':
|
|
871
|
+
spec_type = 'ssz_object'
|
|
859
872
|
# Create a unique key for this spec reference
|
|
860
873
|
key = f"{spec_type}.{spec_name}"
|
|
861
874
|
if fork:
|
|
@@ -911,6 +924,7 @@ def process_generated_specrefs(specrefs, exceptions, version):
|
|
|
911
924
|
'config_var': 'config_vars',
|
|
912
925
|
'preset_var': 'preset_vars',
|
|
913
926
|
'ssz_object': 'ssz_objects',
|
|
927
|
+
'container': 'ssz_objects',
|
|
914
928
|
'dataclass': 'dataclasses',
|
|
915
929
|
'custom_type': 'custom_types'
|
|
916
930
|
}
|
|
@@ -923,6 +937,7 @@ def process_generated_specrefs(specrefs, exceptions, version):
|
|
|
923
937
|
'config_var': 'configs',
|
|
924
938
|
'preset_var': 'presets',
|
|
925
939
|
'ssz_object': 'ssz_objects',
|
|
940
|
+
'container': 'ssz_objects',
|
|
926
941
|
'dataclass': 'dataclasses',
|
|
927
942
|
'custom_type': 'custom_types'
|
|
928
943
|
}
|
|
@@ -1020,6 +1035,7 @@ def check_coverage(yaml_file, tag_type, exceptions, preset="mainnet", version="n
|
|
|
1020
1035
|
# Map tag types to history keys
|
|
1021
1036
|
history_key_map = {
|
|
1022
1037
|
'ssz_object': 'ssz_objects',
|
|
1038
|
+
'container': 'ssz_objects',
|
|
1023
1039
|
'config_var': 'config_vars',
|
|
1024
1040
|
'preset_var': 'preset_vars',
|
|
1025
1041
|
'dataclass': 'dataclasses',
|
|
@@ -1126,6 +1142,7 @@ def run_checks(project_dir, config):
|
|
|
1126
1142
|
# Map tag types to exception keys (support both singular and plural)
|
|
1127
1143
|
exception_key_map = {
|
|
1128
1144
|
'ssz_object': ['ssz_objects', 'ssz_object'],
|
|
1145
|
+
'container': ['ssz_objects', 'ssz_object'],
|
|
1129
1146
|
'config_var': ['configs', 'config_variables', 'config_var'],
|
|
1130
1147
|
'preset_var': ['presets', 'preset_variables', 'preset_var'],
|
|
1131
1148
|
'dataclass': ['dataclasses', 'dataclass'],
|
|
@@ -8,7 +8,7 @@ long_description = (this_directory / "README.md").read_text(encoding="utf-8")
|
|
|
8
8
|
|
|
9
9
|
setup(
|
|
10
10
|
name="ethspecify",
|
|
11
|
-
version="0.2.
|
|
11
|
+
version="0.2.8",
|
|
12
12
|
description="A utility for processing Ethereum specification tags.",
|
|
13
13
|
long_description=long_description,
|
|
14
14
|
long_description_content_type="text/markdown",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|