nene2-python 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nene2_python-1.0.0/.env.example +44 -0
- nene2_python-1.0.0/.github/workflows/ci.yml +44 -0
- nene2_python-1.0.0/.github/workflows/docs.yml +55 -0
- nene2_python-1.0.0/.github/workflows/publish.yml +96 -0
- nene2_python-1.0.0/.gitignore +18 -0
- nene2_python-1.0.0/.vitepress/config.mts +284 -0
- nene2_python-1.0.0/.vitepress/theme/custom.css +245 -0
- nene2_python-1.0.0/.vitepress/theme/index.ts +4 -0
- nene2_python-1.0.0/AGENTS.md +39 -0
- nene2_python-1.0.0/CHANGELOG.md +54 -0
- nene2_python-1.0.0/CLAUDE.md +342 -0
- nene2_python-1.0.0/Dockerfile +13 -0
- nene2_python-1.0.0/LICENSE +21 -0
- nene2_python-1.0.0/PKG-INFO +211 -0
- nene2_python-1.0.0/README.md +166 -0
- nene2_python-1.0.0/alembic/README +1 -0
- nene2_python-1.0.0/alembic/env.py +75 -0
- nene2_python-1.0.0/alembic/script.py.mako +28 -0
- nene2_python-1.0.0/alembic/versions/001_create_notes_and_tags_tables.py +44 -0
- nene2_python-1.0.0/alembic.ini +149 -0
- nene2_python-1.0.0/compose.yaml +18 -0
- nene2_python-1.0.0/docs/adr/0001-toolchain.md +73 -0
- nene2_python-1.0.0/docs/adr/0002-clean-architecture.md +87 -0
- nene2_python-1.0.0/docs/adr/0003-security-first.md +117 -0
- nene2_python-1.0.0/docs/adr/0004-ai-first-design.md +120 -0
- nene2_python-1.0.0/docs/adr/0005-logging.md +24 -0
- nene2_python-1.0.0/docs/adr/0006-rate-limiting.md +28 -0
- nene2_python-1.0.0/docs/adr/0009-mcp-design.md +41 -0
- nene2_python-1.0.0/docs/adr/0010-async-use-case.md +63 -0
- nene2_python-1.0.0/docs/de/index.md +43 -0
- nene2_python-1.0.0/docs/de/tutorials/getting-started.md +54 -0
- nene2_python-1.0.0/docs/explanation/architecture.md +101 -0
- nene2_python-1.0.0/docs/explanation/design-philosophy.md +68 -0
- nene2_python-1.0.0/docs/field-trials/2026-05-field-trial-1.md +157 -0
- nene2_python-1.0.0/docs/field-trials/2026-05-field-trial-2.md +142 -0
- nene2_python-1.0.0/docs/field-trials/2026-05-field-trial-3.md +127 -0
- nene2_python-1.0.0/docs/field-trials/2026-05-field-trial-4.md +125 -0
- nene2_python-1.0.0/docs/field-trials/2026-05-field-trial-5.md +151 -0
- nene2_python-1.0.0/docs/field-trials/2026-05-field-trial-6.md +125 -0
- nene2_python-1.0.0/docs/fr/index.md +43 -0
- nene2_python-1.0.0/docs/fr/tutorials/getting-started.md +54 -0
- nene2_python-1.0.0/docs/how-to/add-new-domain.md +89 -0
- nene2_python-1.0.0/docs/how-to/configure-auth.md +98 -0
- nene2_python-1.0.0/docs/how-to/new-project.md +164 -0
- nene2_python-1.0.0/docs/how-to/run-tests.md +103 -0
- nene2_python-1.0.0/docs/how-to/sqlalchemy-repository.md +346 -0
- nene2_python-1.0.0/docs/howto/mcp-setup.md +157 -0
- nene2_python-1.0.0/docs/index.md +43 -0
- nene2_python-1.0.0/docs/ja/explanation/architecture.md +100 -0
- nene2_python-1.0.0/docs/ja/explanation/design-philosophy.md +68 -0
- nene2_python-1.0.0/docs/ja/how-to/add-new-domain.md +87 -0
- nene2_python-1.0.0/docs/ja/how-to/configure-auth.md +100 -0
- nene2_python-1.0.0/docs/ja/how-to/new-project.md +162 -0
- nene2_python-1.0.0/docs/ja/how-to/run-tests.md +101 -0
- nene2_python-1.0.0/docs/ja/how-to/sqlalchemy-repository.md +339 -0
- nene2_python-1.0.0/docs/ja/howto/mcp-setup.md +157 -0
- nene2_python-1.0.0/docs/ja/index.md +43 -0
- nene2_python-1.0.0/docs/ja/reference/api.md +137 -0
- nene2_python-1.0.0/docs/ja/reference/configuration.md +119 -0
- nene2_python-1.0.0/docs/ja/reference/framework-modules.md +401 -0
- nene2_python-1.0.0/docs/ja/tutorials/first-domain.md +154 -0
- nene2_python-1.0.0/docs/ja/tutorials/getting-started.md +55 -0
- nene2_python-1.0.0/docs/pt-br/index.md +43 -0
- nene2_python-1.0.0/docs/pt-br/tutorials/getting-started.md +54 -0
- nene2_python-1.0.0/docs/reference/api.md +137 -0
- nene2_python-1.0.0/docs/reference/configuration.md +118 -0
- nene2_python-1.0.0/docs/reference/framework-modules.md +446 -0
- nene2_python-1.0.0/docs/roadmap.md +190 -0
- nene2_python-1.0.0/docs/todo/current.md +59 -0
- nene2_python-1.0.0/docs/tutorials/first-domain.md +154 -0
- nene2_python-1.0.0/docs/tutorials/getting-started.md +55 -0
- nene2_python-1.0.0/docs/zh/index.md +43 -0
- nene2_python-1.0.0/docs/zh/tutorials/getting-started.md +54 -0
- nene2_python-1.0.0/package-lock.json +2514 -0
- nene2_python-1.0.0/package.json +15 -0
- nene2_python-1.0.0/pyproject.toml +161 -0
- nene2_python-1.0.0/src/example/__init__.py +1 -0
- nene2_python-1.0.0/src/example/__main__.py +6 -0
- nene2_python-1.0.0/src/example/app.py +208 -0
- nene2_python-1.0.0/src/example/comment/__init__.py +1 -0
- nene2_python-1.0.0/src/example/comment/entity.py +10 -0
- nene2_python-1.0.0/src/example/comment/exceptions.py +23 -0
- nene2_python-1.0.0/src/example/comment/handler.py +104 -0
- nene2_python-1.0.0/src/example/comment/repository.py +63 -0
- nene2_python-1.0.0/src/example/comment/sqlalchemy_repository.py +58 -0
- nene2_python-1.0.0/src/example/comment/use_case.py +118 -0
- nene2_python-1.0.0/src/example/mcp.py +147 -0
- nene2_python-1.0.0/src/example/note/__init__.py +1 -0
- nene2_python-1.0.0/src/example/note/async_use_case.py +50 -0
- nene2_python-1.0.0/src/example/note/entity.py +10 -0
- nene2_python-1.0.0/src/example/note/exceptions.py +19 -0
- nene2_python-1.0.0/src/example/note/handler.py +89 -0
- nene2_python-1.0.0/src/example/note/repository.py +62 -0
- nene2_python-1.0.0/src/example/note/sqlalchemy_repository.py +56 -0
- nene2_python-1.0.0/src/example/note/use_case.py +99 -0
- nene2_python-1.0.0/src/example/schema.py +56 -0
- nene2_python-1.0.0/src/example/tag/__init__.py +0 -0
- nene2_python-1.0.0/src/example/tag/entity.py +9 -0
- nene2_python-1.0.0/src/example/tag/exceptions.py +19 -0
- nene2_python-1.0.0/src/example/tag/handler.py +85 -0
- nene2_python-1.0.0/src/example/tag/repository.py +62 -0
- nene2_python-1.0.0/src/example/tag/sqlalchemy_repository.py +56 -0
- nene2_python-1.0.0/src/example/tag/use_case.py +97 -0
- nene2_python-1.0.0/src/nene2/__init__.py +1 -0
- nene2_python-1.0.0/src/nene2/auth/__init__.py +16 -0
- nene2_python-1.0.0/src/nene2/auth/api_key.py +39 -0
- nene2_python-1.0.0/src/nene2/auth/bearer_token.py +51 -0
- nene2_python-1.0.0/src/nene2/auth/exceptions.py +8 -0
- nene2_python-1.0.0/src/nene2/auth/interfaces.py +23 -0
- nene2_python-1.0.0/src/nene2/auth/local_verifier.py +17 -0
- nene2_python-1.0.0/src/nene2/config/__init__.py +5 -0
- nene2_python-1.0.0/src/nene2/config/settings.py +72 -0
- nene2_python-1.0.0/src/nene2/database/__init__.py +15 -0
- nene2_python-1.0.0/src/nene2/database/exceptions.py +5 -0
- nene2_python-1.0.0/src/nene2/database/health.py +24 -0
- nene2_python-1.0.0/src/nene2/database/interfaces.py +51 -0
- nene2_python-1.0.0/src/nene2/database/sqlalchemy_executor.py +128 -0
- nene2_python-1.0.0/src/nene2/http/__init__.py +14 -0
- nene2_python-1.0.0/src/nene2/http/health.py +20 -0
- nene2_python-1.0.0/src/nene2/http/pagination.py +93 -0
- nene2_python-1.0.0/src/nene2/http/problem_details.py +37 -0
- nene2_python-1.0.0/src/nene2/log/__init__.py +5 -0
- nene2_python-1.0.0/src/nene2/log/setup.py +49 -0
- nene2_python-1.0.0/src/nene2/mcp/__init__.py +11 -0
- nene2_python-1.0.0/src/nene2/mcp/http_client.py +97 -0
- nene2_python-1.0.0/src/nene2/mcp/server.py +25 -0
- nene2_python-1.0.0/src/nene2/middleware/__init__.py +20 -0
- nene2_python-1.0.0/src/nene2/middleware/domain_exception.py +18 -0
- nene2_python-1.0.0/src/nene2/middleware/error_handler.py +112 -0
- nene2_python-1.0.0/src/nene2/middleware/request_id.py +45 -0
- nene2_python-1.0.0/src/nene2/middleware/request_logging.py +34 -0
- nene2_python-1.0.0/src/nene2/middleware/request_size_limit.py +52 -0
- nene2_python-1.0.0/src/nene2/middleware/security_headers.py +37 -0
- nene2_python-1.0.0/src/nene2/middleware/throttle.py +72 -0
- nene2_python-1.0.0/src/nene2/py.typed +0 -0
- nene2_python-1.0.0/src/nene2/use_case/__init__.py +5 -0
- nene2_python-1.0.0/src/nene2/use_case/protocols.py +24 -0
- nene2_python-1.0.0/src/nene2/validation/__init__.py +5 -0
- nene2_python-1.0.0/src/nene2/validation/exceptions.py +34 -0
- nene2_python-1.0.0/src/scripts/__init__.py +0 -0
- nene2_python-1.0.0/src/scripts/export_openapi.py +29 -0
- nene2_python-1.0.0/tests/__init__.py +0 -0
- nene2_python-1.0.0/tests/example/__init__.py +0 -0
- nene2_python-1.0.0/tests/example/comment/__init__.py +0 -0
- nene2_python-1.0.0/tests/example/comment/test_comment_http.py +97 -0
- nene2_python-1.0.0/tests/example/comment/test_comment_repository.py +73 -0
- nene2_python-1.0.0/tests/example/comment/test_comment_use_case.py +128 -0
- nene2_python-1.0.0/tests/example/conftest.py +13 -0
- nene2_python-1.0.0/tests/example/note/__init__.py +0 -0
- nene2_python-1.0.0/tests/example/note/test_async_note_use_case.py +43 -0
- nene2_python-1.0.0/tests/example/note/test_list_notes.py +80 -0
- nene2_python-1.0.0/tests/example/note/test_note_repository.py +89 -0
- nene2_python-1.0.0/tests/example/tag/__init__.py +0 -0
- nene2_python-1.0.0/tests/example/tag/test_tag_repository.py +84 -0
- nene2_python-1.0.0/tests/example/tag/test_tags.py +80 -0
- nene2_python-1.0.0/tests/example/test_cors.py +63 -0
- nene2_python-1.0.0/tests/example/test_mcp.py +51 -0
- nene2_python-1.0.0/tests/nene2/__init__.py +0 -0
- nene2_python-1.0.0/tests/nene2/auth/__init__.py +0 -0
- nene2_python-1.0.0/tests/nene2/auth/test_api_key.py +68 -0
- nene2_python-1.0.0/tests/nene2/auth/test_bearer_token.py +60 -0
- nene2_python-1.0.0/tests/nene2/auth/test_token_issuer.py +60 -0
- nene2_python-1.0.0/tests/nene2/database/__init__.py +0 -0
- nene2_python-1.0.0/tests/nene2/database/test_transaction.py +73 -0
- nene2_python-1.0.0/tests/nene2/http/__init__.py +0 -0
- nene2_python-1.0.0/tests/nene2/http/test_pagination.py +88 -0
- nene2_python-1.0.0/tests/nene2/mcp/__init__.py +0 -0
- nene2_python-1.0.0/tests/nene2/mcp/test_http_client.py +90 -0
- nene2_python-1.0.0/tests/nene2/middleware/__init__.py +0 -0
- nene2_python-1.0.0/tests/nene2/middleware/test_error_handler.py +129 -0
- nene2_python-1.0.0/tests/nene2/middleware/test_request_id.py +69 -0
- nene2_python-1.0.0/tests/nene2/middleware/test_request_logging.py +41 -0
- nene2_python-1.0.0/tests/nene2/middleware/test_request_size_limit.py +68 -0
- nene2_python-1.0.0/tests/nene2/middleware/test_security_headers.py +53 -0
- nene2_python-1.0.0/tests/nene2/middleware/test_throttle.py +45 -0
- nene2_python-1.0.0/tests/nene2/use_case/__init__.py +0 -0
- nene2_python-1.0.0/tests/nene2/use_case/test_protocols.py +40 -0
- nene2_python-1.0.0/tests/nene2/validation/__init__.py +0 -0
- nene2_python-1.0.0/tests/nene2/validation/test_exceptions.py +22 -0
- nene2_python-1.0.0/tests/scripts/__init__.py +0 -0
- nene2_python-1.0.0/tests/scripts/test_export_openapi.py +43 -0
- nene2_python-1.0.0/uv.lock +1887 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# アプリケーション設定
|
|
2
|
+
APP_ENV=local
|
|
3
|
+
APP_DEBUG=false
|
|
4
|
+
APP_NAME=nene2-python
|
|
5
|
+
|
|
6
|
+
# 認証設定
|
|
7
|
+
# list型フィールドは JSON 配列形式で書く(プレーン文字列は JSONDecodeError になる)
|
|
8
|
+
BEARER_TOKEN_ENABLED=false
|
|
9
|
+
BEARER_TOKENS=[]
|
|
10
|
+
# BEARER_TOKENS=["token-1","token-2"]
|
|
11
|
+
|
|
12
|
+
API_KEY_ENABLED=false
|
|
13
|
+
API_KEYS=[]
|
|
14
|
+
# API_KEYS=["key-1","key-2"]
|
|
15
|
+
|
|
16
|
+
# CORS設定
|
|
17
|
+
CORS_ENABLED=false
|
|
18
|
+
CORS_ORIGINS=[]
|
|
19
|
+
# CORS_ORIGINS=["https://example.com","https://app.example.com"]
|
|
20
|
+
|
|
21
|
+
# データベース設定
|
|
22
|
+
# sqlite: インメモリ(テスト用)
|
|
23
|
+
# DB_ADAPTER=sqlite
|
|
24
|
+
# DB_NAME=:memory:
|
|
25
|
+
|
|
26
|
+
# sqlite: ファイル永続化
|
|
27
|
+
# DB_ADAPTER=sqlite
|
|
28
|
+
# DB_NAME=data/nene2.db
|
|
29
|
+
|
|
30
|
+
# MySQL
|
|
31
|
+
# DB_ADAPTER=mysql
|
|
32
|
+
# DB_NAME=nene2
|
|
33
|
+
# DB_HOST=localhost
|
|
34
|
+
# DB_PORT=3306
|
|
35
|
+
# DB_USER=nene2
|
|
36
|
+
# DB_PASSWORD=secret
|
|
37
|
+
|
|
38
|
+
# デフォルト値
|
|
39
|
+
DB_ADAPTER=sqlite
|
|
40
|
+
DB_NAME=:memory:
|
|
41
|
+
DB_HOST=localhost
|
|
42
|
+
DB_PORT=3306
|
|
43
|
+
DB_USER=
|
|
44
|
+
DB_PASSWORD=
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
check:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ["3.12", "3.14"]
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Install uv
|
|
20
|
+
uses: astral-sh/setup-uv@v5
|
|
21
|
+
with:
|
|
22
|
+
version: "latest"
|
|
23
|
+
enable-cache: true
|
|
24
|
+
|
|
25
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
26
|
+
run: uv python install ${{ matrix.python-version }}
|
|
27
|
+
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: uv sync --all-extras
|
|
30
|
+
|
|
31
|
+
- name: pytest (with coverage)
|
|
32
|
+
run: uv run pytest
|
|
33
|
+
|
|
34
|
+
- name: mypy
|
|
35
|
+
run: uv run mypy src/
|
|
36
|
+
|
|
37
|
+
- name: ruff check
|
|
38
|
+
run: uv run ruff check src/ tests/
|
|
39
|
+
|
|
40
|
+
- name: ruff format
|
|
41
|
+
run: uv run ruff format --check src/ tests/
|
|
42
|
+
|
|
43
|
+
- name: pip-audit
|
|
44
|
+
run: uv run pip-audit
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
name: Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
pages: write
|
|
12
|
+
id-token: write
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: pages
|
|
16
|
+
cancel-in-progress: false
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
build:
|
|
20
|
+
name: Build Docs
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
timeout-minutes: 10
|
|
23
|
+
steps:
|
|
24
|
+
- name: Checkout
|
|
25
|
+
uses: actions/checkout@v4
|
|
26
|
+
|
|
27
|
+
- name: Set up Node.js
|
|
28
|
+
uses: actions/setup-node@v4
|
|
29
|
+
with:
|
|
30
|
+
node-version: '22'
|
|
31
|
+
cache: npm
|
|
32
|
+
|
|
33
|
+
- name: Install dependencies
|
|
34
|
+
run: npm ci
|
|
35
|
+
|
|
36
|
+
- name: Build VitePress site
|
|
37
|
+
run: npm run docs:build
|
|
38
|
+
|
|
39
|
+
- name: Upload Pages artifact
|
|
40
|
+
uses: actions/upload-pages-artifact@v3
|
|
41
|
+
with:
|
|
42
|
+
path: .vitepress/dist
|
|
43
|
+
|
|
44
|
+
deploy:
|
|
45
|
+
name: Deploy to GitHub Pages
|
|
46
|
+
needs: build
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
timeout-minutes: 10
|
|
49
|
+
environment:
|
|
50
|
+
name: github-pages
|
|
51
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
52
|
+
steps:
|
|
53
|
+
- name: Deploy
|
|
54
|
+
id: deployment
|
|
55
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
name: Build distribution
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- name: Install uv
|
|
16
|
+
uses: astral-sh/setup-uv@v5
|
|
17
|
+
with:
|
|
18
|
+
version: "latest"
|
|
19
|
+
|
|
20
|
+
- name: Build
|
|
21
|
+
run: uv build
|
|
22
|
+
|
|
23
|
+
- name: Upload dist artifacts
|
|
24
|
+
uses: actions/upload-artifact@v4
|
|
25
|
+
with:
|
|
26
|
+
name: dist
|
|
27
|
+
path: dist/
|
|
28
|
+
|
|
29
|
+
publish-testpypi:
|
|
30
|
+
name: Publish to TestPyPI
|
|
31
|
+
needs: build
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
environment:
|
|
34
|
+
name: testpypi
|
|
35
|
+
url: https://test.pypi.org/p/nene2-python
|
|
36
|
+
permissions:
|
|
37
|
+
id-token: write
|
|
38
|
+
steps:
|
|
39
|
+
- name: Install uv
|
|
40
|
+
uses: astral-sh/setup-uv@v5
|
|
41
|
+
with:
|
|
42
|
+
version: "latest"
|
|
43
|
+
|
|
44
|
+
- name: Download dist artifacts
|
|
45
|
+
uses: actions/download-artifact@v4
|
|
46
|
+
with:
|
|
47
|
+
name: dist
|
|
48
|
+
path: dist/
|
|
49
|
+
|
|
50
|
+
- name: Publish to TestPyPI
|
|
51
|
+
run: uv publish --publish-url https://test.pypi.org/legacy/ --trusted-publishing always
|
|
52
|
+
|
|
53
|
+
publish-pypi:
|
|
54
|
+
name: Publish to PyPI
|
|
55
|
+
needs: publish-testpypi
|
|
56
|
+
runs-on: ubuntu-latest
|
|
57
|
+
environment:
|
|
58
|
+
name: pypi
|
|
59
|
+
url: https://pypi.org/p/nene2-python
|
|
60
|
+
permissions:
|
|
61
|
+
id-token: write
|
|
62
|
+
steps:
|
|
63
|
+
- name: Install uv
|
|
64
|
+
uses: astral-sh/setup-uv@v5
|
|
65
|
+
with:
|
|
66
|
+
version: "latest"
|
|
67
|
+
|
|
68
|
+
- name: Download dist artifacts
|
|
69
|
+
uses: actions/download-artifact@v4
|
|
70
|
+
with:
|
|
71
|
+
name: dist
|
|
72
|
+
path: dist/
|
|
73
|
+
|
|
74
|
+
- name: Publish to PyPI
|
|
75
|
+
run: uv publish --trusted-publishing always
|
|
76
|
+
|
|
77
|
+
github-release:
|
|
78
|
+
name: Create GitHub Release
|
|
79
|
+
needs: publish-pypi
|
|
80
|
+
runs-on: ubuntu-latest
|
|
81
|
+
permissions:
|
|
82
|
+
contents: write
|
|
83
|
+
steps:
|
|
84
|
+
- uses: actions/checkout@v4
|
|
85
|
+
|
|
86
|
+
- name: Download dist artifacts
|
|
87
|
+
uses: actions/download-artifact@v4
|
|
88
|
+
with:
|
|
89
|
+
name: dist
|
|
90
|
+
path: dist/
|
|
91
|
+
|
|
92
|
+
- name: Create GitHub Release
|
|
93
|
+
uses: softprops/action-gh-release@v2
|
|
94
|
+
with:
|
|
95
|
+
files: dist/*
|
|
96
|
+
generate_release_notes: true
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
.venv/
|
|
4
|
+
.mypy_cache/
|
|
5
|
+
.ruff_cache/
|
|
6
|
+
.pytest_cache/
|
|
7
|
+
dist/
|
|
8
|
+
*.egg-info/
|
|
9
|
+
*.db
|
|
10
|
+
.env
|
|
11
|
+
.env.local
|
|
12
|
+
.coverage
|
|
13
|
+
data/
|
|
14
|
+
docs/openapi.yaml
|
|
15
|
+
# VitePress
|
|
16
|
+
node_modules/
|
|
17
|
+
.vitepress/cache/
|
|
18
|
+
.vitepress/dist/
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import { defineConfig } from 'vitepress'
|
|
2
|
+
|
|
3
|
+
function navEn() {
|
|
4
|
+
return [
|
|
5
|
+
{ text: 'Tutorial', link: '/tutorials/getting-started', activeMatch: '/tutorials/' },
|
|
6
|
+
{ text: 'How-to', link: '/how-to/add-new-domain', activeMatch: '/how-to/' },
|
|
7
|
+
{ text: 'Explanation', link: '/explanation/architecture', activeMatch: '/explanation/' },
|
|
8
|
+
{ text: 'Reference', link: '/reference/configuration', activeMatch: '/reference/' },
|
|
9
|
+
{
|
|
10
|
+
text: 'v1.0.0',
|
|
11
|
+
items: [
|
|
12
|
+
{ text: 'Changelog', link: 'https://github.com/hideyukiMORI/nene2-python/blob/main/CHANGELOG.md' },
|
|
13
|
+
{ text: 'Releases', link: 'https://github.com/hideyukiMORI/nene2-python/releases' },
|
|
14
|
+
{ text: 'PHP NENE2', link: 'https://hideyukimori.github.io/NENE2/' },
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function navJa() {
|
|
21
|
+
return [
|
|
22
|
+
{ text: 'チュートリアル', link: '/ja/tutorials/getting-started', activeMatch: '/ja/tutorials/' },
|
|
23
|
+
{ text: 'ハウツー', link: '/ja/how-to/add-new-domain', activeMatch: '/ja/how-to/' },
|
|
24
|
+
{ text: '解説', link: '/ja/explanation/architecture', activeMatch: '/ja/explanation/' },
|
|
25
|
+
{ text: 'リファレンス', link: '/ja/reference/configuration', activeMatch: '/ja/reference/' },
|
|
26
|
+
{
|
|
27
|
+
text: 'v1.0.0',
|
|
28
|
+
items: [
|
|
29
|
+
{ text: '変更履歴', link: 'https://github.com/hideyukiMORI/nene2-python/blob/main/CHANGELOG.md' },
|
|
30
|
+
{ text: 'リリース', link: 'https://github.com/hideyukiMORI/nene2-python/releases' },
|
|
31
|
+
{ text: 'PHP NENE2', link: 'https://hideyukimori.github.io/NENE2/' },
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function sidebarEn() {
|
|
38
|
+
return {
|
|
39
|
+
'/tutorials/': [{
|
|
40
|
+
text: 'Tutorials',
|
|
41
|
+
items: [
|
|
42
|
+
{ text: 'Getting started', link: '/tutorials/getting-started' },
|
|
43
|
+
{ text: 'Implement a new domain', link: '/tutorials/first-domain' },
|
|
44
|
+
],
|
|
45
|
+
}],
|
|
46
|
+
'/how-to/': [{
|
|
47
|
+
text: 'How-to guides',
|
|
48
|
+
items: [
|
|
49
|
+
{ text: 'Start a new project', link: '/how-to/new-project' },
|
|
50
|
+
{ text: 'Add a new domain', link: '/how-to/add-new-domain' },
|
|
51
|
+
{ text: 'Implement a SQLAlchemy repository', link: '/how-to/sqlalchemy-repository' },
|
|
52
|
+
{ text: 'Configure auth', link: '/how-to/configure-auth' },
|
|
53
|
+
{ text: 'Set up MCP', link: '/howto/mcp-setup' },
|
|
54
|
+
{ text: 'Run tests', link: '/how-to/run-tests' },
|
|
55
|
+
],
|
|
56
|
+
}],
|
|
57
|
+
'/explanation/': [{
|
|
58
|
+
text: 'Explanation',
|
|
59
|
+
items: [
|
|
60
|
+
{ text: 'Architecture', link: '/explanation/architecture' },
|
|
61
|
+
{ text: 'Design philosophy', link: '/explanation/design-philosophy' },
|
|
62
|
+
],
|
|
63
|
+
}, {
|
|
64
|
+
text: 'ADR',
|
|
65
|
+
collapsed: true,
|
|
66
|
+
items: [
|
|
67
|
+
{ text: 'ADR-0001 Toolchain', link: '/adr/0001-toolchain' },
|
|
68
|
+
{ text: 'ADR-0002 Clean Architecture', link: '/adr/0002-clean-architecture' },
|
|
69
|
+
{ text: 'ADR-0003 Security First', link: '/adr/0003-security-first' },
|
|
70
|
+
{ text: 'ADR-0004 AI First', link: '/adr/0004-ai-first-design' },
|
|
71
|
+
{ text: 'ADR-0005 Logging', link: '/adr/0005-logging' },
|
|
72
|
+
{ text: 'ADR-0006 Rate Limiting', link: '/adr/0006-rate-limiting' },
|
|
73
|
+
{ text: 'ADR-0009 MCP Design', link: '/adr/0009-mcp-design' },
|
|
74
|
+
{ text: 'ADR-0010 AsyncUseCase', link: '/adr/0010-async-use-case' },
|
|
75
|
+
],
|
|
76
|
+
}],
|
|
77
|
+
'/reference/': [{
|
|
78
|
+
text: 'Reference',
|
|
79
|
+
items: [
|
|
80
|
+
{ text: 'Configuration', link: '/reference/configuration' },
|
|
81
|
+
{ text: 'Framework modules', link: '/reference/framework-modules' },
|
|
82
|
+
{ text: 'REST API', link: '/reference/api' },
|
|
83
|
+
],
|
|
84
|
+
}],
|
|
85
|
+
'/adr/': [{
|
|
86
|
+
text: 'Architecture Decision Records',
|
|
87
|
+
items: [
|
|
88
|
+
{ text: 'ADR-0001 Toolchain', link: '/adr/0001-toolchain' },
|
|
89
|
+
{ text: 'ADR-0002 Clean Architecture', link: '/adr/0002-clean-architecture' },
|
|
90
|
+
{ text: 'ADR-0003 Security First', link: '/adr/0003-security-first' },
|
|
91
|
+
{ text: 'ADR-0004 AI First', link: '/adr/0004-ai-first-design' },
|
|
92
|
+
{ text: 'ADR-0005 Logging', link: '/adr/0005-logging' },
|
|
93
|
+
{ text: 'ADR-0006 Rate Limiting', link: '/adr/0006-rate-limiting' },
|
|
94
|
+
{ text: 'ADR-0009 MCP Design', link: '/adr/0009-mcp-design' },
|
|
95
|
+
{ text: 'ADR-0010 AsyncUseCase', link: '/adr/0010-async-use-case' },
|
|
96
|
+
],
|
|
97
|
+
}],
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function sidebarJa() {
|
|
102
|
+
return {
|
|
103
|
+
'/ja/tutorials/': [{
|
|
104
|
+
text: 'チュートリアル',
|
|
105
|
+
items: [
|
|
106
|
+
{ text: 'はじめての nene2-python', link: '/ja/tutorials/getting-started' },
|
|
107
|
+
{ text: '新しいドメインを実装する', link: '/ja/tutorials/first-domain' },
|
|
108
|
+
],
|
|
109
|
+
}],
|
|
110
|
+
'/ja/how-to/': [{
|
|
111
|
+
text: 'ハウツーガイド',
|
|
112
|
+
items: [
|
|
113
|
+
{ text: '新しいドメインを追加する', link: '/ja/how-to/add-new-domain' },
|
|
114
|
+
{ text: 'SQLAlchemy リポジトリを実装する', link: '/ja/how-to/sqlalchemy-repository' },
|
|
115
|
+
{ text: '認証を設定する', link: '/ja/how-to/configure-auth' },
|
|
116
|
+
{ text: 'MCP セットアップ', link: '/ja/howto/mcp-setup' },
|
|
117
|
+
{ text: 'テストを実行する', link: '/ja/how-to/run-tests' },
|
|
118
|
+
],
|
|
119
|
+
}],
|
|
120
|
+
'/ja/explanation/': [{
|
|
121
|
+
text: '解説',
|
|
122
|
+
items: [
|
|
123
|
+
{ text: 'アーキテクチャ概要', link: '/ja/explanation/architecture' },
|
|
124
|
+
{ text: '設計思想と PHP との対応', link: '/ja/explanation/design-philosophy' },
|
|
125
|
+
],
|
|
126
|
+
}],
|
|
127
|
+
'/ja/reference/': [{
|
|
128
|
+
text: 'リファレンス',
|
|
129
|
+
items: [
|
|
130
|
+
{ text: '設定リファレンス', link: '/ja/reference/configuration' },
|
|
131
|
+
{ text: 'フレームワークモジュール', link: '/ja/reference/framework-modules' },
|
|
132
|
+
{ text: 'REST API', link: '/ja/reference/api' },
|
|
133
|
+
],
|
|
134
|
+
}],
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export default defineConfig({
|
|
139
|
+
title: 'NENE2 Python',
|
|
140
|
+
description: 'FastAPI + Clean Architecture + MCP. Python 3.12+. AI-ready from day one.',
|
|
141
|
+
base: process.env.GITHUB_ACTIONS ? '/nene2-python/' : '/',
|
|
142
|
+
srcDir: './docs',
|
|
143
|
+
outDir: './.vitepress/dist',
|
|
144
|
+
cleanUrls: true,
|
|
145
|
+
ignoreDeadLinks: true,
|
|
146
|
+
|
|
147
|
+
head: [
|
|
148
|
+
['meta', { name: 'theme-color', content: '#ffd43b' }],
|
|
149
|
+
['link', { rel: 'icon', href: 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y=".9em" font-size="90">🐍</text></svg>' }],
|
|
150
|
+
],
|
|
151
|
+
|
|
152
|
+
locales: {
|
|
153
|
+
root: {
|
|
154
|
+
label: 'English',
|
|
155
|
+
lang: 'en',
|
|
156
|
+
themeConfig: {
|
|
157
|
+
nav: navEn(),
|
|
158
|
+
sidebar: sidebarEn(),
|
|
159
|
+
editLink: {
|
|
160
|
+
pattern: 'https://github.com/hideyukiMORI/nene2-python/edit/main/docs/:path',
|
|
161
|
+
text: 'Edit this page on GitHub',
|
|
162
|
+
},
|
|
163
|
+
footer: {
|
|
164
|
+
message: 'Released under the MIT License.',
|
|
165
|
+
copyright: 'Copyright © 2026 hideyukiMORI',
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
ja: {
|
|
170
|
+
label: '日本語',
|
|
171
|
+
lang: 'ja',
|
|
172
|
+
themeConfig: {
|
|
173
|
+
nav: navJa(),
|
|
174
|
+
sidebar: sidebarJa(),
|
|
175
|
+
editLink: {
|
|
176
|
+
pattern: 'https://github.com/hideyukiMORI/nene2-python/edit/main/docs/:path',
|
|
177
|
+
text: 'GitHub でこのページを編集',
|
|
178
|
+
},
|
|
179
|
+
footer: {
|
|
180
|
+
message: 'MIT ライセンスの下でリリースされています。',
|
|
181
|
+
copyright: 'Copyright © 2026 hideyukiMORI',
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
fr: {
|
|
186
|
+
label: 'Français',
|
|
187
|
+
lang: 'fr',
|
|
188
|
+
themeConfig: {
|
|
189
|
+
nav: [
|
|
190
|
+
{ text: 'Tutoriel', link: '/fr/tutorials/getting-started' },
|
|
191
|
+
{ text: 'v1.0.0', items: [{ text: 'Releases', link: 'https://github.com/hideyukiMORI/nene2-python/releases' }] },
|
|
192
|
+
],
|
|
193
|
+
sidebar: {
|
|
194
|
+
'/fr/': [{ text: 'Tutoriels', items: [{ text: 'Premiers pas', link: '/fr/tutorials/getting-started' }] }],
|
|
195
|
+
},
|
|
196
|
+
editLink: {
|
|
197
|
+
pattern: 'https://github.com/hideyukiMORI/nene2-python/edit/main/docs/:path',
|
|
198
|
+
text: 'Éditer cette page sur GitHub',
|
|
199
|
+
},
|
|
200
|
+
footer: {
|
|
201
|
+
message: 'Publié sous la licence MIT.',
|
|
202
|
+
copyright: 'Copyright © 2026 hideyukiMORI',
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
zh: {
|
|
207
|
+
label: '简体中文',
|
|
208
|
+
lang: 'zh-CN',
|
|
209
|
+
themeConfig: {
|
|
210
|
+
nav: [
|
|
211
|
+
{ text: '教程', link: '/zh/tutorials/getting-started' },
|
|
212
|
+
{ text: 'v1.0.0', items: [{ text: 'Releases', link: 'https://github.com/hideyukiMORI/nene2-python/releases' }] },
|
|
213
|
+
],
|
|
214
|
+
sidebar: {
|
|
215
|
+
'/zh/': [{ text: '教程', items: [{ text: '快速开始', link: '/zh/tutorials/getting-started' }] }],
|
|
216
|
+
},
|
|
217
|
+
editLink: {
|
|
218
|
+
pattern: 'https://github.com/hideyukiMORI/nene2-python/edit/main/docs/:path',
|
|
219
|
+
text: '在 GitHub 上编辑此页面',
|
|
220
|
+
},
|
|
221
|
+
footer: {
|
|
222
|
+
message: '根据 MIT 许可证发布。',
|
|
223
|
+
copyright: 'Copyright © 2026 hideyukiMORI',
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
'pt-br': {
|
|
228
|
+
label: 'Português (Brasil)',
|
|
229
|
+
lang: 'pt-BR',
|
|
230
|
+
themeConfig: {
|
|
231
|
+
nav: [
|
|
232
|
+
{ text: 'Tutorial', link: '/pt-br/tutorials/getting-started' },
|
|
233
|
+
{ text: 'v1.0.0', items: [{ text: 'Releases', link: 'https://github.com/hideyukiMORI/nene2-python/releases' }] },
|
|
234
|
+
],
|
|
235
|
+
sidebar: {
|
|
236
|
+
'/pt-br/': [{ text: 'Tutoriais', items: [{ text: 'Primeiros passos', link: '/pt-br/tutorials/getting-started' }] }],
|
|
237
|
+
},
|
|
238
|
+
editLink: {
|
|
239
|
+
pattern: 'https://github.com/hideyukiMORI/nene2-python/edit/main/docs/:path',
|
|
240
|
+
text: 'Editar esta página no GitHub',
|
|
241
|
+
},
|
|
242
|
+
footer: {
|
|
243
|
+
message: 'Lançado sob a Licença MIT.',
|
|
244
|
+
copyright: 'Copyright © 2026 hideyukiMORI',
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
de: {
|
|
249
|
+
label: 'Deutsch',
|
|
250
|
+
lang: 'de',
|
|
251
|
+
themeConfig: {
|
|
252
|
+
nav: [
|
|
253
|
+
{ text: 'Tutorial', link: '/de/tutorials/getting-started' },
|
|
254
|
+
{ text: 'v1.0.0', items: [{ text: 'Releases', link: 'https://github.com/hideyukiMORI/nene2-python/releases' }] },
|
|
255
|
+
],
|
|
256
|
+
sidebar: {
|
|
257
|
+
'/de/': [{ text: 'Tutorials', items: [{ text: 'Erste Schritte', link: '/de/tutorials/getting-started' }] }],
|
|
258
|
+
},
|
|
259
|
+
editLink: {
|
|
260
|
+
pattern: 'https://github.com/hideyukiMORI/nene2-python/edit/main/docs/:path',
|
|
261
|
+
text: 'Diese Seite auf GitHub bearbeiten',
|
|
262
|
+
},
|
|
263
|
+
footer: {
|
|
264
|
+
message: 'Veröffentlicht unter der MIT-Lizenz.',
|
|
265
|
+
copyright: 'Copyright © 2026 hideyukiMORI',
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
|
|
271
|
+
themeConfig: {
|
|
272
|
+
siteTitle: '🐍 NENE2',
|
|
273
|
+
socialLinks: [
|
|
274
|
+
{ icon: 'github', link: 'https://github.com/hideyukiMORI/nene2-python' },
|
|
275
|
+
],
|
|
276
|
+
search: { provider: 'local' },
|
|
277
|
+
outline: { level: [2, 3] },
|
|
278
|
+
},
|
|
279
|
+
|
|
280
|
+
markdown: {
|
|
281
|
+
theme: { light: 'github-light', dark: 'one-dark-pro' },
|
|
282
|
+
lineNumbers: true,
|
|
283
|
+
},
|
|
284
|
+
})
|