Commit 63bf8197 authored by Cecconi Baptiste's avatar Cecconi Baptiste
Browse files

use not_implemented.json to trace NotImplemented collections

parent 4227a928
Pipeline #15347 failed with stages
in 4 minutes and 40 seconds
["cdpp_dmt_n1_1134", "cdpp_isee3_sbh", "uiowa_isee3_raw", "co_rpws_hfr_kronos_n1", "co_rpws_hfr_kronos_n2", "co_rpws_hfr_kronos_n0", "co_rpws_hfr_kronos_n3b_dsq", "co_rpws_hfr_kronos_n3c_dsq", "co_rpws_hfr_kronos_n3d_dsq", "co_rpws_hfr_kronos_n3e_dsq", "srn_nda_routine_jup_raw", "srn_nda_newroutine_dat", "srn_nda_junon_dat", "srn_nda_mefisto_dat", "radiojove_sps"]
......@@ -22,6 +22,7 @@ ROOT_DATA_DIRECTORY = Path(__file__).parent / "data"
# test data sample
TEST_COLLECTIONS_FILE = ROOT_DATA_DIRECTORY / "collections.json"
NOT_IMPLEMENTED_FILE = ROOT_DATA_DIRECTORY / "not_implemented.json"
with open(TEST_COLLECTIONS_FILE, "r") as f:
DATA_FILES = json.load(f)
......
......@@ -5,8 +5,9 @@ from maser.data.base import (
CdfData,
FitsData,
)
from .fixtures import test_filepaths
from .fixtures import test_filepaths, NOT_IMPLEMENTED_FILE
from pathlib import Path
import json
import pytest
......@@ -46,6 +47,12 @@ def test_any_dataset(filepath, dataset):
data = Data(filepath)
assert data.dataset == dataset
except NotImplementedError:
with open(NOT_IMPLEMENTED_FILE, "r") as f:
not_implemented = json.load(f)
if dataset not in not_implemented:
not_implemented.append(dataset)
with open(NOT_IMPLEMENTED_FILE, "w") as f:
json.dump(not_implemented, f)
print(f"Dataset not implemented {str(filepath)}")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment