mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 23:08:36 +00:00
remove the scratch audit scripts that were committed by mistake; _tmp_audit/ is ignored
This commit is contained in:
1 parent
a1a3b6bbeb
commit
ba484c716f
3 files changed
+3
-49
No files matched your search
@@ -124,3 +124,6 @@ node_modules/
|
||||
/build-vision-spark/
|
||||
/terminal/.venv-build/
|
||||
/.venv-build/
|
||||
|
||||
# scratch folder of local audit scripts (never committed)
|
||||
_tmp_audit/
|
||||
@@ -1,34 +0,0 @@
|
||||
"""Read-only: stream each hy4 package of the v0.2.21 release (nothing is saved) and run tools/packaging/lib_notices rules over its member list.
|
||||
python _tmp_audit/hy4_audit.py _tmp_audit/hy4_urls.txt"""
|
||||
import sys
|
||||
import tarfile
|
||||
import urllib.request
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "tools" / "packaging"))
|
||||
import lib_notices # noqa: E402
|
||||
|
||||
for url in Path(sys.argv[1]).read_text().split():
|
||||
name = url.rsplit("/", 1)[-1]
|
||||
try:
|
||||
req = urllib.request.Request(url, headers={"User-Agent": "audit"})
|
||||
with urllib.request.urlopen(req, timeout=300) as resp:
|
||||
names = []
|
||||
with tarfile.open(fileobj=resp, mode="r|gz") as t:
|
||||
for m in t:
|
||||
if m.isfile():
|
||||
names.append(m.name)
|
||||
except Exception as exc: # noqa: BLE001
|
||||
print(f"{name}: ERROR {exc}")
|
||||
continue
|
||||
names = [n[2:] if n.startswith("./") else n for n in names]
|
||||
lic = sorted(n for n in names if "licenses/" in "/" + n.lower())
|
||||
libs = [n for n in names if lib_notices.is_library(n)]
|
||||
bad = []
|
||||
for n in libs:
|
||||
rule = lib_notices.rule_for(n)
|
||||
if rule is None:
|
||||
bad.append(f"{Path(n).name} (no rule)")
|
||||
elif rule and not any(any(Path(l).name == r for l in lic) for r in rule):
|
||||
bad.append(f"{Path(n).name} (needs {rule[0]})")
|
||||
print(f"{name}: {len(names)} files, {len(libs)} libraries, licence files {len(lic)} {[Path(l).name for l in lic][:6]}; libraries without their notice: {len(bad)} {bad[:6]}", flush=True)
|
||||
@@ -1,15 +0,0 @@
|
||||
https://github.com/Niko1221/Strata/releases/download/v0.2.21/strata-hy4-0.1.67-linux-aarch64-cuda-cuda13.tar.gz
|
||||
https://github.com/Niko1221/Strata/releases/download/v0.2.21/strata-hy4-0.1.67-linux-x86_64-cuda-cuda12.tar.gz
|
||||
https://github.com/Niko1221/Strata/releases/download/v0.2.21/strata-hy4-0.1.67-linux-x86_64-cuda-cuda13.tar.gz
|
||||
https://github.com/Niko1221/Strata/releases/download/v0.2.21/strata-hy4-0.1.67-linux-x86_64-hip-halo.tar.gz
|
||||
https://github.com/Niko1221/Strata/releases/download/v0.2.21/strata-hy4-0.1.67-linux-x86_64-hip-rx6000.tar.gz
|
||||
https://github.com/Niko1221/Strata/releases/download/v0.2.21/strata-hy4-0.1.67-linux-x86_64-hip-rx7900.tar.gz
|
||||
https://github.com/Niko1221/Strata/releases/download/v0.2.21/strata-hy4-0.1.67-linux-x86_64-hip-rx9070.tar.gz
|
||||
https://github.com/Niko1221/Strata/releases/download/v0.2.21/strata-hy4-0.1.67-linux-x86_64-sycl.tar.gz
|
||||
https://github.com/Niko1221/Strata/releases/download/v0.2.21/strata-hy4-0.1.67-macos-arm64-metal.tar.gz
|
||||
https://github.com/Niko1221/Strata/releases/download/v0.2.21/strata-hy4-0.1.67-windows-x86_64-cuda-cuda12.tar.gz
|
||||
https://github.com/Niko1221/Strata/releases/download/v0.2.21/strata-hy4-0.1.67-windows-x86_64-cuda-cuda13.tar.gz
|
||||
https://github.com/Niko1221/Strata/releases/download/v0.2.21/strata-hy4-0.1.67-windows-x86_64-hip-rdna2.tar.gz
|
||||
https://github.com/Niko1221/Strata/releases/download/v0.2.21/strata-hy4-0.1.67-windows-x86_64-hip-rdna3.tar.gz
|
||||
https://github.com/Niko1221/Strata/releases/download/v0.2.21/strata-hy4-0.1.67-windows-x86_64-hip-rx9070.tar.gz
|
||||
https://github.com/Niko1221/Strata/releases/download/v0.2.21/strata-hy4-0.1.67-windows-x86_64-hip-strix.tar.gz
|
||||
Reference in new issue
Block a user