Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/bump_version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
- master
- main
permissions:
contents: write # 用于创建和推送标签
pull-requests: write # 用于创建 PR
contents: write # 用于创建和推送标签
pull-requests: write # 用于创建 PR
jobs:
bump-version:
if: ${{ !startsWith(github.event.head_commit.message, 'bump:') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: Deploy Docs
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+' # 匹配类似 1.0.0, 2.1.3 等格式的标签
- '[0-9]+.[0-9]+.[0-9]+' # 匹配类似 1.0.0, 2.1.3 等格式的标签
workflow_dispatch:
permissions:
contents: write # 用于部署到 GitHub Pages
contents: write # 用于部署到 GitHub Pages
jobs:
deploy:
runs-on: ubuntu-latest
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ name: release-build
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+' # 匹配类似 1.0.0, 2.1.3 等格式的标签
- '[0-9]+.[0-9]+.[0-9]+' # 匹配类似 1.0.0, 2.1.3 等格式的标签
permissions:
contents: write # 用于创建 release
id-token: write # 用于发布到 PyPI
contents: write # 用于创建 release
id-token: write # 用于发布到 PyPI
jobs:
release-build:
runs-on: ubuntu-latest
permissions:
contents: write # 用于创建 GitHub Release
contents: write # 用于创建 GitHub Release
steps:
- uses: actions/checkout@v4
- name: Install Task
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@
*.pyc
# MkDocs build output
/site/
htmlcov/
.env
test-output/
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ repos:
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.7.8
hooks:
- id: uv-lock # Update the uv lockfile
- id: uv-lock # Update the uv lockfile
- repo: https://github.com/google/yamlfmt
rev: v0.14.0
rev: v0.17.2
hooks:
- id: yamlfmt
- repo: https://github.com/python-jsonschema/check-jsonschema
Expand All @@ -15,4 +15,4 @@ repos:
- repo: https://github.com/rhysd/actionlint
rev: v1.7.7
hooks:
- id: actionlint # lint github actions
- id: actionlint # lint github actions
11 changes: 5 additions & 6 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
include = ["pyproject.toml", "repo_scaffold/**/*.py", "tests/**/*.py"]
exclude = ["repo_scaffold/templates/**/*"]
line-length = 120
target-version = "py312"
target-version = "py310"

[lint]
extend-ignore = [
"D100", # Missing docstring in public module
"D101", # Missing docstring in public module
"D102", # Missing docstring in public docs
"D104", # Missing docstring in public package
# airflow dags are not required to have docstrings
"D203", # 1 blank line required before class docstring
"D213" # Multi-line docstring summary should start at the second line
"D107", # Missing docstring in public package
]
ignore = [
"W191", # indentation contains tabs
Expand All @@ -33,4 +32,4 @@ force-single-line = true
lines-after-imports = 2

[lint.pydocstyle]
convention = "google"
convention = "google"
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.envFile": "${workspaceFolder}/.env",
}
47 changes: 10 additions & 37 deletions .yamlfmt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,19 @@ yaml_files:
- ".yamlfmt"
- "!**/vendor/**"
- "!**/node_modules/**"
regex_exclude:
- ".*\\Taskfile\\.yml$"
- ".*\\mkdocs\\.yml$"
yaml_options:
# 文档末尾是否需要一个空行
end_of_document: true
# 配置文档分隔符

document_start: false
formatter:
type: basic
# 控制换行符保留 - 设为 false 可能减少不必要的空行
retain_line_breaks: false
# 只保留单个换行符,移除多余的空行
retain_line_breaks_single: true
# 注释前的空格数
pad_line_comments: 2
# 去除行尾空白字符
trim_trailing_whitespace: true
# 行长度限制

line_length: 100
# 缩进大小

indentation: 2
# 是否保留引号

preserve_quotes: true
# 对齐方式

alignment:
# 是否启用键值对齐
enable: true
# 键和冒号之间的最小间隔

key_value: 1
# 对齐后冒号和值之间的空格数

colon_value: 1
# 数组格式化

array:
# 嵌套数组是否应该与父级对齐
indent_nested: true
# 数组项与前导符号 - 之间的空格数

item_spacing: 1
# 是否移除文档注释

strip_comments: false
# 是否保留文件开头的注释

preserve_header: true
Loading