Rewrite XSY module.

This commit is contained in:
Josh Lucas
2026-06-26 09:47:58 -05:00
parent 7bf3df4da2
commit 804fff9769
4 changed files with 220 additions and 115 deletions

View File

@@ -10,16 +10,17 @@ def test_init():
def test_export():
xsy = XSY()
datablock = xsy.read("tests/data/hsps.xsy", expand=False)
print(xsy.def_paths)
out_path = "tests/output"
datablock.to_csv(
os.path.join(out_path, 'datablock.csv'),
os.path.join(out_path, "datablock.csv"),
index=False
)
xsy.defs.to_csv(
os.path.join(out_path, 'defs.csv'),
os.path.join(out_path, "defs.csv"),
index=False
)
xsy.expand_datablock(datablock).to_csv(
os.path.join(out_path, 'expanded.csv'),
os.path.join(out_path, "expanded.csv"),
index=False
)