Feat: create fs_datacatalogue

This commit is contained in:
2024-11-05 06:55:05 +01:00
parent 88795fdad3
commit 07fb92e2fa
10 changed files with 47 additions and 117 deletions

View File

@@ -42,12 +42,12 @@ def test_init(location):
def test_list_schema(location):
repo = FSDataCatalogue("example", location)
assert {id: s.model_dump()["id"] for id, s in repo.schemas().items()} == {
assert {id: s.model_dump()["ref"]["id"] for id, s in repo.schemas().items()} == {
".": ".",
"username": "username",
"salary": "salary",
}
assert {id: s.model_dump()["value"] for id, s in repo.schemas().items()} == {
assert {id: s.model_dump()["ref"]["value"] for id, s in repo.schemas().items()} == {
".": ".",
"username": "username",
"salary": "salary",
@@ -62,11 +62,11 @@ def test_list_schema(location):
def test_list_tables(location):
repo = FSDataCatalogue("example", location)
assert repo.tables() == {}
assert {id: t.model_dump()["value"] for id,t in repo.tables("username").items()} == {
assert {id: t.model_dump()["ref"]["value"] for id,t in repo.tables("username").items()} == {
"username.csv": "username.csv",
"username-password-recovery-code.xlsx": "username-password-recovery-code.xlsx",
"username-password-recovery-code.xls": "username-password-recovery-code.xls",
}
assert {id: t.model_dump()["value"] for id,t in repo.tables("salary").items()} == {
assert {id: t.model_dump()["ref"]["value"] for id,t in repo.tables("salary").items()} == {
"salary.pdf": "salary.pdf",
}