diff --git a/docs/copy_examples.py b/docs/copy_examples.py index 04554084..d8c92371 100644 --- a/docs/copy_examples.py +++ b/docs/copy_examples.py @@ -20,10 +20,22 @@ def write_file(file_path: Path) -> None: dst.write(src.read()) -banned_directories = ["cache", "files", "example_files", "__pycache__", "lightning_logs"] +banned_directories = [ + "cache", + "files", + "example_files", + "__pycache__", + "lightning_logs", +] +banned_extensions = [".pbf", ".parquet", ".json", ".geojson", ".pt"] for i in EXAMPLES_DIRECTORY_PATH.glob("**/*"): if i.is_file(): should_copy = True + for banned_extension in banned_extensions: + if banned_extension in i.suffixes: + should_copy = False + break + for banned_directory in banned_directories: if banned_directory in i.parts: should_copy = False