mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Add client path to sys.path and run repository from code
- Added client path to sys.path in conftest.py - Implemented function to run the repository from code in manage.ps1
This commit is contained in:
parent
885f8acd2b
commit
2980f10040
2 changed files with 20 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue