Skip to content

Commit 8204509

Browse files
committed
Remove derived Document.etl_output_url attribute
The `etloutput` module will handle this instead.
1 parent 39e62a0 commit 8204509

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

indico_toolkit/results/document.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ class Document:
88
id: int
99
name: str
1010
etl_output_url: str
11-
full_text_url: str
1211

1312
# Auto review changes must reproduce all model sections that were present in the
1413
# original result file. This may not be possible from the predictions alone--if a
@@ -26,14 +25,12 @@ def from_v1_dict(result: object) -> "Document":
2625
document_results = get(result, dict, "results", "document", "results")
2726
model_names = frozenset(document_results.keys())
2827
etl_output_url = get(result, str, "etl_output")
29-
full_text_url = etl_output_url.replace("etl_output.json", "full_text.txt")
3028

3129
return Document(
3230
# v1 result files don't include document IDs or filenames.
3331
id=None, # type: ignore[arg-type]
3432
name=None, # type: ignore[arg-type]
3533
etl_output_url=etl_output_url,
36-
full_text_url=full_text_url,
3734
_model_sections=model_names,
3835
)
3936

@@ -45,12 +42,10 @@ def from_v3_dict(document: object) -> "Document":
4542
model_results = get(document, dict, "model_results", "ORIGINAL")
4643
model_ids = frozenset(model_results.keys())
4744
etl_output_url = get(document, str, "etl_output")
48-
full_text_url = etl_output_url.replace("etl_output.json", "full_text.txt")
4945

5046
return Document(
5147
id=get(document, int, "submissionfile_id"),
5248
name=get(document, str, "input_filename"),
5349
etl_output_url=etl_output_url,
54-
full_text_url=full_text_url,
5550
_model_sections=model_ids,
5651
)

tests/results/test_predictionlist.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ def document() -> Document:
2121
id=2922,
2222
name="1040_filled.tiff",
2323
etl_output_url="indico-file:///storage/submission/2922/etl_output.json",
24-
full_text_url="indico-file:///storage/submission/2922/full_text.txt",
2524
_model_sections=frozenset({"124", "123", "122", "121"}),
2625
)
2726

0 commit comments

Comments
 (0)