Add ABC for data formats and refactor XSY module to match.

This commit is contained in:
Josh Lucas
2026-05-28 15:51:46 -05:00
parent 933cec6a0c
commit 59bb7ec24c
6 changed files with 126 additions and 57 deletions

View File

@@ -8,9 +8,10 @@ def test_init():
assert isinstance(XSY("tests/data/hsps.xsy"), XSY)
def test_export():
xsy = XSY("tests/data/hsps.xsy")
xsy = XSY()
datablock = xsy.read("tests/data/hsps.xsy", expand=False)
out_path = "tests/output"
xsy.datablock.to_csv(
datablock.to_csv(
os.path.join(out_path, 'datablock.csv'),
index=False
)
@@ -18,7 +19,7 @@ def test_export():
os.path.join(out_path, 'defs.csv'),
index=False
)
xsy.datablock_expanded.to_csv(
xsy.expand_datablock(datablock).to_csv(
os.path.join(out_path, 'expanded.csv'),
index=False
)