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: 0 additions & 4 deletions .github/actions/setup-python/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,3 @@ runs:
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}

- name: Install the project
run: uv sync --all-extras --dev
shell: bash
4 changes: 4 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ jobs:
- name: Setup Python
uses: ./.github/actions/setup-python

- name: Install the project
run: uv sync --all-extras --all-packages --group dev --group docs
shell: bash

- name: Build API Doc
run: uv run sophia-doc alicebot -o docs/dev-api --anchor-extend --ignore-data --overwrite --exclude-module-name --init-file-name index.md
shell: bash
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
- uses: actions/checkout@v4
- name: Setup Python
uses: ./.github/actions/setup-python
- run: uv sync --all-extras --all-packages --group dev --group lint
- run: |
uv run ruff check --output-format=github .
uv run ruff format --check .
Expand All @@ -28,6 +29,7 @@ jobs:
- uses: actions/checkout@v4
- name: Setup Python
uses: ./.github/actions/setup-python
- run: uv sync --all-extras --all-packages --group dev --group lint
- run: uv run pylint alicebot packages/*

pyright:
Expand All @@ -38,6 +40,7 @@ jobs:
uses: ./.github/actions/setup-python
- name: Setup Node
uses: ./.github/actions/setup-node
- run: uv sync --all-extras --all-packages --all-groups
- run: |
source .venv/bin/activate
pnpm run pyright
Expand All @@ -48,4 +51,5 @@ jobs:
- uses: actions/checkout@v4
- name: Setup Python
uses: ./.github/actions/setup-python
- run: uv sync --all-extras --all-packages --all-groups
- run: uv run mypy .
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jobs:
- name: Setup Python
uses: ./.github/actions/setup-python

- name: Install the project
run: uv sync --all-extras --all-packages --group dev --group docs
shell: bash

- name: Remove API Doc
run: rm -rf docs/api
- name: Build API Doc
Expand Down Expand Up @@ -44,6 +48,10 @@ jobs:
- name: Setup Python
uses: ./.github/actions/setup-python

- name: Install the project
run: uv sync --all-extras --all-packages --group dev
shell: bash

- run: uv build -o dist
shell: bash

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install the project
run: uv sync --all-extras --all-packages --group dev --group test
shell: bash

- name: Run pytest
run: uv run pytest -n auto --cov-report xml

Expand Down
2 changes: 2 additions & 0 deletions .taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[formatting]
array_auto_collapse = false
18 changes: 8 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,24 @@ Documentation = "https://docs.alicebot.dev/"
Repository = "https://github.com/AliceBotProject/alicebot"
Changelog = "https://docs.alicebot.dev/changelog.html"

[tool.uv]
dev-dependencies = [
# dev
[dependency-groups]
dev = [
"setuptools>=74",
"trio>=0.26",
"exceptiongroup>=1",
"tomli>=2",
# lint
]
lint = [
"ruff>=0.6",
"mypy>=1",
"pylint>=3",
"pylint-pydantic>=0.3",
# docs
]
docs = [
"sophia-doc>=0.1",
"tomlkit>=0.13",
# test
]
test = [
"pytest>=8",
"pytest-mock>=3",
"pytest-xdist>=3",
Expand All @@ -84,10 +86,6 @@ alicebot-adapter-apscheduler = { workspace = true }
[tool.uv.workspace]
members = ["packages/*"]

[tool.ruff]
line-length = 88
target-version = "py39"

[tool.ruff.lint]
select = ["ALL"]
ignore = [
Expand Down
475 changes: 253 additions & 222 deletions uv.lock

Large diffs are not rendered by default.

Loading