@@ -35,42 +35,6 @@ def verify_json(item, name: str):
35
35
verify (item , options = parameters )
36
36
37
37
38
- def verify_json_ignoring_dates (item , name : str , date_fields = None ):
39
- """
40
- Verify JSON content while ignoring specified date fields.
41
-
42
- Args:
43
- item: The JSON object to verify
44
- name: Name for the verification
45
- date_fields: List of field names containing dates to ignore
46
- """
47
- # Deep copy to avoid modifying the original
48
- import copy
49
- item_copy = copy .deepcopy (item )
50
-
51
- # Replace date fields with placeholders
52
- date_fields = date_fields or ["date" , "created_at" , "updated_at" , "timestamp" ]
53
- _replace_dates_recursive (item_copy , date_fields )
54
-
55
- # Use your existing verify_json function
56
- verify_json (item_copy , name )
57
-
58
-
59
- def _replace_dates_recursive (obj , date_fields ):
60
- """Helper function to recursively replace date values."""
61
- if isinstance (obj , dict ):
62
- for key , value in obj .items ():
63
- if key in date_fields and isinstance (value , str ):
64
- obj [key ] = "<DATE_IGNORED>"
65
- elif isinstance (value , (dict , list )):
66
- _replace_dates_recursive (value , date_fields )
67
- elif isinstance (obj , list ):
68
- for item in obj :
69
- if isinstance (item , (dict , list )):
70
- _replace_dates_recursive (item , date_fields )
71
-
72
-
73
-
74
38
def gempy_verify_array (item , name : str , rtol : float = 1e-5 , atol : float = 1e-5 , ):
75
39
# ! You will have to set the path to your diff tool
76
40
reporter = GenericDiffReporter .create (
0 commit comments