From 809eca76160ab5edf3ea9309fc9b40083a8b23bf Mon Sep 17 00:00:00 2001 From: vedithal-amd Date: Fri, 23 Jan 2026 15:46:58 -0500 Subject: [PATCH] [rocprofiler-compute] Pin dependencies and fix test configuration paths, remove setuptools dependency (#2821) * Pin dependencies and fix test paths for package layout - Pin all dependencies in requirements.txt to specific versions to ensure stability and reproducibility. - Update test_autogen_config.py to correctly resolve source paths for both development and installed package layouts. - Validated compatibility with Python 3.9, 3.10, 3.11, and 3.12. * Remove setuptools dependency since we dont support pip install and instead use cmake --- projects/rocprofiler-compute/requirements.txt | 25 +++++++++---------- .../tests/test_autogen_config.py | 11 ++++++-- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/projects/rocprofiler-compute/requirements.txt b/projects/rocprofiler-compute/requirements.txt index 90b42114e0..e3c5e5bd28 100644 --- a/projects/rocprofiler-compute/requirements.txt +++ b/projects/rocprofiler-compute/requirements.txt @@ -1,14 +1,13 @@ astunparse==1.6.2 -dash-bootstrap-components -dash-svg -dash>=3.0.0 -numpy>=1.17.5 -pandas>=1.4.3 -plotext -plotille -pyyaml -setuptools -sqlalchemy>=2.0.42 -tabulate -textual -textual_plotext +dash-bootstrap-components==2.0.4 +dash-svg==0.0.12 +dash==3.4.0 +numpy==1.26.4 +pandas==2.2.3 +plotext==5.3.2 +plotille==5.0.0 +pyyaml==6.0.3 +sqlalchemy==2.0.46 +tabulate==0.9.0 +textual==7.3.0 +textual_plotext==1.0.1 diff --git a/projects/rocprofiler-compute/tests/test_autogen_config.py b/projects/rocprofiler-compute/tests/test_autogen_config.py index 81db7498c4..5871e1f959 100644 --- a/projects/rocprofiler-compute/tests/test_autogen_config.py +++ b/projects/rocprofiler-compute/tests/test_autogen_config.py @@ -30,8 +30,15 @@ from pathlib import Path import pytest PROJECT_ROOT = Path(__file__).resolve().parents[1] -HASH_DB = PROJECT_ROOT / "src/utils/.config_hashes.json" -ANALYSIS_CONFIGS = PROJECT_ROOT / "src/rocprof_compute_soc/analysis_configs" + +# In development, source is under src/. In installed package, it is at the root. +if (PROJECT_ROOT / "src").exists(): + SRC_ROOT = PROJECT_ROOT / "src" +else: + SRC_ROOT = PROJECT_ROOT + +HASH_DB = SRC_ROOT / "utils/.config_hashes.json" +ANALYSIS_CONFIGS = SRC_ROOT / "rocprof_compute_soc/analysis_configs" def md5(path: Path) -> str: