Skip to content

Use package_tool in general_setup#70

Merged
dvalinrh merged 1 commit intomainfrom
update_package_too
Mar 20, 2026
Merged

Use package_tool in general_setup#70
dvalinrh merged 1 commit intomainfrom
update_package_too

Conversation

@dvalinrh
Copy link
Copy Markdown
Contributor

Description

Replacing ${TOOLS_BIN}/package_tool with package_tool so we use the wrapper in general_setup

Before/After Comparison

Before: Calling package_tool script directly, possible impacting options passed
After: Using the wrapper around package_tools

Clerical Stuff

This closes #69

Relates to JIRA: RPOPC-894

Testing
Verified the wrapper still ran as expected.
CSV File generate
Test,Avg,Unit,Start_Date,End_Date
2to3,440.03,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
async_generators,508.68,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
async_tree_none,926.15,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
async_tree_cpu_io_mixed,1.27,sec,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
async_tree_io,2.28,sec,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
async_tree_memoization,1.09,sec,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
asyncio_tcp,34.26,sec,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
asyncio_tcp_ssl,2.91,sec,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
asyncio_websockets,717.03,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
chameleon,13.27,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
chaos,154.67,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
comprehensions,36.63,us,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
bench_mp_pool,15.01,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
bench_thread_pool,1.54,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
coroutines,56.98,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
coverage,77.77,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
crypto_pyaes,156.47,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
dask,725.37,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
deepcopy,609.20,us,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
deepcopy_reduce,5.24,us,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
deepcopy_memo,75.58,us,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
deltablue,9.94,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
docutils,3.91,sec,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
dulwich_log,97.63,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
fannkuch,679.72,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
float,170.03,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
create_gc_cycles,1.75,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
gc_traversal,3.84,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
generators,70.30,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
genshi_text,41.56,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
genshi_xml,82.83,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
go,351.62,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
hexiom,13.73,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
html5lib,113.02,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
json_dumps,17.80,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
json_loads,36.55,us,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
logging_format,11.90,us,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
logging_silent,272.13,ns,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
logging_simple,11.01,us,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
mako,23.49,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
mdp,3.76,sec,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
meteor_contest,146.68,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
nbody,197.22,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
nqueens,136.53,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
pathlib,24.28,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
pickle,13.05,us,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
pickle_dict,36.78,us,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
pickle_list,5.88,us,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
pickle_pure_python,608.58,us,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
pidigits,230.80,ms,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z
pprint_pformat,2.02,sec,2026-03-20T15:48:12Z,2026-03-20T16:54:25Z

@dvalinrh dvalinrh requested a review from kdvalin March 20, 2026 17:08
@qodo-code-review
Copy link
Copy Markdown
Contributor

ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan

Review Summary by Qodo

Use package_tool wrapper in general_setup
✨ Enhancement

Grey Divider

Walkthroughs

Description
• Replace direct package_tool script calls with wrapper invocation
• Use package_tool command instead of $TOOLS_BIN/package_tool path
• Simplifies dependency and package installation in general setup
Diagram
flowchart LR
  A["Direct path<br/>$TOOLS_BIN/package_tool"] -->|"Replace with"| B["Wrapper command<br/>package_tool"]
  B -->|"Install Python deps"| C["Python dependencies"]
  B -->|"Install packages"| D["System packages<br/>+ pyperformance"]
Loading

Grey Divider

File Changes

1. pyperf/pyperf_run ✨ Enhancement +2/-2

Replace direct package_tool path with wrapper

• Changed two $TOOLS_BIN/package_tool calls to use package_tool wrapper
• First call installs Python dependencies via wrapper config
• Second call installs system packages and pyperformance via wrapper

pyperf/pyperf_run


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown
Contributor

qodo-code-review Bot commented Mar 20, 2026

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0) 📐 Spec deviations (0)

Grey Divider


Action required

1. package_tool command not found 🐞 Bug ⛯ Reliability
Description
pyperf/pyperf_run now invokes package_tool without an absolute path, but the script never adds
$TOOLS_BIN (where the tools repo is cloned) to PATH, so dependency installation can fail with
command not found or run a different binary than intended.
Code

pyperf/pyperf_run[R403-409]

+	package_tool --wrapper_config $python_dep_file

	if [[ $? -ne 0 ]]; then
		exit_out "Error installing needed python dependencies" $E_GENERAL
	fi

-	$TOOLS_BIN/package_tool --wrapper_config $base_dir/../pyperf.json $pkg_list --pip_packages "pyperformance==$PYPERF_VERSION"
+	package_tool --wrapper_config $base_dir/../pyperf.json $pkg_list --pip_packages "pyperformance==$PYPERF_VERSION"
Evidence
The script sets TOOLS_BIN to $HOME/test_tools and executes other tools via $TOOLS_BIN/<tool>
(so it does not rely on PATH for tools). It only appends /usr/local/bin to PATH and does not
include $TOOLS_BIN, yet the modified lines call package_tool without $TOOLS_BIN/, making
resolution PATH-dependent and likely to fail on systems without a globally-installed package_tool.

pyperf/pyperf_run[18-31]
pyperf/pyperf_run[306-306]
pyperf/pyperf_run[403-413]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`pyperf/pyperf_run` calls `package_tool` without an absolute path, but the script does not add `$TOOLS_BIN` to `PATH`. This can cause `package_tool` to be missing (command-not-found) or resolve to an unintended binary.

## Issue Context
The script clones/uses tooling under `$TOOLS_BIN` and calls other tools explicitly via `$TOOLS_BIN/&lt;tool&gt;`, so `package_tool` should be invoked consistently or PATH should be updated in a controlled way.

## Fix Focus Areas
- pyperf/pyperf_run[18-31]
- pyperf/pyperf_run[325-326]
- pyperf/pyperf_run[403-413]

## Expected fix
Implement one of:
1) Revert to explicit invocation: `&quot;$TOOLS_BIN/package_tool&quot; ...` (consistent with other tool calls), OR
2) Before the first `package_tool` call, add a deterministic PATH update: `export PATH=&quot;$TOOLS_BIN:$PATH&quot;` and optionally validate with `command -v package_tool &gt;/dev/null` and fail with `exit_out` if missing.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@github-actions
Copy link
Copy Markdown

This relates to RPOPC-894

Comment thread pyperf/pyperf_run
Copy link
Copy Markdown
Member

@kdvalin kdvalin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dvalinrh dvalinrh merged commit 4f29e2b into main Mar 20, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

use package_tool in general_setup

2 participants