Skip to content

Commit 2bb9a80

Browse files
committed
First commit
0 parents  commit 2bb9a80

File tree

18 files changed

+778
-0
lines changed

18 files changed

+778
-0
lines changed

.copier-answers.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2+
_commit: v1.0.0
3+
_src_path: gh:mjun0812/python-copier-template
4+
author_email: mjun@mjunya.com
5+
author_name: Junya Morioka
6+
description: Modern Python Project
7+
package_name: my_package
8+
project_name: Python Project Template
9+
python_version: '3.12'

.cursor/rules/coding_style.mdc

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
description:
3+
globs:
4+
alwaysApply: true
5+
---
6+
# Development Guidelines
7+
8+
This document contains critical information about working with this codebase.
9+
Follow these guidelines precisely.
10+
11+
## Rules
12+
13+
1. Package Management
14+
- ONLY use uv, NEVER pip
15+
- Installation: `uv add package`
16+
- Upgrading: `uv add --dev package --upgrade-package package`
17+
- FORBIDDEN: `uv pip install`, `@latest` syntax
18+
19+
2. Code Quality
20+
- Type hints required for all code
21+
- Follow existing patterns exactly
22+
- Use Google style for docstring
23+
24+
3. Testing Requirements
25+
- Framework: `uv run --frozen pytest`
26+
- Coverage: test edge cases and errors
27+
- New features require tests
28+
- Bug fixes require regression tests
29+
30+
4. Git
31+
- Follow the Conventional Commits style on commit messages.
32+
33+
## Code Formatting and Linting
34+
35+
1. Ruff
36+
- Format: `uv run --frozen ruff format .`
37+
- Check: `uv run --frozen ruff check .`
38+
- Fix: `uv run --frozen ruff check . --fix`
39+
2. Pre-commit
40+
- Config: `.pre-commit-config.yaml`
41+
- Runs: on git commit
42+
- Tools: Ruff (Python)

.devcontainer/devcontainer.json

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"name": "python-devcontainer",
3+
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
4+
"containerEnv": {
5+
"DISPLAY": "${localEnv:DISPLAY}",
6+
"PYTHONUNBUFFERED": "1",
7+
"PYTHONDONTWRITEBYTECODE": "1",
8+
"UV_CACHE_DIR": "${containerWorkspaceFolder}/.cache/uv",
9+
"UV_LINK_MODE": "copy",
10+
"UV_PROJECT_ENVIRONMENT": "/home/vscode/.venv",
11+
"UV_COMPILE_BYTECODE": "1"
12+
},
13+
"features": {
14+
"ghcr.io/devcontainers/features/github-cli:1": {},
15+
"ghcr.io/devcontainers/features/common-utils:2": {
16+
"configureZshAsDefaultShell": true
17+
},
18+
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1": {
19+
"packages": "curl,wget,git,jq,ca-certificates,build-essential"
20+
},
21+
"ghcr.io/va-h/devcontainers-features/uv:1": {
22+
"shellAutocompletion": true
23+
},
24+
"ghcr.io/anthropics/devcontainer-features/claude-code:1.0": {}
25+
},
26+
"runArgs": [
27+
"--init",
28+
"--rm"
29+
],
30+
"hostRequirements": {
31+
"gpu": "optional"
32+
},
33+
"customizations": {
34+
"vscode": {
35+
"settings": {
36+
"python.defaultInterpreterPath": "/home/vscode/.venv/bin/python"
37+
},
38+
"extensions": [
39+
"ms-python.python",
40+
"charliermarsh.ruff",
41+
"eamodio.gitlens",
42+
"tamasfe.even-better-toml",
43+
"ms-toolsai.jupyter",
44+
"yzhang.markdown-all-in-one"
45+
]
46+
}
47+
},
48+
"mounts": [
49+
"source=claude-code-config,target=/home/vscode/.claude,type=volume"
50+
],
51+
"postCreateCommand": "uv sync",
52+
"postStartCommand": "uv run pre-commit install"
53+
}

.github/workflows/ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
ci:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Install uv
17+
uses: astral-sh/setup-uv@v4
18+
19+
- name: Format
20+
run: uvx ruff format . --check --diff
21+
22+
- name: Lint
23+
run: uvx ruff check --output-format=github .

0 commit comments

Comments
 (0)