-
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into xml_set_fanspeed
- Loading branch information
Showing
194 changed files
with
5,978 additions
and
561 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"commitMessagePrefix": "⬆️", | ||
"configMigration": true, | ||
"dependencyDashboard": true, | ||
"labels": ["dependencies", "no-stale"], | ||
"lockFileMaintenance": { | ||
"enabled": true | ||
}, | ||
"packageRules": [ | ||
{ | ||
"addLabels": ["python"], | ||
"matchManagers": ["pep621"] | ||
}, | ||
{ | ||
"matchDepTypes": ["dev"], | ||
"matchManagers": ["pep621"], | ||
"rangeStrategy": "pin" | ||
}, | ||
{ | ||
"addLabels": ["github_actions"], | ||
"matchManagers": ["github-actions"], | ||
"rangeStrategy": "pin" | ||
}, | ||
{ | ||
"addLabels": ["rust"], | ||
"matchManagers": ["cargo"] | ||
} | ||
], | ||
"rebaseWhen": "behind-base-branch" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,35 +3,44 @@ name: CI | |
on: | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
pull_request: | ||
|
||
env: | ||
DEFAULT_PYTHON: "3.12" | ||
UV_CACHE_DIR: /tmp/.uv-cache | ||
|
||
jobs: | ||
code-quality: | ||
runs-on: "ubuntu-latest" | ||
name: Check code quality | ||
steps: | ||
- uses: "actions/checkout@v4" | ||
- name: Set up Python ${{ env.DEFAULT_PYTHON }} | ||
id: python | ||
uses: actions/[email protected] | ||
- name: ⤵️ Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🏗 Install uv and Python | ||
uses: astral-sh/setup-uv@v5 | ||
with: | ||
python-version: ${{ env.DEFAULT_PYTHON }} | ||
cache: "pip" | ||
cache-dependency-path: "requirements*" | ||
- name: Install dependencies | ||
enable-cache: true | ||
cache-dependency-glob: "uv.lock" | ||
cache-local-path: ${{ env.UV_CACHE_DIR }} | ||
|
||
- name: Install additional OS dependencies | ||
run: | | ||
pip install -r requirements.txt | ||
pip install -r requirements-test.txt | ||
sudo apt-get update | ||
sudo apt-get -y install \ | ||
pkg-config \ | ||
liblzma-dev | ||
- name: 🏗 Install the project | ||
run: uv sync --locked --group lint | ||
|
||
# Following steps cannot run by pre-commit.ci as repo = local | ||
- name: Run mypy | ||
run: mypy deebot_client/ | ||
run: uv run --frozen mypy deebot_client/ | ||
|
||
- name: Pylint review | ||
run: pylint deebot_client/ | ||
run: uv run --frozen pylint deebot_client/**/*.py | ||
|
||
- name: Verify no getLogger usages | ||
run: scripts/check_getLogger.sh | ||
|
||
|
@@ -40,24 +49,74 @@ jobs: | |
name: Run tests | ||
strategy: | ||
matrix: | ||
python-version: ["3.12"] | ||
python-version: | ||
- "3.12" | ||
- "3.13" | ||
steps: | ||
- uses: "actions/checkout@v4" | ||
- name: Set up Python ${{ matrix.python-version }} | ||
id: python | ||
uses: actions/[email protected] | ||
- name: ⤵️ Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🏗 Install uv and Python ${{ matrix.python-version }} | ||
uses: astral-sh/setup-uv@v5 | ||
with: | ||
enable-cache: true | ||
cache-dependency-glob: "uv.lock" | ||
cache-local-path: ${{ env.UV_CACHE_DIR }} | ||
python-version: ${{ matrix.python-version }} | ||
cache: "pip" | ||
cache-dependency-path: "requirements*" | ||
- name: Install dependencies | ||
|
||
- name: Install additional OS dependencies | ||
run: | | ||
pip install -r requirements.txt | ||
pip install -r requirements-test.txt | ||
sudo apt-get update | ||
sudo apt-get -y install \ | ||
pkg-config \ | ||
liblzma-dev | ||
- name: 🏗 Install the project | ||
run: uv sync --locked --group test | ||
|
||
- name: Run pytest | ||
run: pytest --cov=./ --cov-report=xml | ||
run: uv run --frozen pytest tests --cov=./ --cov-report=xml --junitxml=junit.xml -o junit_family=legacy | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
uses: codecov/codecov-action@v5 | ||
with: | ||
fail_ci_if_error: true | ||
|
||
- name: Upload test results to Codecov | ||
if: ${{ !cancelled() }} | ||
uses: codecov/test-results-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
fail_ci_if_error: true | ||
|
||
benchmarks: | ||
runs-on: "ubuntu-latest" | ||
name: Run benchmarks | ||
steps: | ||
- name: ⤵️ Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🏗 Install uv | ||
uses: astral-sh/setup-uv@v5 | ||
|
||
- name: 🏗 Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version-file: ".python-version" | ||
|
||
- name: Install additional OS dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -y install \ | ||
pkg-config \ | ||
liblzma-dev | ||
- name: 🏗 Install the project | ||
run: | | ||
uv export --group benchmark > requirements.txt | ||
uv pip install -e . --system -r requirements.txt | ||
- name: Run benchmarks | ||
uses: CodSpeedHQ/action@main | ||
with: | ||
run: pytest tests/ --codspeed | ||
token: ${{ secrets.CODSPEED_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,6 @@ name: "CodeQL" | |
on: | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
pull_request: | ||
schedule: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,27 +13,73 @@ on: | |
types: [published] | ||
|
||
jobs: | ||
deploy: | ||
wheels: | ||
name: Build wheels | ||
runs-on: ubuntu-latest | ||
environment: release | ||
permissions: | ||
id-token: write | ||
strategy: | ||
matrix: | ||
python-version: | ||
- "3.12" | ||
- "3.13" | ||
linux-compatibility: | ||
- "manylinux_2_34" | ||
steps: | ||
- name: 📥 Checkout the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/[email protected] | ||
- name: ⤵️ Check out code from GitHub | ||
uses: actions/[email protected] | ||
- name: 🏗 Set up uv and Python ${{ matrix.python-version }} | ||
uses: astral-sh/setup-uv@v5 | ||
with: | ||
python-version: "3.12" | ||
|
||
- name: Install dependencies | ||
enable-cache: true | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install additional OS dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -q build | ||
sudo apt-get update | ||
sudo apt-get -y install \ | ||
pkg-config \ | ||
liblzma-dev | ||
- name: 🏗 Set package version | ||
run: | | ||
sed -i "s/^version = \".*\"/version = \"${{ github.event.release.tag_name }}\"/" pyproject.toml | ||
- name: 📦 Build package | ||
run: python -m build | ||
run: uv build --wheel --config-settings build-args='--compatibility ${{ matrix.linux-compatibility }}' | ||
- name: ⬆️ Upload wheels | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheels-${{ matrix.python-version }}-${{ matrix.linux-compatibility }} | ||
path: dist | ||
|
||
- name: 📤 Publish package | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
release: | ||
name: Releasing to PyPi | ||
runs-on: ubuntu-latest | ||
needs: ["wheels"] | ||
environment: | ||
name: release | ||
url: https://pypi.org/manage/project/deebot-client/ | ||
permissions: | ||
contents: write | ||
id-token: write | ||
steps: | ||
- name: ⤵️ Check out code from GitHub | ||
uses: actions/[email protected] | ||
- name: 🏗 Set up uv | ||
uses: astral-sh/setup-uv@v5 | ||
with: | ||
enable-cache: true | ||
- name: 🏗 Set package version | ||
run: | | ||
sed -i "s/^version = \".*\"/version = \"${{ github.event.release.tag_name }}\"/" pyproject.toml | ||
- name: 📦 Build source package | ||
run: uv build --sdist | ||
- name: ⬇️ Download wheels | ||
uses: actions/download-artifact@v4 | ||
with: | ||
pattern: wheels-* | ||
path: dist | ||
merge-multiple: true | ||
- name: 🚀 Publish to PyPi | ||
run: uv publish | ||
- name: ✍️ Sign published artifacts | ||
uses: sigstore/[email protected] | ||
with: | ||
inputs: ./dist/*.tar.gz ./dist/*.whl | ||
release-signing-artifacts: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name: Release Drafter | |
on: | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
|
||
jobs: | ||
update_release_draft: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,11 @@ nosetests.xml | |
.*_cache | ||
|
||
test.py | ||
.env | ||
|
||
/target | ||
|
||
# rust so | ||
*.cpython*.so | ||
|
||
.codspeed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,19 +7,19 @@ ci: | |
- verifyNoGetLogger | ||
|
||
default_language_version: | ||
python: python3.12 | ||
python: python3.13 | ||
|
||
repos: | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.6.3 | ||
rev: v0.9.2 | ||
hooks: | ||
- id: ruff | ||
args: | ||
- --fix | ||
- --unsafe-fixes | ||
- id: ruff-format | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.17.0 | ||
rev: v3.19.1 | ||
hooks: | ||
- id: pyupgrade | ||
args: | ||
|
@@ -36,8 +36,9 @@ repos: | |
exclude_types: | ||
- csv | ||
- json | ||
exclude: ^uv.lock$ | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
rev: v5.0.0 | ||
hooks: | ||
- id: check-executables-have-shebangs | ||
- id: check-merge-conflict | ||
|
@@ -54,6 +55,7 @@ repos: | |
- [email protected] | ||
exclude_types: | ||
- python | ||
exclude: ^uv.lock$ | ||
- repo: https://github.com/adrienverge/yamllint.git | ||
rev: v1.35.1 | ||
hooks: | ||
|
Oops, something went wrong.