Format source code to PEP8 using Ruff (#36)

* added ruff docs

* style: Run ruff and black before yapf pass

* yapf -r -i (23 fixes)

* fixed conf.py and ran ruff format .

* fixed conf.py 2

* formatted argparser.py

* formatted src/rocprof_compute_analyze

* formatted src/rocprof_compute_profile

* formatted soc_base.py

* formatted rocprof_compute_tui

* formatted gui_components

* formatted src/utils

* formatted tests/

* format extra files

* cleanup

* fix test_utils.py

* fixed typos

* Update pyproject.toml

* Update README.md

* Update test_utils.py

---------

Signed-off-by: jamessiddeley-amd <James.Siddeley@amd.com>
Co-authored-by: James Siddeley <James.Siddeley@amd.com>
Co-authored-by: systems-assistant[bot] <systems-assistant[bot]@users.noreply.github.com>
Tá an tiomantas seo le fáil i:
údaraithe agus GitHub tiomanta 2025-08-08 15:32:30 -04:00
1 tuismitheoir d3f9ab25eb
tiomantas 58d2a016ce
72 comhad athraithe
+3272 -2395

Níor tháinig aon chomhaid le do chuardach

+13 -6
Féach ar an gComhad
@@ -1,10 +1,12 @@
# NOTES
#
# Read utils/unified_config.yaml and split it into per gfx architecture per panel config files
# WARNING: This script will overwrite existing files under per gfx architecture folders under src/rocprof_compute_soc/analysis_configs
# Read utils/unified_config.yaml and split it into per gfx architecture per panel
# config files. WARNING: This script will overwrite existing files under per gfx
# architecture folders under src/rocprof_compute_soc/analysis_configs.
#
# Read utils/unified_config.yaml and split it into metric tables per documentation section
# WARNING: This script will overwrite existing docs/data/metrics_description.yaml
# Read utils/unified_config.yaml and split it into metric tables per documentation
# section.
# WARNING: This script will overwrite existing docs/data/metrics_description.yaml.
import copy
import hashlib
@@ -21,6 +23,10 @@ SETS_TARGET_DIR = ROOT_DIR.joinpath(
"src", "rocprof_compute_soc", "profile_configs", "sets"
)
DOC_TARGET_DIR = ROOT_DIR.joinpath("docs", "data")
AUTOGEN_TEXT = (
"# AUTOGENERATED FILE. Only edit for testing purposes, not for development. "
"Generated from utils/unified_config.yaml. Generated by utils/split_config.py\n"
)
HASH_FILE = ROOT_DIR.joinpath("utils", "autogen_hash.yaml")
HASH_FILE_MAP = {}
GFX_VERSIONS = ["gfx908", "gfx90a", "gfx940", "gfx941", "gfx942", "gfx950"]
@@ -75,7 +81,6 @@ def update_analysis_config():
data_source_config["metric_table"]["metric"] = data_source_config[
"metric_table"
]["metric"][gfx_version]
build_metric_id_mapping(
panel_id_int,
data_source_index,
@@ -209,7 +214,9 @@ def update_documentation():
for metric_name in sorted(list(metric_names)):
metrics_info[metric_name] = {
"rst": panel_config["metrics_description"][metric_name]["rst"],
"unit": panel_config["metrics_description"][metric_name]["unit"],
"unit": panel_config["metrics_description"][metric_name][
"unit"
],
}
panel_metric_map[data_source["metric_table"]["id"]] = metrics_info