File size: 611 Bytes
f6712ff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$ErrorActionPreference = "Stop"

$root = Split-Path -Parent $MyInvocation.MyCommand.Path
$repo = Resolve-Path (Join-Path $root "..")
Set-Location $repo

$pattern = 'v3_[a-zA-Z0-9_]+\.(csv|json|npz|png)'
$matches = Select-String -Path "notebooks\*.ipynb" -Pattern $pattern

if ($matches) {
    Write-Host "Found version-prefixed artifact filenames:" -ForegroundColor Yellow
    foreach ($m in $matches) {
        Write-Host ("{0}:{1}: {2}" -f $m.Path, $m.LineNumber, $m.Line.Trim())
    }
    exit 1
}

Write-Host "Notebook artifact naming check passed (no v3_ filename prefixes)." -ForegroundColor Green
exit 0