-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6241574
commit 8526550
Showing
5 changed files
with
64 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,25 @@ | ||
import sys | ||
|
||
from models.connector_models import ConnectorSettings | ||
from models.user_models import SimilaritySettings, MetadataSettings | ||
|
||
from models.connector_models import FSConnectorSettings, FileType as ft | ||
from models.user_models import SimilaritySettings, MetadataSettings, ComparatorType as ct, RunType | ||
import runner as r | ||
|
||
if __name__ == "__main__": | ||
def get_arg(index, message): | ||
try: | ||
directory = sys.argv[1] | ||
run_type = sys.argv[2] # all, metadata, similarity | ||
settings = SimilaritySettings() | ||
settings.connector = ConnectorSettings(file_type=("csv", "parquet"), files_paths=[], directory_paths=directory) | ||
settings.metadata = MetadataSettings(all=True, kinds=True, types=True, embeddings=True) | ||
settings.run_type = run_type | ||
r.run(settings) | ||
return sys.argv[index] | ||
except IndexError: | ||
print("Add path to directory") | ||
print(message) | ||
sys.exit(1) | ||
|
||
if __name__ == "__main__": | ||
directory = get_arg(1,"Add path to directory") | ||
run_type = get_arg(2,"Add run type, all metadata, similarity") # all, metadata, similarity | ||
comparator_type = get_arg(3,"Add comparator type: by_column, by_type ") # by_column, by_type | ||
settings = SimilaritySettings(connector=FSConnectorSettings(file_type=(ft.CSV, ft.PARQUET), files_paths=[], directory_paths=[directory]), | ||
metadata=MetadataSettings(all=True, kinds=True, types=True, embeddings=True), | ||
run_type=RunType(run_type), | ||
comparator_type=ct.BY_COLUMN if comparator_type == "by_column" else ct.BY_TYPE | ||
) | ||
result = r.run(settings) | ||
print(result) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters