From c2f94afde466ab2b50baf2f140e8d9c8426cc759 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Mon, 3 Mar 2025 15:11:02 +0000 Subject: [PATCH] basic template of validator --- etl/src/etl/main.py | 13 ++++++++++++- etl/src/etl/validator/__init__.py | 0 etl/src/etl/validator/retrohome.py | 12 +++++++++--- 3 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 etl/src/etl/validator/__init__.py diff --git a/etl/src/etl/main.py b/etl/src/etl/main.py index 0074267..282f405 100644 --- a/etl/src/etl/main.py +++ b/etl/src/etl/main.py @@ -1,5 +1,16 @@ -print("hello world ") +import os +from validator.retrohome import RetroHomeFileStructureValidator +DATA_LOC = "/workspaces/survey-extraction/data/" + +def main(): + RetroHomeFileStructureValidator(DATA_LOC) + +if __name__ == "__main__": + main() + + +# Make a file checker to see if retrohomes as sumbitted the correct structure # Read file from local file path directory # proof of concept of some validator # proof of concept of something i do with a particular flie diff --git a/etl/src/etl/validator/__init__.py b/etl/src/etl/validator/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/etl/src/etl/validator/retrohome.py b/etl/src/etl/validator/retrohome.py index e814361..3918ed0 100644 --- a/etl/src/etl/validator/retrohome.py +++ b/etl/src/etl/validator/retrohome.py @@ -1,6 +1,12 @@ +import os +class RetroHomeFileStructureValidator(): + def __init__(self, source_loc_path): + self.source_path = source_loc_path + self.correct_names = [] + self.incorrect_names = [] + self.validate() -class RetroHomeValidator(): - def __init__(self, file_path): - pass + def validate(self): + print("nothing to validate")