File size: 846 Bytes
d5cfbf0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
set -euo pipefail

repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
cd "$repo_root"

rm -rf dist
uv run ruff check .
uv run ruff format --check .
uv run pytest
uv build

uv run python -m twine check dist/*

wheel="$(find dist -maxdepth 1 -type f -name '*.whl' -print -quit)"
test_root="$(mktemp -d)"
trap 'rm -rf "$test_root"' EXIT
python -m venv "$test_root/venv"
"$test_root/venv/bin/python" -m pip install --quiet "$wheel"
(
  cd "$test_root"
  "$test_root/venv/bin/python" -c \
    'import gnn4colliders; assert gnn4colliders.__version__ == "0.1.0"'
  "$test_root/venv/bin/gnn4colliders" --help
  "$test_root/venv/bin/gnn4colliders" train --help
  "$test_root/venv/bin/gnn4colliders" evaluate --help
  "$test_root/venv/bin/gnn4colliders" predict --help
  "$test_root/venv/bin/gnn4colliders" export --help
)