Skip to content

Commit 80afa80

Browse files
authored
Merge pull request #19 from WuMingDao/dev
feat: add ModelScope provider, rich metadata & comprehensive infra overhaul
2 parents 20c285e + f0bae85 commit 80afa80

59 files changed

Lines changed: 4661 additions & 942 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug to help us improve
4+
title: 'fix(scope): '
5+
labels: bug
6+
---
7+
8+
## Describe the Bug
9+
10+
<!-- A clear description of what the bug is -->
11+
12+
## Scope
13+
14+
<!-- Which part of the project? -->
15+
16+
- [ ] `api`: Backend API
17+
- [ ] `web`: Frontend
18+
- [ ] `shared`: Shared package
19+
20+
## Steps to Reproduce
21+
22+
1. Go to '...'
23+
2. Click on '...'
24+
3. See error
25+
26+
## Expected Behavior
27+
28+
<!-- What you expected to happen -->
29+
30+
## Screenshots
31+
32+
<!-- If applicable, add screenshots -->
33+
34+
## Environment
35+
36+
- Browser: [e.g. Chrome 120]
37+
- OS: [e.g. Windows 11]
38+
- Deployment: [e.g. Cloudflare Pages, local dev]
39+
40+
## Additional Context
41+
42+
<!-- Any other context about the problem -->

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Documentation
4+
url: https://github.com/WuMingDao/zenith-image-generator/tree/main/docs
5+
about: Check the documentation before opening an issue
6+
- name: Discussions
7+
url: https://github.com/WuMingDao/zenith-image-generator/discussions
8+
about: Ask questions and discuss ideas
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a new feature
4+
title: 'feat(scope): '
5+
labels: enhancement
6+
---
7+
8+
## Description
9+
10+
<!-- A clear description of the feature -->
11+
12+
## Scope
13+
14+
<!-- Which part of the project? -->
15+
16+
- [ ] `api`: Backend API
17+
- [ ] `web`: Frontend
18+
- [ ] `shared`: Shared package
19+
- [ ] `docs`: Documentation
20+
21+
## Use Case
22+
23+
<!-- Why do you need this feature? What problem does it solve? -->
24+
25+
## Proposed Solution
26+
27+
<!-- How would you like it to work? -->
28+
29+
## Alternatives Considered
30+
31+
<!-- Any alternative solutions or features you've considered -->
32+
33+
## Additional Context
34+
35+
<!-- Any other context, mockups, or screenshots -->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
## Description
2+
3+
<!-- Brief description of changes -->
4+
5+
## Type of Change
6+
7+
<!-- Mark with [x] -->
8+
9+
- [ ] `feat`: New feature
10+
- [ ] `fix`: Bug fix
11+
- [ ] `docs`: Documentation
12+
- [ ] `refactor`: Code refactoring
13+
- [ ] `test`: Tests
14+
- [ ] `chore`: Build/CI/dependencies
15+
16+
## Scope
17+
18+
<!-- Mark with [x] -->
19+
20+
- [ ] `api`: Backend API
21+
- [ ] `web`: Frontend
22+
- [ ] `shared`: Shared package
23+
- [ ] `ci`: GitHub Actions
24+
- [ ] `deps`: Dependencies
25+
26+
## Checklist
27+
28+
- [ ] PR title follows format: `type(scope): description`
29+
- [ ] Code passes `pnpm check`
30+
- [ ] Tests pass `pnpm test:run`
31+
- [ ] Documentation updated (if applicable)
32+
- [ ] New tests added (if applicable)
33+
34+
## Related Issues
35+
36+
<!-- Link related issues: Fixes #123, Closes #456 -->

