From 7a6086d0af6455aa00bfadeb4a145ff9043ecb32 Mon Sep 17 00:00:00 2001 From: edknv <109497216+edknv@users.noreply.github.com> Date: Mon, 29 May 2023 01:09:39 -0700 Subject: [PATCH] Fix CI path detection for changed files (#1124) * Fix CI path detection for changed files * modify a file in xgb directory * check if full name exists in mapping * Revert "modify a file in xgb directory" This reverts commit 3dc918c919d35e272a275a169ac0795877edcee0. * modify a file in xgb directory --------- Co-authored-by: Marc Romeyn --- merlin/models/xgb/__init__.py | 2 +- tests/conftest.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/merlin/models/xgb/__init__.py b/merlin/models/xgb/__init__.py index 35342ff75f..720705f668 100644 --- a/merlin/models/xgb/__init__.py +++ b/merlin/models/xgb/__init__.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2022, NVIDIA CORPORATION. +# Copyright (c) 2023, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/tests/conftest.py b/tests/conftest.py index 361d8fd214..9a5fc53d95 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -86,6 +86,7 @@ def dask_client() -> distributed.Client: def pytest_collection_modifyitems(items): changed_backends = ci_utils.get_changed_backends() + full_name_to_alias = {v: k for k, v in ci_utils.BACKEND_ALIASES.items()} for item in items: path = item.location[0] @@ -99,6 +100,8 @@ def pytest_collection_modifyitems(items): item.add_marker(getattr(pytest.mark, marker)) for changed in changed_backends: + if changed in full_name_to_alias: + changed = full_name_to_alias[changed] if f"/{changed}/" in path: item.add_marker(pytest.mark.changed)