diff options
| author | Adam Janovsky | 2025-02-13 12:42:54 +0100 |
|---|---|---|
| committer | Adam Janovsky | 2025-02-13 12:42:54 +0100 |
| commit | ba6da69bffd99a49a830de988af300108f3f8d80 (patch) | |
| tree | 508ac726d9408dc4917c1ced920f53447e9b64ac | |
| parent | b36f6675d8b88efae85eacbf19850340931c3ff5 (diff) | |
| download | sec-certs-ba6da69bffd99a49a830de988af300108f3f8d80.tar.gz sec-certs-ba6da69bffd99a49a830de988af300108f3f8d80.tar.zst sec-certs-ba6da69bffd99a49a830de988af300108f3f8d80.zip | |
PPs: change dset filename pp.json -> dataset.json
| -rw-r--r-- | src/sec_certs/dataset/auxiliary_dataset_handling.py | 2 | ||||
| -rw-r--r-- | src/sec_certs/dataset/cc.py | 2 | ||||
| -rw-r--r-- | src/sec_certs/dataset/protection_profile.py | 4 | ||||
| -rw-r--r-- | tests/cc/conftest.py | 2 | ||||
| -rw-r--r-- | tests/cc/test_cc_analysis.py | 4 | ||||
| -rw-r--r-- | tests/cc/test_cc_protection_profiles.py | 4 | ||||
| -rw-r--r-- | tests/data/protection_profiles/dataset.json (renamed from tests/data/protection_profiles/pp.json) | 0 |
7 files changed, 9 insertions, 9 deletions
diff --git a/src/sec_certs/dataset/auxiliary_dataset_handling.py b/src/sec_certs/dataset/auxiliary_dataset_handling.py index 11608a2e..69d5e837 100644 --- a/src/sec_certs/dataset/auxiliary_dataset_handling.py +++ b/src/sec_certs/dataset/auxiliary_dataset_handling.py @@ -258,7 +258,7 @@ class ProtectionProfileDatasetHandler(AuxiliaryDatasetHandler): @property def dset_path(self) -> Path: - return self.root_dir / "pp.json" + return self.root_dir / "dataset.json" def load_dataset(self) -> None: from sec_certs.dataset.protection_profile import ProtectionProfileDataset diff --git a/src/sec_certs/dataset/cc.py b/src/sec_certs/dataset/cc.py index 05e29a27..fb90c142 100644 --- a/src/sec_certs/dataset/cc.py +++ b/src/sec_certs/dataset/cc.py @@ -63,7 +63,7 @@ class CCDataset(Dataset[CCCertificate], ComplexSerializableType): │ │ ├── pps │ │ │ ├── pdf │ │ │ └── txt - │ │ └── pp.json + │ │ └── dataset.json │ └── maintenances │ ├── certs │ │ ├── reports diff --git a/src/sec_certs/dataset/protection_profile.py b/src/sec_certs/dataset/protection_profile.py index 2295191a..9b22ca75 100644 --- a/src/sec_certs/dataset/protection_profile.py +++ b/src/sec_certs/dataset/protection_profile.py @@ -31,7 +31,7 @@ class ProtectionProfileDataset(Dataset[ProtectionProfile], ComplexSerializableTy ├── pps │ ├── pdf │ └── txt - └── pp.json + └── dataset.json """ FULL_ARCHIVE_URL: ClassVar[AnyHttpUrl] = config.pp_latest_full_archive @@ -57,7 +57,7 @@ class ProtectionProfileDataset(Dataset[ProtectionProfile], ComplexSerializableTy @property def json_path(self) -> Path: - return self.root_dir / "pp.json" + return self.root_dir / "dataset.json" @property def reports_dir(self) -> Path: diff --git a/tests/cc/conftest.py b/tests/cc/conftest.py index 91f8caab..8651b92e 100644 --- a/tests/cc/conftest.py +++ b/tests/cc/conftest.py @@ -39,7 +39,7 @@ def toy_dataset() -> CCDataset: @pytest.fixture def toy_pp_dataset() -> ProtectionProfileDataset: - with resources.path(tests.data.protection_profiles, "pp.json") as path: + with resources.path(tests.data.protection_profiles, "dataset.json") as path: return ProtectionProfileDataset.from_json(path) diff --git a/tests/cc/test_cc_analysis.py b/tests/cc/test_cc_analysis.py index 6591ca18..a6b1b5e1 100644 --- a/tests/cc/test_cc_analysis.py +++ b/tests/cc/test_cc_analysis.py @@ -37,11 +37,11 @@ def processed_cc_dset( ) -> CCDataset: tmp_dir = tmp_path_factory.mktemp("cc_dset") shutil.copytree(analysis_data_dir, tmp_dir, dirs_exist_ok=True) - shutil.copy(pp_data_dir / "pp.json", tmp_dir / "pp.json") + shutil.copy(pp_data_dir / "dataset.json", tmp_dir / "dataset.json") cc_dset = CCDataset.from_json(tmp_dir / "vulnerable_dataset.json") cc_dset.aux_handlers[ProtectionProfileDatasetHandler].root_dir.mkdir(parents=True, exist_ok=True) - shutil.copy(tmp_dir / "pp.json", cc_dset.aux_handlers[ProtectionProfileDatasetHandler].dset_path) + shutil.copy(tmp_dir / "dataset.json", cc_dset.aux_handlers[ProtectionProfileDatasetHandler].dset_path) cc_dset.aux_handlers[ProtectionProfileDatasetHandler].process_dataset() cc_dset.aux_handlers[CPEMatchDictHandler].dset = {} diff --git a/tests/cc/test_cc_protection_profiles.py b/tests/cc/test_cc_protection_profiles.py index b8d2e821..29cee8b7 100644 --- a/tests/cc/test_cc_protection_profiles.py +++ b/tests/cc/test_cc_protection_profiles.py @@ -13,7 +13,7 @@ def test_dataset_from_json(toy_pp_dataset: ProtectionProfileDataset, pp_data_dir with (tmp_path / "dset.json").open("r") as handle: data = json.load(handle) - with (pp_data_dir / "pp.json").open("r") as handle: + with (pp_data_dir / "dataset.json").open("r") as handle: template_data = json.load(handle) del data["timestamp"] @@ -22,7 +22,7 @@ def test_dataset_from_json(toy_pp_dataset: ProtectionProfileDataset, pp_data_dir def test_dataset_to_json(toy_pp_dataset: ProtectionProfileDataset, pp_data_dir: Path, tmp_path: Path): - assert toy_pp_dataset == ProtectionProfileDataset.from_json(pp_data_dir / "pp.json") + assert toy_pp_dataset == ProtectionProfileDataset.from_json(pp_data_dir / "dataset.json") compressed_path = tmp_path / "dset.json.gz" toy_pp_dataset.to_json(compressed_path, compress=True) decompressed_dataset = ProtectionProfileDataset.from_json(compressed_path, is_compressed=True) diff --git a/tests/data/protection_profiles/pp.json b/tests/data/protection_profiles/dataset.json index 7b96cf8c..7b96cf8c 100644 --- a/tests/data/protection_profiles/pp.json +++ b/tests/data/protection_profiles/dataset.json |
