File tree Expand file tree Collapse file tree 12 files changed +215
-0
lines changed
Expand file tree Collapse file tree 12 files changed +215
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Docs Automation
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ mode :
7+ description : " validate only"
8+ required : true
9+ default : " validate"
10+
11+ permissions :
12+ contents : write
13+
14+ concurrency :
15+ group : docs-automation-${{ github.ref }}
16+ cancel-in-progress : true
17+
18+ jobs :
19+ docs-automation :
20+ runs-on : ubuntu-latest
21+ steps :
22+ - uses : actions/checkout@v4
23+ - uses : actions/setup-python@v5
24+ with :
25+ python-version : " 3.11"
26+ - name : README has required sections
27+ run : |
28+ grep -q '^## 対象者' README.md
29+ grep -q '^## 依存関係' README.md
30+ grep -q '^## 最短セットアップ' README.md
Original file line number Diff line number Diff line change 1+ name : Internal PyPI Governance
2+
3+ on :
4+ workflow_dispatch :
5+
6+ permissions :
7+ contents : read
8+
9+ jobs :
10+ check-pip-config :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+ - name : Validate pip.conf policy
15+ run : |
16+ test -f pip.conf
17+ ! grep -q "file:///Users/" pip.conf
Original file line number Diff line number Diff line change 1+ name : Update OSS Licenses
2+
3+ on :
4+ push :
5+ branches : [main]
6+ paths :
7+ - " **/pyproject.toml"
8+ - " .github/workflows/oss_licenses.yml"
9+ workflow_dispatch :
10+
11+ permissions :
12+ contents : write
13+
14+ concurrency :
15+ group : oss-licenses-${{ github.ref }}
16+ cancel-in-progress : true
17+
18+ jobs :
19+ update-notice :
20+ runs-on : ubuntu-latest
21+ steps :
22+ - uses : actions/checkout@v4
23+ - uses : actions/setup-python@v5
24+ with :
25+ python-version : " 3.11"
26+ - name : Install dependencies
27+ run : |
28+ python -m venv .venv
29+ . .venv/bin/activate
30+ python -m pip install --upgrade pip
31+ pip install pip-licenses
32+ - name : Generate OSS_LICENSES.md
33+ run : |
34+ . .venv/bin/activate
35+ pip-licenses --format=markdown > OSS_LICENSES.md
36+ - name : Commit and push if changed
37+ run : |
38+ if ! git diff --quiet; then
39+ git add OSS_LICENSES.md
40+ git config user.name "github-actions[bot]"
41+ git config user.email "github-actions[bot]@users.noreply.github.com"
42+ git commit -m "chore: update OSS_LICENSES.md"
43+ git push
44+ fi
Original file line number Diff line number Diff line change 1+ name : PR Gate
2+
3+ on :
4+ pull_request :
5+
6+ jobs :
7+ pr-gate :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - run : echo "pr-gate ok"
Original file line number Diff line number Diff line change 1+ name : QA Gate
2+
3+ on :
4+ pull_request :
5+
6+ jobs :
7+ qa-gate :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - uses : actions/checkout@v4
11+ - uses : actions/setup-python@v5
12+ with :
13+ python-version : " 3.11"
14+ - run : python -m pip install -e .
15+ - run : python -m compileall -q .
Original file line number Diff line number Diff line change 1+ .venv /
2+ __pycache__ /
3+ * .pyc
4+ .DS_Store
5+ * .egg-info /
Original file line number Diff line number Diff line change 1+ # project_template
2+ <!-- README_LEVEL: L2 -->
3+
4+ <div align =" center " >
5+
6+ [ ![ Python] ( https://img.shields.io/badge/python-3.9+-blue.svg )] ( https://www.python.org/ )
7+ [ ![ License] ( https://img.shields.io/badge/license-MIT-yellow.svg )] ( https://opensource.org/licenses/MIT )
8+
9+ </div >
10+
11+ ## 概要
12+
13+ AiLab 配下の独立リポジトリを標準運用で開始するためのテンプレートです。
14+
15+ ## 対象者
16+ - 運用担当者: 日常運用・手順実行を行う担当者
17+ - 開発者: 機能追加・保守を行う担当者
18+ - 検証担当者: 実機/テスト環境で動作確認を行う担当者
19+
20+ ## 依存関係
21+ - Python: ` pyproject.toml ` の ` requires-python ` に従う
22+ - 主要ライブラリ: ` pyproject.toml ` の ` dependencies ` を参照
23+ - pip index設定: ` $AILAB_ROOT/lab_automation_module/config/pip/pip.conf.local ` を正本とする
24+
25+ ## 最短セットアップ
26+ ` bash ` / ` zsh ` で以下を実行。
27+ ``` bash
28+ export AILAB_ROOT=/path/to/AiLab
29+ export PIP_CONFIG_FILE=" $AILAB_ROOT /lab_automation_module/config/pip/pip.conf.local"
30+ python -m venv .venv
31+ source .venv/bin/activate
32+ python -m pip install -e .
33+ python main.py
34+ ```
35+
36+ ## 主な機能
37+ - ` main.py ` 入口 + ` project-template ` console script
38+ - ` PR Gate ` / ` QA Gate ` / ` Docs Automation ` / ` OSS License ` workflow 同梱
39+ - README 標準章(対象者/依存関係/最短セットアップ)を初期実装
40+
41+ ## 使い方
42+ ``` bash
43+ python main.py
44+ ```
45+
46+ ## 構成
47+ ```
48+ project_template/
49+ ├── .github/workflows/
50+ ├── src/
51+ ├── main.py
52+ ├── pyproject.toml
53+ └── README.md
54+ ```
55+
56+ ## ライセンス
57+ MIT
Original file line number Diff line number Diff line change 1+ """Project root launcher for project-template."""
2+
3+ from src .app import main as _run
4+
5+
6+ def main () -> int :
7+ return int (_run ())
8+
9+
10+ if __name__ == "__main__" :
11+ raise SystemExit (main ())
Original file line number Diff line number Diff line change 1+ # このpip.confは実体設定を持ちません。
2+ # 以下を参照してください:
3+ # $AILAB_ROOT/lab_automation_module/config/pip/pip.conf.local
Original file line number Diff line number Diff line change 1+ [build-system ]
2+ requires = [" setuptools>=61" , " packaging>=23" ]
3+ build-backend = " setuptools.build_meta"
4+
5+ [project ]
6+ name = " project-template"
7+ version = " 0.1.0"
8+ description = " AiLab standard project template"
9+ readme = " README.md"
10+ requires-python = " >=3.9"
11+ authors = [{ name = " TITManagement" }]
12+ license = { text = " MIT" }
13+ dependencies = []
14+
15+ [project .scripts ]
16+ project-template = " src.app:main"
17+
18+ [tool .setuptools ]
19+ packages = [" src" ]
You can’t perform that action at this time.
0 commit comments