Skip to content

Commit f716429

Browse files
committed
feat: Add website, PyPI release v0.1.0, and CI/CD workflows
## Changes ### PyPI Package (mlcli-toolkit v0.1.0) - Published to PyPI: pip install mlcli-toolkit - Updated package name from 'mlcli' to 'mlcli-toolkit' - Added LICENSE (MIT), CHANGELOG.md, MANIFEST.in - Fixed pyproject.toml with proper metadata ### Website (Next.js 14) - Full documentation website with Next.js App Router - Pages: Home, Docs, Runs Dashboard, Releases, Download, About - Interactive experiment tracking with charts (recharts) - API routes: /api/runs, /api/releases, /api/search, /api/health - MDX support for documentation - Responsive design with Tailwind CSS + shadcn/ui components ### CI/CD Workflows - Python CI: lint, test (Python 3.9-3.12), build - Website CI: lint, type-check, build ### Cleanup - Updated .gitignore with comprehensive rules - Removed build artifacts, data files, and empty directories - Kept sample experiments.json for demo
1 parent 42419fd commit f716429

72 files changed

Lines changed: 19680 additions & 23 deletions

Some content is hidden

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

.github/workflows/python.yml

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
name: Python CI
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
paths:
7+
- 'mlcli/**'
8+
- 'pyproject.toml'
9+
- 'requirements.txt'
10+
- '.github/workflows/python.yml'
11+
pull_request:
12+
branches: [main, master]
13+
paths:
14+
- 'mlcli/**'
15+
- 'pyproject.toml'
16+
- 'requirements.txt'
17+
workflow_dispatch:
18+
19+
jobs:
20+
lint:
21+
name: Lint
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
28+
- name: Set up Python
29+
uses: actions/setup-python@v5
30+
with:
31+
python-version: '3.11'
32+
33+
- name: Install dependencies
34+
run: |
35+
python -m pip install --upgrade pip
36+
pip install flake8 black mypy
37+
38+
- name: Run Black (check)
39+
run: black --check --diff mlcli/
40+
41+
- name: Run Flake8
42+
run: flake8 mlcli/ --max-line-length=100 --ignore=E501,W503
43+
44+
test:
45+
name: Test (Python ${{ matrix.python-version }})
46+
runs-on: ubuntu-latest
47+
strategy:
48+
fail-fast: false
49+
matrix:
50+
python-version: ['3.9', '3.10', '3.11', '3.12']
51+
52+
steps:
53+
- name: Checkout repository
54+
uses: actions/checkout@v4
55+
56+
- name: Set up Python ${{ matrix.python-version }}
57+
uses: actions/setup-python@v5
58+
with:
59+
python-version: ${{ matrix.python-version }}
60+
61+
- name: Install dependencies
62+
run: |
63+
python -m pip install --upgrade pip
64+
pip install -e ".[dev]"
65+
66+
- name: Run tests
67+
run: |
68+
python -c "import mlcli; print(f'mlcli version: {mlcli.__version__}')"
69+
python -c "from mlcli.utils.registry import ModelRegistry; print('Registry import OK')"
70+
71+
build:
72+
name: Build Package
73+
runs-on: ubuntu-latest
74+
needs: [lint, test]
75+
76+
steps:
77+
- name: Checkout repository
78+
uses: actions/checkout@v4
79+
80+
- name: Set up Python
81+
uses: actions/setup-python@v5
82+
with:
83+
python-version: '3.11'
84+
85+
- name: Install build tools
86+
run: |
87+
python -m pip install --upgrade pip
88+
pip install build twine
89+
90+
- name: Build package
91+
run: python -m build
92+
93+
- name: Check package
94+
run: twine check dist/*
95+
96+
- name: Upload build artifact
97+
uses: actions/upload-artifact@v4
98+
with:
99+
name: python-package
100+
path: dist/
101+
retention-days: 7
102+
103+
# Publish to PyPI on release
104+
# publish:
105+
# name: Publish to PyPI
106+
# runs-on: ubuntu-latest
107+
# needs: build
108+
# if: github.event_name == 'release' && github.event.action == 'published'
109+
#
110+
# steps:
111+
# - name: Download artifact
112+
# uses: actions/download-artifact@v4
113+
# with:
114+
# name: python-package
115+
# path: dist/
116+
#
117+
# - name: Publish to PyPI
118+
# uses: pypa/gh-action-pypi-publish@release/v1
119+
# with:
120+
# password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/website.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: Website CI/CD
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
paths:
7+
- 'website/**'
8+
pull_request:
9+
branches: [main, master]
10+
paths:
11+
- 'website/**'
12+
workflow_dispatch:
13+
14+
defaults:
15+
run:
16+
working-directory: website
17+
18+
jobs:
19+
lint-and-test:
20+
name: Lint & Type Check
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: '20'
31+
cache: 'npm'
32+
cache-dependency-path: website/package-lock.json
33+
34+
- name: Install dependencies
35+
run: npm ci
36+
37+
- name: Run ESLint
38+
run: npm run lint
39+
40+
- name: Run TypeScript check
41+
run: npm run type-check
42+
43+
build:
44+
name: Build
45+
runs-on: ubuntu-latest
46+
needs: lint-and-test
47+
48+
steps:
49+
- name: Checkout repository
50+
uses: actions/checkout@v4
51+
52+
- name: Setup Node.js
53+
uses: actions/setup-node@v4
54+
with:
55+
node-version: '20'
56+
cache: 'npm'
57+
cache-dependency-path: website/package-lock.json
58+
59+
- name: Install dependencies
60+
run: npm ci
61+
62+
- name: Build application
63+
run: npm run build
64+
env:
65+
NEXT_PUBLIC_GITHUB_REPO: codeMaestro78/MLcli
66+
NEXT_PUBLIC_EXPERIMENTS_JSON_URL: /runs/experiments.json
67+
68+
- name: Upload build artifact
69+
uses: actions/upload-artifact@v4
70+
with:
71+
name: next-build
72+
path: website/.next
73+
retention-days: 7
74+
75+
# Optional: Deploy to Vercel (uncomment and configure)
76+
# deploy-preview:
77+
# name: Deploy Preview
78+
# runs-on: ubuntu-latest
79+
# needs: build
80+
# if: github.event_name == 'pull_request'
81+
#
82+
# steps:
83+
# - name: Checkout repository
84+
# uses: actions/checkout@v4
85+
#
86+
# - name: Deploy to Vercel
87+
# uses: amondnet/vercel-action@v25
88+
# with:
89+
# vercel-token: ${{ secrets.VERCEL_TOKEN }}
90+
# vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
91+
# vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
92+
# working-directory: ./website
93+
#
94+
# deploy-production:
95+
# name: Deploy Production
96+
# runs-on: ubuntu-latest
97+
# needs: build
98+
# if: github.ref == 'refs/heads/main' && github.event_name == 'push'
99+
#
100+
# steps:
101+
# - name: Checkout repository
102+
# uses: actions/checkout@v4
103+
#
104+
# - name: Deploy to Vercel
105+
# uses: amondnet/vercel-action@v25
106+
# with:
107+
# vercel-token: ${{ secrets.VERCEL_TOKEN }}
108+
# vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
109+
# vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
110+
# vercel-args: '--prod'
111+
# working-directory: ./website

.gitignore

Lines changed: 77 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
# ==================================
12
# Python
3+
# ==================================
24
__pycache__/
35
*.py[cod]
46
*$py.class
@@ -23,45 +25,107 @@ share/python-wheels/
2325
*.egg
2426
MANIFEST
2527

28+
# ==================================
2629
# Virtual environments
30+
# ==================================
2731
.venv/
2832
venv/
2933
ENV/
3034
env/
35+
.env
36+
.env.local
3137

32-
# IDEs
38+
# ==================================
39+
# IDEs and Editors
40+
# ==================================
3341
.vscode/
3442
.idea/
3543
*.swp
3644
*.swo
3745
*~
46+
*.sublime-workspace
47+
*.sublime-project
3848

49+
# ==================================
3950
# Testing
51+
# ==================================
4052
.pytest_cache/
4153
.coverage
4254
htmlcov/
4355
.tox/
56+
.nox/
57+
coverage.xml
58+
*.cover
59+
*.py,cover
4460

45-
# ML artifacts
46-
mlcli/models/*.pkl
47-
mlcli/models/*.onnx
48-
mlcli/models/*.h5
49-
mlcli/models/*.keras
50-
mlcli/models/saved_model/
61+
# ==================================
62+
# ML Artifacts & Models
63+
# ==================================
5164
models/
52-
runs/
65+
artifacts/
66+
*.pkl
67+
*.joblib
68+
*.onnx
69+
*.h5
70+
*.keras
71+
*.pb
72+
saved_model/
73+
74+
# ==================================
75+
# Experiment Tracking (keep experiments.json as example)
76+
# ==================================
77+
runs/*.csv
78+
runs/*.png
79+
runs/tuning_*.json
80+
runs/explanation_*.json
81+
runs/explanation_*.png
82+
83+
# ==================================
84+
# Logs
85+
# ==================================
86+
logs/
5387
*.log
5488

55-
# OS
89+
# ==================================
90+
# OS Generated
91+
# ==================================
5692
.DS_Store
93+
.DS_Store?
94+
._*
95+
.Spotlight-V100
96+
.Trashes
97+
ehthumbs.db
5798
Thumbs.db
99+
Desktop.ini
58100

59-
# Data
60-
*.csv
61-
*.parquet
101+
# ==================================
102+
# Data Files
103+
# ==================================
62104
data/
63105
datasets/
106+
*.csv
107+
*.parquet
108+
*.xlsx
109+
*.xls
64110

65-
# Jupyter
111+
# ==================================
112+
# Jupyter Notebooks
113+
# ==================================
66114
.ipynb_checkpoints/
67115
*.ipynb
116+
117+
# ==================================
118+
# Website / Next.js
119+
# ==================================
120+
website/node_modules/
121+
website/.next/
122+
website/out/
123+
website/.env*.local
124+
125+
# ==================================
126+
# Misc
127+
# ==================================
128+
*.bak
129+
*.tmp
130+
*.temp
131+
.cache/

0 commit comments

Comments
 (0)