Use uv to install graphifyy if available#1009
Conversation
safishamsi
left a comment
There was a problem hiding this comment.
Good idea — uv-first detection is the right direction. Two issues that need fixing before merge:
-
Quoting regression: the new code drops quotes around
$PYTHONin$PYTHON -c "...". In the uv branch this works (multi-word string intentionally word-splits), but in the fallbackelsebranchPYTHONis a single path — if it contains a space (e.g./Users/Jane Doe/.venv/bin/python) it will break. The previous code consistently used"$PYTHON". Please restore quoting for the non-uv path. -
.graphify_pythonsemantics: when uv is used,$PYTHON -c "import sys; open(...).write(sys.executable)"writes uv's ephemeral interpreter path into.graphify_python. Subsequent steps that exec that path directly bypass theuv tool runwrapper and may lose thegraphifyyenvironment. Either skip writing.graphify_pythonin the uv branch (and propagate the full invocation string instead), or verify downstream steps still resolveimport graphifywhen using the stored path.
Minor: uv tool list | grep -q "^graphifyy " is format-dependent — uv tool install -q graphifyy is idempotent and more robust than a grep check.
|
Ok, how about this: # Detect the correct Python interpreter (handles uv, pipx, venv, system installs)
mkdir -p graphify-out
if command -v uv &>/dev/null; then
uv tool install -q graphifyy
echo "uv tool run --from graphifyy python" > graphify-out/.graphify_python
else
GRAPHIFY_BIN=$(which graphify 2>/dev/null)
if [ -n "$GRAPHIFY_BIN" ]; then
PYTHON=$(head -1 "$GRAPHIFY_BIN" | tr -d '#!')
case "$PYTHON" in
*[!a-zA-Z0-9/_.-]*) PYTHON="python3" ;;
esac
else
PYTHON="python3"
fi
"$PYTHON" -c "import graphify" 2>/dev/null || "$PYTHON" -m pip install graphifyy -q 2>/dev/null || "$PYTHON" -m pip install graphifyy -q --break-system-packages 2>&1 | tail -3
# Write interpreter path for all subsequent steps
"$PYTHON" -c "import sys; open('graphify-out/.graphify_python', 'w').write(sys.executable)"
fiI also noticed that in several places $(cat .graphify_python) -c "
...is used instead of $(cat graphify-out/.graphify_python) -c "
...Should these code fragments be fixed as well? |
|
Why I'm asking this: Maybe the skill assumes the LLM is able to run the script in the correct directory (graphify-out) but it's actually not smart enough to do so? |
|
The goal is right — uv should be the preferred installer. Two correctness issues to fix:
Fix those two and this is good to go. |
I assume this is an AI response, just duplicating the first one? English isn't my native language, so I didn't recognize the bot at first glance. Too bad, I could have saved my time. |
|
Sorry about the duplicate comment - that was a session context issue on our end, nothing intentional. You're right about the The two issues in the original review still apply to this PR:
Update the PR with those three fixes and it's good to merge. |
|
Hi heavily hallucinating AI! What's your name and version? There is no 8e17973 commit in the repo, why I'm not surprised? |
|
Hey sorry for this, I’ll look into the issue by tonight. Will drop you a
text after my testing for you to try on your end as well.
Thanks
…On Thu, 28 May 2026 at 17:21, Dmitry Bely ***@***.***> wrote:
*db4* left a comment (safishamsi/graphify#1009)
<#1009 (comment)>
Hi heavily hallucinating AI! What's your name and version? There is no
8e17973 commit in the repo, why I'm not surprised?
To @safishamsi <https://github.com/safishamsi> If he occasionally reads
his AI discussions: it's quite unprofessional to treat your contributors
this way. I'm not going to spend my time anymore for this nonsense.
—
Reply to this email directly, view it on GitHub
<#1009?email_source=notifications&email_token=BTSTP67ED5CPUMTPPNYOFPD45BRQVA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINJWGYYDSOBZHAY2M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-4566098981>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BTSTP64U6HGM3HQL7ZZBEKD45BRQVAVCNFSM6AAAAACZLDBBOWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DKNRWGA4TQOJYGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
When graphify is installed via uv tool, the skills currently cannot use it. They try to install it again via
pip install --break-system-packages ..., which is discouraged in the uv ecosystem. This PR enables using uv-installed graphify tool directly.