.github/dependabot.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Dependabot configuration
2+
# Keeps dependencies up-to-date and checks for security vulnerabilities
3+
4+
version: 2
5+
6+
updates:
7+
# Root package.json
8+
- package-ecosystem: 'npm'
9+
directory: '/'
10+
schedule:
11+
interval: 'weekly'
12+
day: 'monday'
13+
time: '09:00'
14+
timezone: 'Asia/Shanghai'
15+
open-pull-requests-limit: 10
16+
commit-message:
17+
prefix: 'chore(deps):'
18+
labels:
19+
- 'dependencies'
20+
- 'chore'
21+
groups:
22+
dev-dependencies:
23+
patterns:
24+
- '@types/*'
25+
- 'vitest'
26+
- '@vitest/*'
27+
- 'typescript'
28+
- '@biomejs/*'
29+
update-types:
30+
- 'minor'
31+
- 'patch'
32+
33+
# API package
34+
- package-ecosystem: 'npm'
35+
directory: '/apps/api'
36+
schedule:
37+
interval: 'weekly'
38+
day: 'monday'
39+
time: '09:00'
40+
timezone: 'Asia/Shanghai'
41+
open-pull-requests-limit: 5
42+
commit-message:
43+
prefix: 'chore(deps-api):'
44+
labels:
45+
- 'dependencies'
46+
- 'api'
47+
48+
# Web package
49+
- package-ecosystem: 'npm'
50+
directory: '/apps/web'
51+
schedule:
52+
interval: 'weekly'
53+
day: 'monday'
54+
time: '09:00'
55+
timezone: 'Asia/Shanghai'
56+
open-pull-requests-limit: 5
57+
commit-message:
58+
prefix: 'chore(deps-web):'
59+
labels:
60+
- 'dependencies'
61+
- 'web'
62+
groups:
63+
react:
64+
patterns:
65+
- 'react'
66+
- 'react-dom'
67+
- '@types/react*'
68+
ui:
69+
patterns:
70+
- '@radix-ui/*'
71+
- 'tailwindcss'
72+
- '@tailwindcss/*'
73+
74+
# GitHub Actions
75+
- package-ecosystem: 'github-actions'
76+
directory: '/'
77+
schedule:
78+
interval: 'weekly'
79+
day: 'monday'
80+
time: '09:00'
81+
timezone: 'Asia/Shanghai'
82+
commit-message:
83+
prefix: 'chore(ci):'
84+
labels:
85+
- 'dependencies'
86+
- 'ci'

.github/labeler.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Labeler configuration for actions/labeler
2+
# Maps file paths to labels
3+
4+
# Scope labels
5+
api:
6+
- changed-files:
7+
- any-glob-to-any-file: 'apps/api/**'
8+
9+
web:
10+
- changed-files:
11+
- any-glob-to-any-file: 'apps/web/**'
12+
13+
shared:
14+
- changed-files:
15+
- any-glob-to-any-file: 'packages/shared/**'
16+
17+
# Type labels
18+
documentation:
19+
- changed-files:
20+
- any-glob-to-any-file:
21+
- '**/*.md'
22+
- 'docs/**'
23+
24+
ci:
25+
- changed-files:
26+
- any-glob-to-any-file:
27+
- '.github/**'
28+
- '*.yml'
29+
- '*.yaml'
30+
31+
testing:
32+
- changed-files:
33+
- any-glob-to-any-file:
34+
- '**/*.test.ts'
35+
- '**/*.spec.ts'
36+
- '**/vitest.config.ts'
37+
38+
dependencies:
39+
- changed-files:
40+
- any-glob-to-any-file:
41+
- 'package.json'
42+
- 'pnpm-lock.yaml'
43+
- '**/package.json'
44+
45+
docker:
46+
- changed-files:
47+
- any-glob-to-any-file:
48+
- 'Dockerfile*'
49+
- 'docker-compose*.yml'

.github/workflows/ci.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Z-Image - CI Pipeline
2+
#
3+
# Runs on every push and pull request
4+
# - Lint and format check
5+
# - Type check
6+
# - Build all packages
7+
# - Run tests with coverage
8+
9+
name: CI
10+
11+
on:
12+
push:
13+
branches: [main, dev]
14+
pull_request:
15+
branches: [main, dev]
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
ci:
23+
name: Lint, Build & Test
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
30+
- name: Setup pnpm
31+
uses: pnpm/action-setup@v4
32+
33+
- name: Setup Node.js
34+
uses: actions/setup-node@v4
35+
with:
36+
node-version: 20
37+
cache: 'pnpm'
38+
39+
- name: Install dependencies
40+
run: pnpm install --frozen-lockfile
41+
42+
- name: Lint & Format check
43+
run: pnpm check
44+
45+
- name: Build shared package
46+
run: pnpm build:shared
47+
48+
- name: Build API
49+
run: pnpm build:api
50+
51+
- name: Build Web
52+
run: pnpm build:web
53+
54+
- name: Run tests with coverage
55+
run: pnpm test:coverage
56+
57+
- name: Upload coverage to Codecov
58+
uses: codecov/codecov-action@v4
59+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
60+
with:
61+
token: ${{ secrets.CODECOV_TOKEN }}
62+
files: ./apps/api/coverage/coverage-final.json,./apps/web/coverage/coverage-final.json
63+
fail_ci_if_error: false
64+
65+
typecheck:
66+
name: Type Check
67+
runs-on: ubuntu-latest
68+
69+
steps:
70+
- name: Checkout
71+
uses: actions/checkout@v4
72+
73+
- name: Setup pnpm
74+
uses: pnpm/action-setup@v4
75+
76+
- name: Setup Node.js
77+
uses: actions/setup-node@v4
78+
with:
79+
node-version: 20
80+
cache: 'pnpm'
81+
82+
- name: Install dependencies
83+
run: pnpm install --frozen-lockfile
84+
85+
- name: Build shared (dependency)
86+
run: pnpm build:shared
87+
88+
- name: Type check
89+
run: pnpm -r exec tsc --noEmit

0 commit comments

Comments
 (0)