Skip to content

Commit 86a6483

Browse files
committedApr 4, 2024·
Set force_overwrite to default to True #161
1 parent 1fe44eb commit 86a6483

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed
 

‎pipestat/backends/db_backend/dbbackend.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def report(
298298
self,
299299
values: Dict[str, Any],
300300
record_identifier: str,
301-
force_overwrite: bool = False,
301+
force_overwrite: bool = True,
302302
result_formatter: Optional[staticmethod] = None,
303303
) -> Union[List[str], bool]:
304304
"""

‎pipestat/backends/file_backend/filebackend.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ def report(
326326
self,
327327
values: Dict[str, Any],
328328
record_identifier: Optional[str] = None,
329-
force_overwrite: bool = False,
329+
force_overwrite: bool = True,
330330
result_formatter: Optional[staticmethod] = None,
331331
) -> Union[List[str], bool]:
332332
"""

‎pipestat/pipestat.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ def report(
551551
self,
552552
values: Dict[str, Any],
553553
record_identifier: Optional[str] = None,
554-
force_overwrite: bool = False,
554+
force_overwrite: bool = True,
555555
result_formatter: Optional[staticmethod] = None,
556556
strict_type: bool = True,
557557
) -> Union[List[str], bool]:

‎tests/test_pipestat.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,9 @@ def test_retrieve_one_single_result_as_list(
615615
args.update(backend_data)
616616
psm = SamplePipestatManager(**args)
617617
psm.report(record_identifier=rec_id, values=val, force_overwrite=True)
618-
assert psm.retrieve_one(record_identifier=rec_id, result_identifier="number_of_things") == psm.retrieve_one(record_identifier=rec_id, result_identifier=["number_of_things"])
618+
assert psm.retrieve_one(
619+
record_identifier=rec_id, result_identifier="number_of_things"
620+
) == psm.retrieve_one(record_identifier=rec_id, result_identifier=["number_of_things"])
619621

620622
@pytest.mark.parametrize(
621623
["rec_id", "val"],

0 commit comments

Comments
 (0)
Please sign in to comment.