File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ def test_dataset_record_init_with_valid_run_date_parses_year_month_day():
1616 "run_type" : "full" ,
1717 "action" : "index" ,
1818 "run_id" : "000-111-aaa-bbb" ,
19+ "run_record_offset" : 0 ,
1920 }
2021 record = DatasetRecord (** values )
2122
@@ -37,6 +38,7 @@ def test_dataset_record_init_with_invalid_run_date_raise_error():
3738 "run_type" : "full" ,
3839 "action" : "index" ,
3940 "run_id" : "000-111-aaa-bbb" ,
41+ "run_record_offset" : 0 ,
4042 }
4143
4244 with pytest .raises (
@@ -55,6 +57,7 @@ def test_dataset_record_serialization():
5557 "run_type" : "full" ,
5658 "action" : "index" ,
5759 "run_id" : "abc123" ,
60+ "run_record_offset" : 0 ,
5861 }
5962 dataset_record = DatasetRecord (** values )
6063
@@ -67,6 +70,7 @@ def test_dataset_record_serialization():
6770 "run_type" : "full" ,
6871 "action" : "index" ,
6972 "run_id" : "abc123" ,
73+ "run_record_offset" : 0 ,
7074 "year" : "2024" ,
7175 "month" : "12" ,
7276 "day" : "01" ,
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ def generate_sample_records(
3232 run_type = run_type ,
3333 action = action ,
3434 run_id = run_id ,
35+ run_record_offset = x ,
3536 )
3637
3738
Original file line number Diff line number Diff line change 33from timdex_dataset_api .dataset import TIMDEXDataset
44from timdex_dataset_api .record import DatasetRecord
55
6- __version__ = "0.7 .0"
6+ __version__ = "0.8 .0"
77
88__all__ = [
99 "DatasetRecord" ,
Original file line number Diff line number Diff line change 3333 pa .field ("source" , pa .string ()),
3434 pa .field ("run_date" , pa .date32 ()),
3535 pa .field ("run_type" , pa .string ()),
36- pa .field ("run_id" , pa .string ()),
3736 pa .field ("action" , pa .string ()),
37+ pa .field ("run_id" , pa .string ()),
38+ pa .field ("run_record_offset" , pa .int32 ()),
3839 pa .field ("year" , pa .string ()),
3940 pa .field ("month" , pa .string ()),
4041 pa .field ("day" , pa .string ()),
@@ -53,8 +54,9 @@ class DatasetFilters(TypedDict, total=False):
5354 source : str | None
5455 run_date : str | date | None
5556 run_type : str | None
56- run_id : str | None
5757 action : str | None
58+ run_id : str | None
59+ run_record_offset : int | None
5860 year : str | None
5961 month : str | None
6062 day : str | None
Original file line number Diff line number Diff line change @@ -18,15 +18,15 @@ class DatasetRecord:
1818 writing.
1919 """
2020
21- # primary columns
2221 timdex_record_id : str = field ()
2322 source_record : bytes = field ()
2423 transformed_record : bytes = field ()
2524 source : str = field ()
2625 run_date : date = field (converter = strict_date_parse )
2726 run_type : str = field ()
28- run_id : str = field ()
2927 action : str = field ()
28+ run_id : str = field ()
29+ run_record_offset : int = field (default = None )
3030
3131 @property
3232 def year (self ) -> str :
You can’t perform that action at this time.
0 commit comments