diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000000..a3c46a9dd7 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,9 @@ +import sys +from pathlib import Path + +client_path = Path(__file__).resolve().parent.parent / "client" + +# add client path to sys.path +sys.path.append(str(client_path)) + +print(f"Added {client_path} to sys.path") diff --git a/tools/manage.ps1 b/tools/manage.ps1 index 23c52d57be..1fb57fe445 100755 --- a/tools/manage.ps1 +++ b/tools/manage.ps1 @@ -233,6 +233,13 @@ function Invoke-Codespell { & $Poetry $CodespellArgs } +function Run-From-Code { + $Poetry = "$RepoRoot\.poetry\bin\poetry.exe" + $RunArgs = @( "run") + + & $Poetry $RunArgs @arguments +} + function Write-Help { <# .SYNOPSIS @@ -248,6 +255,7 @@ function Write-Help { Write-Info -Text " ruff-check ", "Run Ruff check for the repository" -Color White, Cyan Write-Info -Text " ruff-fix ", "Run Ruff fix for the repository" -Color White, Cyan Write-Info -Text " codespell ", "Run codespell check for the repository" -Color White, Cyan + Write-Info -Text " run ", "Run the repository" -Color White, Cyan Write-Host "" } @@ -269,6 +277,9 @@ function Resolve-Function { } elseif ($FunctionName -eq "codespell") { Set-Cwd Invoke-CodeSpell + } elseif ($FunctionName -eq "run") { + Set-Cwd + Run-From-Code } else { Write-Host "Unknown function ""$FunctionName""" Write-Help