aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJ08nY2024-02-13 17:24:00 +0100
committerJ08nY2024-02-13 17:35:51 +0100
commitfffefed8310969c145eca27f2765712f5295558a (patch)
tree02b6fc61eb316b9e011c25abf9339bca7334414c
parentbb3b54d177797726d473f624be83c91266d612e9 (diff)
downloadsec-certs-fffefed8310969c145eca27f2765712f5295558a.tar.gz
sec-certs-fffefed8310969c145eca27f2765712f5295558a.tar.zst
sec-certs-fffefed8310969c145eca27f2765712f5295558a.zip
Move CCDocumentState to cert class.
-rw-r--r--src/sec_certs/model/references_nlp/segment_extractor.py8
-rw-r--r--src/sec_certs/sample/cc.py130
-rw-r--r--tests/cc/test_cc_certificate.py20
-rw-r--r--tests/data/cc/analysis/cc_full_dataset.json6
-rw-r--r--tests/data/cc/analysis/reference_dataset.json18
-rw-r--r--tests/data/cc/analysis/transitive_vulnerability_dataset.json18
-rw-r--r--tests/data/cc/analysis/vulnerable_dataset.json12
-rw-r--r--tests/data/cc/certificate/fictional_cert.json6
-rw-r--r--tests/data/cc/dataset/auxiliary_datasets/maintenances/maintenance_updates.json6
-rw-r--r--tests/data/cc/dataset/toy_dataset.json18
10 files changed, 126 insertions, 116 deletions
diff --git a/src/sec_certs/model/references_nlp/segment_extractor.py b/src/sec_certs/model/references_nlp/segment_extractor.py
index d63208ec..f77c8f5b 100644
--- a/src/sec_certs/model/references_nlp/segment_extractor.py
+++ b/src/sec_certs/model/references_nlp/segment_extractor.py
@@ -173,9 +173,9 @@ class ReferenceSegmentExtractor:
- Loads manually annotated samples
- Combines all of that into single dataframe
"""
- target_certs = [x for x in certs if x.heuristics.st_references.directly_referencing and x.state.st_txt_path]
+ target_certs = [x for x in certs if x.heuristics.st_references.directly_referencing and x.state.st.txt_path]
report_certs = [
- x for x in certs if x.heuristics.report_references.directly_referencing and x.state.report_txt_path
+ x for x in certs if x.heuristics.report_references.directly_referencing and x.state.report.txt_path
]
df_targets = self._build_df(target_certs, "target")
df_reports = self._build_df(report_certs, "report")
@@ -217,8 +217,8 @@ class ReferenceSegmentExtractor:
for key, val in actual_references.items()
]
- (certs[0].state.report_txt_path.parent.parent / "txt_processed").mkdir(exist_ok=True, parents=True)
- (certs[0].state.st_txt_path.parent.parent / "txt_processed").mkdir(exist_ok=True, parents=True)
+ (certs[0].state.report.txt_path.parent.parent / "txt_processed").mkdir(exist_ok=True, parents=True)
+ (certs[0].state.st.txt_path.parent.parent / "txt_processed").mkdir(exist_ok=True, parents=True)
return list(itertools.chain.from_iterable(get_cert_records(cert, source) for cert in certs))
def _build_df(self, certs: list[CCCertificate], source: Literal["target", "report"]) -> pd.DataFrame:
diff --git a/src/sec_certs/sample/cc.py b/src/sec_certs/sample/cc.py
index 42cb15d4..bfc0b07d 100644
--- a/src/sec_certs/sample/cc.py
+++ b/src/sec_certs/sample/cc.py
@@ -38,63 +38,6 @@ HEADERS = {
}
-@dataclass
-class CCDocumentState(ComplexSerializableType):
- download_ok: bool = False # Whether download went OK
- convert_garbage: bool = False # Whether initial conversion resulted in garbage
- convert_ok: bool = False # Whether overall conversion went OK (either pdftotext or via OCR)
- extract_ok: bool = False # Whether extraction went OK
-
- pdf_hash: str | None = None
- txt_hash: str | None = None
-
- _pdf_path: Path | None = None
- _txt_path: Path | None = None
-
- def is_ok_to_download(self, fresh: bool = True) -> bool:
- return True if fresh else not self.download_ok
-
- def is_ok_to_convert(self, fresh: bool = True) -> bool:
- return self.download_ok if fresh else self.download_ok and not self.convert_ok
-
- def is_ok_to_analyze(self, fresh: bool = True) -> bool:
- if fresh:
- return self.download_ok and self.convert_ok
- else:
- return self.download_ok and self.convert_ok and not self.extract_ok
-
- @property
- def pdf_path(self) -> Path:
- if not self._pdf_path:
- raise ValueError(f"pdf_path not set on {type(self)}")
- return self._pdf_path
-
- @pdf_path.setter
- def pdf_path(self, pth: str | Path | None) -> None:
- self._pdf_path = Path(pth) if pth else None
-
- @property
- def txt_path(self) -> Path:
- if not self._txt_path:
- raise ValueError(f"txt_path not set on {type(self)}")
- return self._txt_path
-
- @txt_path.setter
- def txt_path(self, pth: str | Path | None) -> None:
- self._txt_path = Path(pth) if pth else None
-
- @property
- def serialized_attributes(self) -> list[str]:
- return [
- "download_ok",
- "convert_garbage",
- "convert_ok",
- "extract_ok",
- "pdf_hash",
- "txt_hash",
- ]
-
-
class CCCertificate(
Certificate["CCCertificate", "CCCertificate.Heuristics", "CCCertificate.PdfData"],
PandasSerializableType,
@@ -147,15 +90,82 @@ class CCCertificate(
return self.maintenance_date < other.maintenance_date
@dataclass
+ class DocumentState(ComplexSerializableType):
+ download_ok: bool = False # Whether download went OK
+ convert_garbage: bool = False # Whether initial conversion resulted in garbage
+ convert_ok: bool = False # Whether overall conversion went OK (either pdftotext or via OCR)
+ extract_ok: bool = False # Whether extraction went OK
+
+ pdf_hash: str | None = None
+ txt_hash: str | None = None
+
+ _pdf_path: Path | None = None
+ _txt_path: Path | None = None
+
+ def is_ok_to_download(self, fresh: bool = True) -> bool:
+ return True if fresh else not self.download_ok
+
+ def is_ok_to_convert(self, fresh: bool = True) -> bool:
+ return self.download_ok if fresh else self.download_ok and not self.convert_ok
+
+ def is_ok_to_analyze(self, fresh: bool = True) -> bool:
+ if fresh:
+ return self.download_ok and self.convert_ok
+ else:
+ return self.download_ok and self.convert_ok and not self.extract_ok
+
+ @property
+ def pdf_path(self) -> Path:
+ if not self._pdf_path:
+ raise ValueError(f"pdf_path not set on {type(self)}")
+ return self._pdf_path
+
+ @pdf_path.setter
+ def pdf_path(self, pth: str | Path | None) -> None:
+ self._pdf_path = Path(pth) if pth else None
+
+ @property
+ def txt_path(self) -> Path:
+ if not self._txt_path:
+ raise ValueError(f"txt_path not set on {type(self)}")
+ return self._txt_path
+
+ @txt_path.setter
+ def txt_path(self, pth: str | Path | None) -> None:
+ self._txt_path = Path(pth) if pth else None
+
+ @property
+ def serialized_attributes(self) -> list[str]:
+ return [
+ "download_ok",
+ "convert_garbage",
+ "convert_ok",
+ "extract_ok",
+ "pdf_hash",
+ "txt_hash",
+ ]
+
+ @dataclass(init=False)
class InternalState(ComplexSerializableType):
"""
Holds internal state of the certificate, whether downloads and converts of individual components succeeded. Also
holds information about errors and paths to the files.
"""
- report: CCDocumentState = field(default_factory=CCDocumentState)
- st: CCDocumentState = field(default_factory=CCDocumentState)
- cert: CCDocumentState = field(default_factory=CCDocumentState)
+ report: CCCertificate.DocumentState
+ st: CCCertificate.DocumentState
+ cert: CCCertificate.DocumentState
+
+ def __init__(
+ self,
+ report: CCCertificate.DocumentState | None = None,
+ st: CCCertificate.DocumentState | None = None,
+ cert: CCCertificate.DocumentState | None = None,
+ ):
+ super().__init__()
+ self.report = report if report is not None else CCCertificate.DocumentState()
+ self.st = st if st is not None else CCCertificate.DocumentState()
+ self.cert = cert if cert is not None else CCCertificate.DocumentState()
@property
def serialized_attributes(self) -> list[str]:
diff --git a/tests/cc/test_cc_certificate.py b/tests/cc/test_cc_certificate.py
index 32bd3a59..f90245e0 100644
--- a/tests/cc/test_cc_certificate.py
+++ b/tests/cc/test_cc_certificate.py
@@ -32,29 +32,29 @@ def vulnerable_certificate(tmp_path_factory) -> CCCertificate:
def test_extract_metadata(vulnerable_certificate: CCCertificate):
- vulnerable_certificate.state.st_extract_ok = True
+ vulnerable_certificate.state.st.extract_ok = True
CCCertificate.extract_st_pdf_metadata(vulnerable_certificate)
- assert vulnerable_certificate.state.st_extract_ok
+ assert vulnerable_certificate.state.st.extract_ok
- vulnerable_certificate.state.report_extract_ok = True
+ vulnerable_certificate.state.report.extract_ok = True
CCCertificate.extract_report_pdf_metadata(vulnerable_certificate)
- assert vulnerable_certificate.state.report_extract_ok
+ assert vulnerable_certificate.state.report.extract_ok
def test_extract_frontpage(vulnerable_certificate: CCCertificate):
- vulnerable_certificate.state.report_extract_ok = True
+ vulnerable_certificate.state.report.extract_ok = True
CCCertificate.extract_report_pdf_frontpage(vulnerable_certificate)
- assert vulnerable_certificate.state.report_extract_ok
+ assert vulnerable_certificate.state.report.extract_ok
def test_keyword_extraction(vulnerable_certificate: CCCertificate):
- vulnerable_certificate.state.st_extract_ok = True
+ vulnerable_certificate.state.st.extract_ok = True
CCCertificate.extract_st_pdf_keywords(vulnerable_certificate)
- assert vulnerable_certificate.state.st_extract_ok
+ assert vulnerable_certificate.state.st.extract_ok
- vulnerable_certificate.state.report_extract_ok = True
+ vulnerable_certificate.state.report.extract_ok = True
CCCertificate.extract_report_pdf_keywords(vulnerable_certificate)
- assert vulnerable_certificate.state.report_extract_ok
+ assert vulnerable_certificate.state.report.extract_ok
def test_cert_link_escaping(cert_one: CCCertificate):
diff --git a/tests/data/cc/analysis/cc_full_dataset.json b/tests/data/cc/analysis/cc_full_dataset.json
index ebc5241e..4baf4758 100644
--- a/tests/data/cc/analysis/cc_full_dataset.json
+++ b/tests/data/cc/analysis/cc_full_dataset.json
@@ -56,7 +56,7 @@
"state": {
"_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"report": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -65,7 +65,7 @@
"txt_hash": "35627594d3806ac3926ec47f466503fe27781533da12beb6f8705882fccf125e"
},
"st": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -74,7 +74,7 @@
"txt_hash": "c8b4c5667a3f60edc845051e5a31a2d17b9d9a11df9e56dd89681d25e727a622"
},
"cert": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
diff --git a/tests/data/cc/analysis/reference_dataset.json b/tests/data/cc/analysis/reference_dataset.json
index 4b5d7d19..b0ef6683 100644
--- a/tests/data/cc/analysis/reference_dataset.json
+++ b/tests/data/cc/analysis/reference_dataset.json
@@ -45,7 +45,7 @@
"state": {
"_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"report": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -54,7 +54,7 @@
"txt_hash": "460e8010dbc8f5de5b87bf96fd45c71cfd9f3869f34ca6ac1ab02cbd70d2523f"
},
"st": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -63,7 +63,7 @@
"txt_hash": "81c53d1e5b1c2fcb129ce1053d13cd1308f7a556921f0b9024cedf75c6b2efb7"
},
"cert": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -622,7 +622,7 @@
"state": {
"_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"report": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -631,7 +631,7 @@
"txt_hash": "0535df1c56fb4f87153cbffee51ba4d77fac47a6f17f024aa7d9df461028bc65"
},
"st": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -640,7 +640,7 @@
"txt_hash": "926668bea7c427a4fcf82857bfc63420f3597b6bff39699927a58f335620eaac"
},
"cert": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -1277,7 +1277,7 @@
"state": {
"_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"report": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -1286,7 +1286,7 @@
"txt_hash": "11e1262fd8f5df1b140f5e8813883b71447503781399427b35adbbecd00b4d63"
},
"st": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -1295,7 +1295,7 @@
"txt_hash": "179b07b4fc7402066a884edea494b28e324315108a5e0820184031f2e2062ad5"
},
"cert": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
diff --git a/tests/data/cc/analysis/transitive_vulnerability_dataset.json b/tests/data/cc/analysis/transitive_vulnerability_dataset.json
index 0b995ce7..21391a12 100644
--- a/tests/data/cc/analysis/transitive_vulnerability_dataset.json
+++ b/tests/data/cc/analysis/transitive_vulnerability_dataset.json
@@ -55,7 +55,7 @@
"state": {
"_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"report": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -64,7 +64,7 @@
"txt_hash": "9d360141a98e764b15855f519b456c4e4639f993c4f8b5ab67e9c8ae7fbfc9e4"
},
"st": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -73,7 +73,7 @@
"txt_hash": "66271d8bf0b581a2f189301438f2aee13ff3da0bb0bb180bcf518261eb695496"
},
"cert": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -1378,7 +1378,7 @@
"state": {
"_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"report": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -1387,7 +1387,7 @@
"txt_hash": "dd120ba7667c2385839c96ee70c56f2a4d464fc95e3ea2818d31b3347d06fd4f"
},
"st": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -1396,7 +1396,7 @@
"txt_hash": "f7f7b8f31dddde3f0756cde8843061f01b606bdf266eca71dbcc56b3672d1db5"
},
"cert": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -2346,7 +2346,7 @@
"state": {
"_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"report": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -2355,7 +2355,7 @@
"txt_hash": "0a7c65e3d11f082c8f75aba7de0079c0b1aa5e67bb28d4635cbcaa4cd200d1c2"
},
"st": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -2364,7 +2364,7 @@
"txt_hash": "90b8e48add278faea4668eccba591d3992bf782669cca1b0a63bf6f21b514cd9"
},
"cert": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
diff --git a/tests/data/cc/analysis/vulnerable_dataset.json b/tests/data/cc/analysis/vulnerable_dataset.json
index 8e9ba284..7978cb5a 100644
--- a/tests/data/cc/analysis/vulnerable_dataset.json
+++ b/tests/data/cc/analysis/vulnerable_dataset.json
@@ -40,7 +40,7 @@
"state": {
"_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"report": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": true,
"convert_garbage": false,
"convert_ok": true,
@@ -49,7 +49,7 @@
"txt_hash": null
},
"st": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": true,
"convert_garbage": false,
"convert_ok": true,
@@ -58,7 +58,7 @@
"txt_hash": null
},
"cert": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -121,7 +121,7 @@
"state": {
"_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"report": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": true,
"convert_garbage": false,
"convert_ok": true,
@@ -130,7 +130,7 @@
"txt_hash": null
},
"st": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": true,
"convert_garbage": false,
"convert_ok": true,
@@ -139,7 +139,7 @@
"txt_hash": null
},
"cert": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
diff --git a/tests/data/cc/certificate/fictional_cert.json b/tests/data/cc/certificate/fictional_cert.json
index d6a7be34..54781dd5 100644
--- a/tests/data/cc/certificate/fictional_cert.json
+++ b/tests/data/cc/certificate/fictional_cert.json
@@ -42,7 +42,7 @@
"state": {
"_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"report": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -51,7 +51,7 @@
"txt_hash": null
},
"st": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -60,7 +60,7 @@
"txt_hash": null
},
"cert": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
diff --git a/tests/data/cc/dataset/auxiliary_datasets/maintenances/maintenance_updates.json b/tests/data/cc/dataset/auxiliary_datasets/maintenances/maintenance_updates.json
index 032cc10d..5596b597 100644
--- a/tests/data/cc/dataset/auxiliary_datasets/maintenances/maintenance_updates.json
+++ b/tests/data/cc/dataset/auxiliary_datasets/maintenances/maintenance_updates.json
@@ -23,7 +23,7 @@
"state": {
"_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"report": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": true,
"convert_garbage": false,
"convert_ok": false,
@@ -32,7 +32,7 @@
"txt_hash": null
},
"st": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": true,
"convert_garbage": false,
"convert_ok": false,
@@ -41,7 +41,7 @@
"txt_hash": null
},
"cert": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
diff --git a/tests/data/cc/dataset/toy_dataset.json b/tests/data/cc/dataset/toy_dataset.json
index 33aa7770..dc70bc4e 100644
--- a/tests/data/cc/dataset/toy_dataset.json
+++ b/tests/data/cc/dataset/toy_dataset.json
@@ -46,7 +46,7 @@
"state": {
"_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"report": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -55,7 +55,7 @@
"txt_hash": null
},
"st": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -64,7 +64,7 @@
"txt_hash": null
},
"cert": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -154,7 +154,7 @@
"state": {
"_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"report": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -163,7 +163,7 @@
"txt_hash": null
},
"st": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -172,7 +172,7 @@
"txt_hash": null
},
"cert": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -270,7 +270,7 @@
"state": {
"_type": "sec_certs.sample.cc.CCCertificate.InternalState",
"report": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -279,7 +279,7 @@
"txt_hash": null
},
"st": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,
@@ -288,7 +288,7 @@
"txt_hash": null
},
"cert": {
- "_type": "sec_certs.sample.cc.CCDocumentState",
+ "_type": "sec_certs.sample.cc.CCCertificate.DocumentState",
"download_ok": false,
"convert_garbage": false,
"convert_ok": false,