diff --git a/scripts/bazel-format.sh b/scripts/bazel-format.sh deleted file mode 120000 index e2b5e0c9d3503..0000000000000 --- a/scripts/bazel-format.sh +++ /dev/null @@ -1 +0,0 @@ -../ci/lint/bazel-format.sh \ No newline at end of file diff --git a/scripts/bazel.py b/scripts/bazel.py deleted file mode 120000 index e73f36e03dcac..0000000000000 --- a/scripts/bazel.py +++ /dev/null @@ -1 +0,0 @@ -../ci/run/bazel.py \ No newline at end of file diff --git a/scripts/bazel_cache_credential.json.enc b/scripts/bazel_cache_credential.json.enc deleted file mode 120000 index c4b8e55a05bcb..0000000000000 --- a/scripts/bazel_cache_credential.json.enc +++ /dev/null @@ -1 +0,0 @@ -../ci/build/bazel_cache_credential.json.enc \ No newline at end of file diff --git a/scripts/bazel_export_options b/scripts/bazel_export_options deleted file mode 120000 index 6b1d0d11deef1..0000000000000 --- a/scripts/bazel_export_options +++ /dev/null @@ -1 +0,0 @@ -../ci/run/bazel_export_options \ No newline at end of file diff --git a/scripts/bazel_sharding.py b/scripts/bazel_sharding.py deleted file mode 120000 index d16853e6f0896..0000000000000 --- a/scripts/bazel_sharding.py +++ /dev/null @@ -1 +0,0 @@ -../ci/run/bazel_sharding/bazel_sharding.py \ No newline at end of file diff --git a/scripts/build-docker-images.py b/scripts/build-docker-images.py deleted file mode 120000 index 9a3fb9d3aecfb..0000000000000 --- a/scripts/build-docker-images.py +++ /dev/null @@ -1 +0,0 @@ -../ci/build/build-docker-images.py \ No newline at end of file diff --git a/scripts/build-multinode-image.py b/scripts/build-multinode-image.py deleted file mode 120000 index 5a75e9e516ca4..0000000000000 --- a/scripts/build-multinode-image.py +++ /dev/null @@ -1 +0,0 @@ -../ci/build/build-multinode-image.py \ No newline at end of file diff --git a/scripts/check-bazel-team-owner.py b/scripts/check-bazel-team-owner.py deleted file mode 120000 index 7ec3cc17b348b..0000000000000 --- a/scripts/check-bazel-team-owner.py +++ /dev/null @@ -1 +0,0 @@ -../ci/lint/check-bazel-team-owner.py \ No newline at end of file diff --git a/scripts/check-git-clang-format-output.sh b/scripts/check-git-clang-format-output.sh deleted file mode 120000 index d92f842cf1020..0000000000000 --- a/scripts/check-git-clang-format-output.sh +++ /dev/null @@ -1 +0,0 @@ -../ci/lint/check-git-clang-format-output.sh \ No newline at end of file diff --git a/scripts/check-git-clang-tidy-output.sh b/scripts/check-git-clang-tidy-output.sh deleted file mode 120000 index 0d9b5b53d6a25..0000000000000 --- a/scripts/check-git-clang-tidy-output.sh +++ /dev/null @@ -1 +0,0 @@ -../ci/lint/check-git-clang-tidy-output.sh \ No newline at end of file diff --git a/scripts/check-test-run.py b/scripts/check-test-run.py deleted file mode 120000 index c5954de3539bb..0000000000000 --- a/scripts/check-test-run.py +++ /dev/null @@ -1 +0,0 @@ -../ci/pipeline/check-test-run.py \ No newline at end of file diff --git a/scripts/check_import_order.py b/scripts/check_import_order.py deleted file mode 120000 index a479de4036fd1..0000000000000 --- a/scripts/check_import_order.py +++ /dev/null @@ -1 +0,0 @@ -../ci/lint/check_import_order.py \ No newline at end of file diff --git a/scripts/check_minimal_install.py b/scripts/check_minimal_install.py deleted file mode 120000 index 51a913d13d3ba..0000000000000 --- a/scripts/check_minimal_install.py +++ /dev/null @@ -1 +0,0 @@ -../ci/env/check_minimal_install.py \ No newline at end of file diff --git a/scripts/clang-tidy-diff.py b/scripts/clang-tidy-diff.py deleted file mode 120000 index 5d95690f11e9b..0000000000000 --- a/scripts/clang-tidy-diff.py +++ /dev/null @@ -1 +0,0 @@ -../ci/lint/clang-tidy-diff.py \ No newline at end of file diff --git a/scripts/copyright-format.sh b/scripts/copyright-format.sh deleted file mode 120000 index d6da90fdde911..0000000000000 --- a/scripts/copyright-format.sh +++ /dev/null @@ -1 +0,0 @@ -../ci/lint/copyright-format.sh \ No newline at end of file diff --git a/scripts/default-copyright.txt b/scripts/default-copyright.txt deleted file mode 120000 index b469389453054..0000000000000 --- a/scripts/default-copyright.txt +++ /dev/null @@ -1 +0,0 @@ -../ci/lint/default-copyright.txt \ No newline at end of file diff --git a/scripts/determine_tests_to_run.py b/scripts/determine_tests_to_run.py deleted file mode 120000 index 95f7150bb0056..0000000000000 --- a/scripts/determine_tests_to_run.py +++ /dev/null @@ -1 +0,0 @@ -../ci/pipeline/determine_tests_to_run.py \ No newline at end of file diff --git a/scripts/env_info.sh b/scripts/env_info.sh deleted file mode 120000 index 8a0c02d514268..0000000000000 --- a/scripts/env_info.sh +++ /dev/null @@ -1 +0,0 @@ -../ci/env/env_info.sh \ No newline at end of file diff --git a/scripts/fix-windows-container-networking.ps1 b/scripts/fix-windows-container-networking.ps1 deleted file mode 120000 index 4dd2c3bdf4598..0000000000000 --- a/scripts/fix-windows-container-networking.ps1 +++ /dev/null @@ -1 +0,0 @@ -../ci/pipeline/fix-windows-container-networking.ps1 \ No newline at end of file diff --git a/scripts/get_build_info.py b/scripts/get_build_info.py deleted file mode 120000 index 4329ff77814e1..0000000000000 --- a/scripts/get_build_info.py +++ /dev/null @@ -1 +0,0 @@ -../ci/build/get_build_info.py \ No newline at end of file diff --git a/scripts/git-clang-format b/scripts/git-clang-format deleted file mode 120000 index f9092d1476d67..0000000000000 --- a/scripts/git-clang-format +++ /dev/null @@ -1 +0,0 @@ -../ci/lint/git-clang-format \ No newline at end of file diff --git a/scripts/install-bazel.sh b/scripts/install-bazel.sh deleted file mode 120000 index febb9ea3372e9..0000000000000 --- a/scripts/install-bazel.sh +++ /dev/null @@ -1 +0,0 @@ -../ci/env/install-bazel.sh \ No newline at end of file diff --git a/scripts/install-default.sh b/scripts/install-default.sh deleted file mode 120000 index 27b48fa07e2ca..0000000000000 --- a/scripts/install-default.sh +++ /dev/null @@ -1 +0,0 @@ -../ci/env/install-default.sh \ No newline at end of file diff --git a/scripts/install-dependencies.sh b/scripts/install-dependencies.sh deleted file mode 120000 index 4a0d66db46939..0000000000000 --- a/scripts/install-dependencies.sh +++ /dev/null @@ -1 +0,0 @@ -../ci/env/install-dependencies.sh \ No newline at end of file diff --git a/scripts/install-horovod.sh b/scripts/install-horovod.sh deleted file mode 120000 index 782a1a092af73..0000000000000 --- a/scripts/install-horovod.sh +++ /dev/null @@ -1 +0,0 @@ -../ci/env/install-horovod.sh \ No newline at end of file diff --git a/scripts/install-llvm-binaries.sh b/scripts/install-llvm-binaries.sh deleted file mode 120000 index 3580cd6c859b1..0000000000000 --- a/scripts/install-llvm-binaries.sh +++ /dev/null @@ -1 +0,0 @@ -../ci/env/install-llvm-binaries.sh \ No newline at end of file diff --git a/scripts/install-minimal.sh b/scripts/install-minimal.sh deleted file mode 120000 index fb10d8d3d909c..0000000000000 --- a/scripts/install-minimal.sh +++ /dev/null @@ -1 +0,0 @@ -../ci/env/install-minimal.sh \ No newline at end of file diff --git a/scripts/install-strace.sh b/scripts/install-strace.sh deleted file mode 120000 index d98b1384b194c..0000000000000 --- a/scripts/install-strace.sh +++ /dev/null @@ -1 +0,0 @@ -../ci/env/install-strace.sh \ No newline at end of file diff --git a/scripts/install-toolchains.sh b/scripts/install-toolchains.sh deleted file mode 120000 index 00f5eb3d33970..0000000000000 --- a/scripts/install-toolchains.sh +++ /dev/null @@ -1 +0,0 @@ -../ci/env/install-toolchains.sh \ No newline at end of file diff --git a/scripts/iwyu.sh b/scripts/iwyu.sh deleted file mode 120000 index bf3a011aa78fa..0000000000000 --- a/scripts/iwyu.sh +++ /dev/null @@ -1 +0,0 @@ -../ci/run/iwyu.sh \ No newline at end of file diff --git a/scripts/kind.config.yaml b/scripts/kind.config.yaml deleted file mode 120000 index 322b2e218c3e0..0000000000000 --- a/scripts/kind.config.yaml +++ /dev/null @@ -1 +0,0 @@ -../ci/k8s/kind.config.yaml \ No newline at end of file diff --git a/scripts/pre-push b/scripts/pre-push deleted file mode 120000 index 55c94ca6dac48..0000000000000 --- a/scripts/pre-push +++ /dev/null @@ -1 +0,0 @@ -../ci/lint/pre-push \ No newline at end of file diff --git a/scripts/prep-k8s-environment.sh b/scripts/prep-k8s-environment.sh deleted file mode 120000 index ec05ab826fca6..0000000000000 --- a/scripts/prep-k8s-environment.sh +++ /dev/null @@ -1 +0,0 @@ -../ci/k8s/prep-k8s-environment.sh \ No newline at end of file diff --git a/scripts/py_dep_analysis.py b/scripts/py_dep_analysis.py deleted file mode 120000 index a24c022ef41e3..0000000000000 --- a/scripts/py_dep_analysis.py +++ /dev/null @@ -1 +0,0 @@ -../ci/pipeline/py_dep_analysis.py \ No newline at end of file diff --git a/scripts/py_dep_analysis_test.py b/scripts/py_dep_analysis_test.py deleted file mode 120000 index c52009fa068ea..0000000000000 --- a/scripts/py_dep_analysis_test.py +++ /dev/null @@ -1 +0,0 @@ -../ci/pipeline/py_dep_analysis_test.py \ No newline at end of file diff --git a/scripts/pytest_checker.py b/scripts/pytest_checker.py deleted file mode 100644 index e0e918a9be623..0000000000000 --- a/scripts/pytest_checker.py +++ /dev/null @@ -1,126 +0,0 @@ -import json -import re -import sys -from pathlib import Path - - -def check_file(file_contents: str) -> bool: - """Check file for the snippet""" - return bool(re.search(r"^if __name__ == \"__main__\":", file_contents, re.M)) - - -def parse_json(data: str) -> dict: - return json.loads(data) - - -def treat_path(path: str) -> Path: - """Treat bazel paths to filesystem paths""" - path = path[2:].replace(":", "/") - return Path(path) - - -def get_paths_from_parsed_data(parsed_data: dict) -> list: - # Example JSON input: - # "rule": [ - # { - # "@class": "py_test", - # "@location": "/home/ubuntu/ray/python/ray/tests/BUILD:345:8", - # "@name": "//python/ray/tests:test_tracing", - # "string": [ - # { - # "@name": "name", - # "@value": "test_tracing" - # }, - # ], - # "list": [ - # { - # "@name": "srcs", - # "label": [ - # { - # "@value": "//python/ray/tests:aws/conftest.py" - # }, - # { - # "@value": "//python/ray/tests:conftest.py" - # }, - # { - # "@value": "//python/ray/tests:test_tracing.py" - # } - # ] - # } - # ], - # ... other fields ... - # "label": { - # "@name": "main", - # "@value": "//python/ray/tests:test_runtime_env_working_dir_remote_uri.py" - # }, - # ... other fields ... - # } - # ] - # - # We want to get the location of the actual test file. - # This can be, in order of priority: - # 1. Specified as the "main" label - # 2. Specified as the ONLY "srcs" label - # 3. Specified as the "srcs" label matching the "name" of the test - # https://docs.bazel.build/versions/main/be/python.html#py_test - - paths = [] - for rule in parsed_data["query"]["rule"]: - name = rule["@name"] - if "label" in rule and rule["label"]["@name"] == "main": - paths.append((name, treat_path(rule["label"]["@value"]))) - else: - list_args = {e["@name"]: e for e in rule["list"]} - label = list_args["srcs"]["label"] - if isinstance(label, dict): - paths.append((name, treat_path(label["@value"]))) - else: - # list - string_name = next( - x["@value"] for x in rule["string"] if x["@name"] == "name" - ) - main_path = next( - x["@value"] for x in label if string_name in x["@value"] - ) - paths.append((name, treat_path(main_path))) - return paths - - -def main(data: str): - print("Checking files for the pytest snippet...") - parsed_data = parse_json(data) - paths = get_paths_from_parsed_data(parsed_data) - - bad_paths = [] - for name, path in paths: - # Special case for myst doc checker - if "test_myst_doc" in str(path): - continue - - print(f"Checking test '{name}' | file '{path}'...") - try: - with open(path, "r") as f: - if not check_file(f.read()): - print(f"File '{path}' is missing the pytest snippet.") - bad_paths.append(path) - except FileNotFoundError: - print(f"File '{path}' is missing.") - bad_paths.append((path, "path is missing!")) - if bad_paths: - formatted_bad_paths = "\n".join([str(x) for x in bad_paths]) - raise RuntimeError( - 'Found py_test files without `if __name__ == "__main__":` snippet:' - f"\n{formatted_bad_paths}\n" - "If this is intentional, please add a `no_main` tag to bazel BUILD " - "entry for those files." - ) - - -if __name__ == "__main__": - # Expects a json - # Invocation from workspace root: - # bazel query 'kind(py_test.*, tests(python/...) intersect - # attr(tags, "\bteam:ml\b", python/...) except attr(tags, "\bno_main\b", - # python/...))' --output xml | xq | python scripts/pytest_checker.py - data = sys.stdin.read() - main(data) diff --git a/scripts/run_bazel_test_with_sharding.sh b/scripts/run_bazel_test_with_sharding.sh deleted file mode 120000 index ac00d504253e4..0000000000000 --- a/scripts/run_bazel_test_with_sharding.sh +++ /dev/null @@ -1 +0,0 @@ -../ci/run/run_bazel_test_with_sharding.sh \ No newline at end of file diff --git a/scripts/test-wheels.sh b/scripts/test-wheels.sh deleted file mode 120000 index 08132786acfd7..0000000000000 --- a/scripts/test-wheels.sh +++ /dev/null @@ -1 +0,0 @@ -../ci/build/test-wheels.sh \ No newline at end of file diff --git a/scripts/test-worker-in-container.sh b/scripts/test-worker-in-container.sh deleted file mode 120000 index ad44d66d9105e..0000000000000 --- a/scripts/test-worker-in-container.sh +++ /dev/null @@ -1 +0,0 @@ -../ci/build/test-worker-in-container.sh \ No newline at end of file diff --git a/scripts/upload_build_info.sh b/scripts/upload_build_info.sh deleted file mode 120000 index d8dedfdfb619b..0000000000000 --- a/scripts/upload_build_info.sh +++ /dev/null @@ -1 +0,0 @@ -../ci/build/upload_build_info.sh \ No newline at end of file