Skip to content

Commit 69545cc

Browse files
better table
1 parent dd9c34f commit 69545cc

File tree

6 files changed

+70
-8
lines changed

6 files changed

+70
-8
lines changed

.github/workflows/static.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ jobs:
3737
run: ./rl-tools/static/extrack_ui/download_dependencies.sh
3838
- name: Add Update Timestamp
3939
run: git log -1 --format=%ci > last_updated.txt
40+
- name: Generate Commit Messages
41+
run: ./generate_commit_messages.sh
4042
- name: Generate Index (Curated)
4143
run: ./index_experiments.sh runs/curated
4244
- name: Generate Index (CI)

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/.vscode
2+
commit_messages.json

.gitmodules

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
[submodule "experiments"]
2-
path = runs/ci
3-
url = https://github.com/rl-tools/zoo-blob.git
4-
branch = main
51
[submodule "rl-tools"]
62
path = rl-tools
73
url = https://github.com/rl-tools/rl-tools.git
84
branch = master
5+
[submodule "runs/ci"]
6+
path = runs/ci
7+
url = https://github.com/rl-tools/zoo-runs-ci.git
8+
branch = main
99
[submodule "runs/curated"]
1010
path = runs/curated
1111
url = https://github.com/rl-tools/zoo-runs-curated.git

generate_commit_messages.sh

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# Script to generate a mapping of commit hashes to commit messages from the rl-tools submodule
5+
6+
OUTPUT_FILE="commit_messages.json"
7+
8+
echo "Generating commit message mapping from rl-tools submodule..."
9+
10+
# Check if rl-tools directory exists
11+
if [ ! -d "rl-tools" ]; then
12+
echo "Error: rl-tools directory not found"
13+
exit 1
14+
fi
15+
16+
# Use Python to properly escape JSON
17+
python3 << 'PYTHON_SCRIPT' > "${OUTPUT_FILE}"
18+
import subprocess
19+
import json
20+
import sys
21+
22+
try:
23+
# Get all commits from the rl-tools submodule
24+
result = subprocess.run(
25+
['git', '-C', 'rl-tools', 'log', '--all', '--abbrev=7', '--pretty=format:%h%x00%s'],
26+
capture_output=True,
27+
text=True,
28+
check=True
29+
)
30+
31+
# Parse the output
32+
commits = {}
33+
for line in result.stdout.strip().split('\n'):
34+
if not line:
35+
continue
36+
parts = line.split('\x00', 1)
37+
if len(parts) == 2:
38+
hash_val, message = parts
39+
commits[hash_val] = message
40+
41+
# Output as properly formatted JSON
42+
print(json.dumps(commits, indent=2, ensure_ascii=False))
43+
44+
except subprocess.CalledProcessError as e:
45+
print(f"Error running git command: {e}", file=sys.stderr)
46+
print("{}", file=sys.stdout) # Output empty JSON on error
47+
sys.exit(1)
48+
except Exception as e:
49+
print(f"Error: {e}", file=sys.stderr)
50+
print("{}", file=sys.stdout) # Output empty JSON on error
51+
sys.exit(1)
52+
PYTHON_SCRIPT
53+
54+
# Count number of commits
55+
COMMIT_COUNT=$(grep -c '":' "${OUTPUT_FILE}" || echo "0")
56+
57+
echo "Generated ${OUTPUT_FILE} with ${COMMIT_COUNT} commits"
58+
echo "File size: $(du -h ${OUTPUT_FILE} | cut -f1)"
59+

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@
103103

104104

105105

106-
import { Explorer } from "./rl-tools/static/extrack_ui/Explorer.js";
107-
const explorer = new Explorer(idx, {"verbose": true})
106+
import { TableExplorer } from "./rl-tools/static/extrack_ui/TableExplorer.js";
107+
const tableExplorer = new TableExplorer(idx, {"verbose": true})
108108
const explorerContainer = document.getElementById('explorer-container');
109-
explorerContainer.appendChild(explorer.getContainer());
109+
explorerContainer.appendChild(tableExplorer.getContainer());
110110

111111
import { Zoo } from "./rl-tools/static/extrack_ui/Zoo.js";
112112
const zoo = new Zoo(idx, {"verbose": true})

0 commit comments

Comments
 (0)