Fixes: 1) Correct entrypoint scripts by removing redundant `python` reference in `uv run` commands; 2) Resolve incorrect imports and adjust class renaming in vibes_auth tests; 3) Address typing errors and minor omissions in existing code. Extra: 1) Improve formatting in settings and middleware files; 2) Update messaging test class names for clarity; 3) Cleanup unused imports and extra whitespaces, ensuring cleaner codebase.
38 lines
1 KiB
PowerShell
38 lines
1 KiB
PowerShell
param(
|
|
[Alias('r')]
|
|
[string]$Report = ''
|
|
)
|
|
|
|
Set-StrictMode -Version Latest
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
& .\scripts\Windows\starter.ps1
|
|
if ($LASTEXITCODE -ne 0) {
|
|
exit $LASTEXITCODE
|
|
}
|
|
|
|
if (-not $PSBoundParameters.ContainsKey('Report') -or [string]::IsNullOrWhiteSpace($Report)) {
|
|
docker compose exec app uv run coverage erase
|
|
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
|
|
docker compose exec app uv run coverage run --source='.' --omit='storefront/*,monitoring/*,Dockerfiles/*,*/__init__.py,*/tests/*,*/migrations/*,manage.py,evibes/*' manage.py test
|
|
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
|
|
docker compose exec app uv run coverage report -m
|
|
exit $LASTEXITCODE
|
|
}
|
|
|
|
switch ($Report.ToLowerInvariant()) {
|
|
'xml' {
|
|
docker compose exec app uv run coverage xml
|
|
exit $LASTEXITCODE
|
|
}
|
|
'html' {
|
|
docker compose exec app uv run coverage html
|
|
exit $LASTEXITCODE
|
|
}
|
|
default {
|
|
Write-Error "Invalid -Report/-r value '$Report'. Expected 'xml' or 'html'."
|
|
exit 1
|
|
}
|
|
}
|