Skip to content

Commit

Permalink
chore: use tox to add symlinks (#1089)
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerHYang authored Oct 30, 2024
1 parent c8f7eb5 commit 473701d
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/anthropic
/bedrock
/crewai
/dspy
/groq
/guardrails
/haystack
/instructor
/langchain
/litellm
/llama-index
/mistralai
/openai
/vertexai

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

13 changes: 13 additions & 0 deletions python/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,16 @@ commands =
ci: ruff check --no-fix .
ci: mypy .
ci: pytest -n auto -x -ra {posargs:.}

[testenv:add_symlinks]
description = Add symlinks to packages (for editable install)
changedir = openinference-instrumentation/src/openinference/instrumentation
commands =
python -c 'from pathlib import Path;[(l.symlink_to(t,True) if not (l:=Path.cwd()/d.name[30:]).exists() and (t:=d/"src"/"openinference"/"instrumentation"/d.name[30:].replace("-","_")).exists() else None) for d in (Path.cwd().parent.parent.parent.parent/"instrumentation").iterdir() if d.is_dir()]'

[testenv:remove_symlinks]
description = Remove symlinks to packages
changedir = openinference-instrumentation/src/openinference/instrumentation
allowlist_externals = find
commands =
find . -maxdepth 1 -type l -exec unlink {} \;

0 comments on commit 473701d

Please sign in to comment.