Skip to content

Commit 6bef402

Browse files
authored
Merge pull request #28 from nglcobdai/dev
v0.0.1
2 parents ee4c5ab + e91c320 commit 6bef402

33 files changed

Lines changed: 2601 additions & 17 deletions

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
PROJECT_NAME=project-template
2+
DOCKER_SHM_SIZE=4g
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: 🐛 バグの報告
3+
about: バグを見つけた場合はこちら
4+
---
5+
6+
## 🐛 概要
7+
8+
## 📸 スクリーンショット
9+
10+
## 👀 再現手順
11+
12+
## 🎨 期待する挙動
13+
14+
## 📦️ 環境
15+
16+
- macOS / Windows / Linux / iOS / Android
17+
- Chrome / Safari / Firefox / Edge
18+
19+
## 💡 解決策
20+
21+
## ✅ タスク

.github/ISSUE_TEMPLATE/change.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: 🚀 仕様変更
3+
about: 仕様変更はこちら
4+
---
5+
6+
## ✨ 概要
7+
8+
## 🔥 ゴール
9+
10+
## ✅ タスク

.github/ISSUE_TEMPLATE/feature.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: ✨ 新機能について
3+
about: 新機能についてはこちら
4+
---
5+
6+
## ✨ 概要
7+
8+
## 🔥 ゴール
9+
10+
## 📷 スクリーンショット
11+
12+
## 📄 参考資料
13+
14+
## ✅ タスク

.github/ISSUE_TEMPLATE/survey.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: 🔎 調査
3+
about: 調査周りはこちら
4+
---
5+
6+
## 🔎 概要
7+
8+
## ✅ タスク

.github/pull_request_template.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## 🔨 変更内容
2+
3+
## 💡 特筆事項
4+
5+
## 📸 スクリーンショット
6+
7+
## ✅ 解決するイシュー
8+
9+
## 🤝 関連するイシュー

.github/workflows/code-review.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+
name: Code Review
5+
6+
on:
7+
pull_request:
8+
types: [opened, synchronize, reopened, edited, ready_for_review]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
code-review:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Set up Python 3.10
20+
uses: actions/setup-python@v3
21+
with:
22+
python-version: "3.10"
23+
- name: Install pip
24+
run: python -m pip install --upgrade pip
25+
- name: Install poetry
26+
run: pip install poetry
27+
- name: poetry install
28+
run: poetry install --no-root
29+
- name: Lint with flake8
30+
run: |
31+
# stop the build if there are Python syntax errors or undefined names
32+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
33+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
34+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Workflow for deploying Sphinx documentation built within a Docker container to GitHub Pages
2+
name: Deploy Sphinx Document to Pages
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches: ["main"]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Set permissions for the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow only one concurrent deployment, skipping queued runs, but do not cancel in-progress ones
19+
concurrency:
20+
group: "pages"
21+
cancel-in-progress: false
22+
23+
jobs:
24+
# Single deploy job since we're just deploying
25+
deploy:
26+
environment:
27+
name: github-pages
28+
url: ${{ steps.deployment.outputs.page_url }}
29+
runs-on: ubuntu-latest
30+
31+
steps:
32+
# Step 1: Checkout the repository
33+
- uses: actions/checkout@v3
34+
35+
# Step 2: Install Docker Compose
36+
- name: Install Docker Compose
37+
run: |
38+
sudo apt-get update
39+
sudo apt-get install -y docker-compose
40+
41+
# Step 3: Create an .env file if required
42+
- name: Make .env file
43+
run: |
44+
if [ -f .env.example ]; then
45+
cp .env.example .env
46+
fi
47+
48+
# Step 4: Build and Start the containers
49+
- name: Build and Start Docker Containers
50+
run: |
51+
docker-compose -f docker-compose.yml --env-file .env up --build -d
52+
53+
# Step 5: Run commands inside the Docker container to build Sphinx documentation
54+
- name: Build Sphinx Documentation inside Container
55+
run: |
56+
docker-compose -f docker-compose.yml --env-file .env exec -T dev bash -c "
57+
cd docs && \
58+
poetry run make dirhtml"
59+
60+
# Step 6: Set up Pages configuration for deployment
61+
- name: Setup Pages
62+
uses: actions/configure-pages@v3
63+
64+
# Step 7: Upload the generated HTML files as artifacts for deployment
65+
- name: Upload artifact
66+
uses: actions/upload-pages-artifact@v2
67+
with:
68+
path: "./docs/build"
69+
70+
# Step 8: Deploy to GitHub Pages
71+
- name: Deploy to GitHub Pages
72+
id: deployment
73+
uses: actions/deploy-pages@v2

.github/workflows/pytest.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: pytest
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
pytest:
12+
if: github.event.pull_request.draft == false
13+
runs-on: ubuntu-latest
14+
environment:
15+
name: development
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: Install Docker Compose
21+
run: |
22+
sudo apt-get update
23+
sudo apt-get install -y docker-compose
24+
25+
- name: Make .env file
26+
run: |
27+
cp .env.example .env
28+
29+
- name: Build the containers & Start the containers
30+
run: |
31+
docker-compose -f docker-compose.yml --env-file .env up --build -d
32+
33+
- name: Test with pytest
34+
run: |
35+
docker-compose -f docker-compose.yml --env-file .env exec -T project pytest
36+
37+
- name: Clean up
38+
if: always()
39+
run: |
40+
docker-compose -f docker-compose.yml --env-file .env down

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
4+
# Jupyter Notebook
5+
.ipynb_checkpoints
6+
7+
# Environments
8+
.env
9+
10+
# output
11+
.DS_Store
12+
13+
# Sphinx documentation
14+
docs/build/**

0 commit comments

Comments
 (0)