Skip to content

Commit 59ce99f

Browse files
committed
Add comprehensive documentation, E2E tests, and CI/CD workflow
- Add JSDoc enforcement and comprehensive docstrings across Python and JavaScript - Implement Playwright E2E test suite for UI validation - Add GitHub Actions CI workflow for cross-platform testing - Add full autolog support for PyTorch Lightning and TensorFlow/Keras - Reorganize examples into core, ml_frameworks, and domain_specific categories - Consolidate config files and improve documentation structure - Remove unique constraint on run names for better usability - Update README with improved problem statement and ecosystem comparison
1 parent d039dce commit 59ce99f

127 files changed

Lines changed: 11486 additions & 1064 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.depcheckrc.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, docs/* ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
name: Test Python ${{ matrix.python-version }} on ${{ matrix.os }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os: [ubuntu-latest, macos-latest, windows-latest]
17+
python-version: ['3.9', '3.10', '3.11', '3.12']
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- name: Set up Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: '20'
31+
32+
- name: Install dependencies
33+
run: |
34+
python -m pip install --upgrade pip
35+
pip install -e '.[dev]'
36+
37+
- name: Build UI
38+
run: npm install && npm run build
39+
40+
- name: Start Artifacta server (Unix)
41+
if: runner.os != 'Windows'
42+
run: |
43+
mkdir -p data
44+
nohup artifacta ui --port 8000 > server.log 2>&1 &
45+
echo $! > server.pid
46+
47+
# Wait for server to be ready
48+
echo "Waiting for server to start..."
49+
SERVER_READY=false
50+
for i in {1..30}; do
51+
if curl -s http://localhost:8000/health > /dev/null 2>&1; then
52+
echo "✓ Server is ready"
53+
SERVER_READY=true
54+
break
55+
fi
56+
echo "Waiting for server... ($i/30)"
57+
sleep 1
58+
done
59+
60+
# Fail if server never started
61+
if [ "$SERVER_READY" = "false" ]; then
62+
echo "✗ Server failed to start after 30 seconds"
63+
echo "Server log:"
64+
cat server.log
65+
exit 1
66+
fi
67+
68+
- name: Start Artifacta server (Windows)
69+
if: runner.os == 'Windows'
70+
shell: pwsh
71+
run: |
72+
New-Item -ItemType Directory -Force -Path data
73+
74+
# Start server as background job
75+
$job = Start-Job -ScriptBlock {
76+
Set-Location $using:PWD
77+
artifacta ui --port 8000 2>&1 | Tee-Object -FilePath server.log
78+
}
79+
80+
$job.Id | Out-File -FilePath server.job.id
81+
Write-Host "Started server job ID: $($job.Id)"
82+
83+
# Wait for server to be ready
84+
Write-Host "Waiting for server to start..."
85+
$serverReady = $false
86+
for ($i = 1; $i -le 30; $i++) {
87+
# Check if job is still running
88+
$jobState = (Get-Job -Id $job.Id).State
89+
if ($jobState -eq 'Failed' -or $jobState -eq 'Stopped') {
90+
Write-Host "Server job failed or stopped"
91+
Write-Host "Job output:"
92+
Receive-Job -Id $job.Id
93+
exit 1
94+
}
95+
96+
try {
97+
$response = Invoke-WebRequest -Uri http://127.0.0.1:8000/health -UseBasicParsing -TimeoutSec 1 -ErrorAction Stop
98+
if ($response.StatusCode -eq 200) {
99+
Write-Host "Server is ready (Job ID: $($job.Id))"
100+
$serverReady = $true
101+
break
102+
}
103+
} catch {
104+
Write-Host "Waiting for server... ($i/30)"
105+
Start-Sleep -Seconds 1
106+
}
107+
}
108+
109+
# Fail if server never started
110+
if (-not $serverReady) {
111+
Write-Host "Server failed to start after 30 seconds"
112+
Write-Host "Job state: $((Get-Job -Id $job.Id).State)"
113+
Write-Host "Job output:"
114+
Receive-Job -Id $job.Id
115+
exit 1
116+
}
117+
118+
- name: Run pytest
119+
run: pytest tests/ -v --tb=short
120+
env:
121+
TRACKING_SERVER_HOST: ${{ runner.os == 'Windows' && '127.0.0.1' || 'localhost' }}
122+
123+
- name: Stop Artifacta server (Unix)
124+
if: always() && runner.os != 'Windows'
125+
run: |
126+
if [ -f server.pid ]; then
127+
kill $(cat server.pid) || true
128+
rm server.pid
129+
fi
130+
131+
- name: Stop Artifacta server (Windows)
132+
if: always() && runner.os == 'Windows'
133+
shell: pwsh
134+
run: |
135+
if (Test-Path server.job.id) {
136+
$jobId = Get-Content server.job.id
137+
Stop-Job -Id $jobId -ErrorAction SilentlyContinue
138+
Remove-Job -Id $jobId -ErrorAction SilentlyContinue
139+
Write-Host "Stopped server job ID: $jobId"
140+
}
141+
# Also kill any remaining artifacta processes
142+
Get-Process | Where-Object {$_.ProcessName -eq "artifacta"} | Stop-Process -Force -ErrorAction SilentlyContinue
143+
144+
e2e:
145+
name: E2E Tests on ${{ matrix.os }}
146+
runs-on: ${{ matrix.os }}
147+
strategy:
148+
fail-fast: false
149+
matrix:
150+
os: [ubuntu-latest, macos-latest, windows-latest]
151+
152+
steps:
153+
- uses: actions/checkout@v4
154+
155+
- name: Set up Python 3.11
156+
uses: actions/setup-python@v5
157+
with:
158+
python-version: '3.11'
159+
160+
- name: Set up Node.js
161+
uses: actions/setup-node@v4
162+
with:
163+
node-version: '20'
164+
165+
- name: Install Python dependencies
166+
run: |
167+
python -m pip install --upgrade pip
168+
pip install -e '.[dev]'
169+
170+
- name: Install Node dependencies and build UI
171+
run: npm install && npm run build
172+
173+
- name: Install Playwright browsers
174+
run: npx playwright install --with-deps chromium
175+
176+
- name: Run E2E tests
177+
run: npm run test:e2e
178+
env:
179+
ARTIFACTA_URL: ${{ runner.os == 'Windows' && 'http://127.0.0.1:8000' || 'http://localhost:8000' }}
180+
181+
lint:
182+
name: Lint
183+
runs-on: ubuntu-latest
184+
185+
steps:
186+
- uses: actions/checkout@v4
187+
188+
- name: Set up Python 3.11
189+
uses: actions/setup-python@v5
190+
with:
191+
python-version: '3.11'
192+
193+
- name: Install dependencies
194+
run: |
195+
python -m pip install --upgrade pip
196+
pip install -e '.[dev]'
197+
198+
- name: Run ruff
199+
run: ruff check . --fix
200+
201+
- name: Run mypy
202+
run: mypy --ignore-missing-imports tracking-server
203+
204+
build:
205+
name: Build Package
206+
runs-on: ubuntu-latest
207+
208+
steps:
209+
- uses: actions/checkout@v4
210+
211+
- name: Set up Python 3.11
212+
uses: actions/setup-python@v5
213+
with:
214+
python-version: '3.11'
215+
216+
- name: Install build tools
217+
run: |
218+
python -m pip install --upgrade pip
219+
pip install build
220+
221+
- name: Build package
222+
run: python -m build
223+
224+
- name: Upload artifacts
225+
uses: actions/upload-artifact@v4
226+
with:
227+
name: dist
228+
path: dist/

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,8 @@ logs/
6363
docs/_build/
6464
docs/_static/
6565
docs/_templates/
66+
67+
# Playwright test outputs
68+
test-results/
69+
playwright-report/
70+
playwright/.cache/

.pre-commit-config.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,19 @@ repos:
2929
- --convention=google
3030
files: ^(artifacta|tracking-server)/
3131

32-
# ESLint - JavaScript/React linter
32+
# ESLint - JavaScript/React linter with JSDoc enforcement
3333
- repo: https://github.com/pre-commit/mirrors-eslint
3434
rev: v9.17.0
3535
hooks:
3636
- id: eslint
3737
files: \.[jt]sx?$
3838
types: [file]
39+
args: [--config, config/eslint.config.js]
3940
additional_dependencies:
4041
4142
43+
44+
4245

4346
# Knip - Find unused files, exports, and dependencies (JavaScript/TypeScript)
4447
- repo: local
@@ -51,7 +54,7 @@ repos:
5154
files: \.[jt]sx?$
5255
- id: depcheck
5356
name: depcheck - unused npm dependencies
54-
entry: npx depcheck --ignore-dirs=dist,node_modules,.git
57+
entry: npx depcheck
5558
language: system
5659
pass_filenames: false
5760
files: package\.json

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
## Our Pledge
55

6-
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
6+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socioeconomic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
77

88
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
99

@@ -82,4 +82,3 @@ For answers to common questions about this code of conduct, see the FAQ at [http
8282
[Mozilla CoC]: https://github.com/mozilla/diversity
8383
[FAQ]: https://www.contributor-covenant.org/faq
8484
[translations]: https://www.contributor-covenant.org/translations
85-

0 commit comments

Comments
 (0)