Skip to content

Commit

Permalink
Allow test package uploads (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
raydouglass authored Dec 18, 2024
1 parent 9915e90 commit 800ccca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
18 changes: 4 additions & 14 deletions tests/test_rapids-find-anaconda-uploads.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,6 @@ def test_get_pkg_name_from_filename(filename, pkg_name):
assert mod.get_pkg_name_from_filename(filename) == pkg_name


@pytest.mark.parametrize(
"pkg_name, result",
[
("custreamz", False),
("strings_udf", False),
("dask-cudf", False),
("", False),
("libcudf-tests", True),
],
)
def test_is_test_pkg(pkg_name, result):
assert mod.is_test_pkg(pkg_name) == result


@pytest.mark.parametrize(
"env_var, pkg_name, result",
[
Expand Down Expand Up @@ -113,7 +99,9 @@ def test_file_filter_fn():
"./cudf_conda_python_cuda11_39_aarch64/linux-aarch64/some-pkg-23.02.00a-cuda11_py39_g10bab945_72.tar.bz2",
"./cudf_conda_python_cuda11_38_aarch64/linux-aarch64/some-pkg-private-23.02.00a-cuda11_py38_g10bab945_72.tar.bz2",
"./cudf_conda_python_cuda11_38_aarch64/linux-aarch64/some-pkg-23.02.00a-cuda11_py38_g10bab945_72.tar.bz2",
"./cudf_conda_cpp_cuda11_aarch64/linux-aarch64/libcudf-tests-23.02.00a-cuda11_g10bab945_72.tar.bz2",
"./cudf_conda_cpp_cuda11_aarch64/linux-aarch64/libcudf-23.02.00a-cuda11_g10bab945_72.tar.bz2",
"./cudf_conda_cpp_cuda11_x86_64/linux-64/libcudf-tests-23.02.00a-cuda11_g10bab945_72.tar.bz2",
"./cudf_conda_cpp_cuda11_x86_64/linux-64/libcudf-23.02.00a-cuda11_g10bab945_72.tar.bz2",
]

Expand All @@ -128,6 +116,8 @@ def test_file_filter_fn():
"./cudf_conda_python_cuda11_39_aarch64/linux-aarch64/some-pkg-23.02.00a-cuda11_py39_g10bab945_72.tar.bz2",
"./cudf_conda_python_cuda11_38_aarch64/linux-aarch64/some-pkg-private-23.02.00a-cuda11_py38_g10bab945_72.tar.bz2",
"./cudf_conda_python_cuda11_38_aarch64/linux-aarch64/some-pkg-23.02.00a-cuda11_py38_g10bab945_72.tar.bz2",
"./cudf_conda_cpp_cuda11_aarch64/linux-aarch64/libcudf-tests-23.02.00a-cuda11_g10bab945_72.tar.bz2",
"./cudf_conda_cpp_cuda11_aarch64/linux-aarch64/libcudf-23.02.00a-cuda11_g10bab945_72.tar.bz2",
"./cudf_conda_cpp_cuda11_x86_64/linux-64/libcudf-tests-23.02.00a-cuda11_g10bab945_72.tar.bz2",
"./cudf_conda_cpp_cuda11_x86_64/linux-64/libcudf-23.02.00a-cuda11_g10bab945_72.tar.bz2",
]
10 changes: 0 additions & 10 deletions tools/rapids-find-anaconda-uploads.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,6 @@ def get_pkg_name_from_filename(filename):
return "-".join(filename.split("-")[:-2])


def is_test_pkg(pkg_name):
"""
Returns true if the package name matches the pattern we use for
gtest packages.
"""
return pkg_name.endswith("-tests")


def is_skip_pkg(pkg_name):
"""
Returns true if the package name is in the "SKIP_UPLOAD_PKGS"
Expand All @@ -54,8 +46,6 @@ def file_filter_fn(file_path):
filename = path.basename(file_path)
pkg_name = get_pkg_name_from_filename(filename)

if is_test_pkg(pkg_name):
return False
if is_skip_pkg(pkg_name):
return False

Expand Down

0 comments on commit 800ccca

Please sign in to comment.