- Remove dev/scripts/check-file-organization.sh (obsolete organization checker) - Remove dev/scripts/community_onboarding.py (unused 559-line automation script) - Update gpu_miner_host.py log path from /home/oib/windsurf/aitbc to /opt/aitbc - Add service status and standardization badges to README.md
21 lines
901 B
Python
21 lines
901 B
Python
import re
|
|
import os
|
|
from glob import glob
|
|
|
|
# The issue is that config.coordinator_url in the CLI already contains "/v1" if run with `--url http://127.0.0.1:8000/v1`
|
|
# Thus f"{config.coordinator_url}/v1/jobs" results in "http://127.0.0.1:8000/v1/v1/jobs" which is a 404!
|
|
# Let's fix ALL files in cli/aitbc_cli/commands/ to remove the extra /v1 when hitting the coordinator.
|
|
|
|
cli_commands_dir = "/home/oib/windsurf/aitbc/cli/aitbc_cli/commands"
|
|
for filepath in glob(os.path.join(cli_commands_dir, "*.py")):
|
|
with open(filepath, "r") as f:
|
|
content = f.read()
|
|
|
|
# We want to replace {config.coordinator_url}/v1/ with {config.coordinator_url}/
|
|
new_content = content.replace('{config.coordinator_url}/v1/', '{config.coordinator_url}/')
|
|
|
|
if new_content != content:
|
|
with open(filepath, "w") as f:
|
|
f.write(new_content)
|
|
print(f"Patched {filepath}")
|