MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / find_valid_dataset_dirs

Function find_valid_dataset_dirs

scripts/export-dbs.py:25–38  ·  view source on GitHub ↗
(dataset_root)

Source from the content-addressed store, hash-verified

23
24# Find all datasets that have a schema.cypher and copy.cypher file.
25def find_valid_dataset_dirs(dataset_root):
26 valid_dirs = []
27
28 for root, dirs, files in os.walk(dataset_root):
29 # This script creates a tmp directory with the exported dbs, we should
30 # skip it in our search.
31 if "tmp" in root.split(os.sep):
32 continue
33 file_set = set(files)
34
35 if "schema.cypher" in file_set:
36 valid_dirs.append(root)
37
38 return valid_dirs
39
40
41# Example scripts/export-dbs.py build/debug/tools/shell/lbug dataset.

Callers 1

mainFunction · 0.85

Calls 2

splitMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected