Skip to content

Commit

Permalink
feat: cli flexibility
Browse files Browse the repository at this point in the history
  • Loading branch information
dPys committed Dec 8, 2024
1 parent d72442d commit c781bfb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
11 changes: 3 additions & 8 deletions nxbench/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ def run_asv_command(
else:
logger.debug("Found .git directory. Using existing repository settings.")

# **Set the 'pythons' field to the current Python executable**
config_data["pythons"] = [str(get_python_executable())]

with tempfile.TemporaryDirectory() as tmpdir:
Expand Down Expand Up @@ -207,15 +208,9 @@ def run_asv_command(
logger.debug(f"Changed working directory to project root: {project_root}")

try:
asv_command = [asv_path, *safe_args]
asv_command = [str(asv_path), *safe_args]
logger.debug(f"Executing ASV command: {' '.join(map(str, asv_command))}")
return subprocess.run( # noqa: S603
asv_command,
capture_output=True,
text=True,
shell=False,
check=check,
)
return safe_run(asv_command)
except subprocess.CalledProcessError:
logger.exception("ASV command failed.")
raise click.ClickException("ASV command failed.")
Expand Down
3 changes: 0 additions & 3 deletions nxbench/configs/asv.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
],
"environment_type": "virtualenv",
"show_commit_url": "https://github.com/dpys/nxbench/commit/",
"pythons": [
"/usr/local/bin/python3.11"
],
"req": [
"networkx==3.4.2",
"nx_parallel==0.3",
Expand Down

0 comments on commit c781bfb

Please sign in to comment.