diff --git a/.github/workflows/python-tests.yml b/.github/workflows/pull-request-check.yml similarity index 61% rename from .github/workflows/python-tests.yml rename to .github/workflows/pull-request-check.yml index d908bfe..96e1093 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/pull-request-check.yml @@ -1,23 +1,23 @@ -name: Python Tests +name: Pull request check on: - push: - branches: [ main ] pull_request: - branches: [ main ] + branches: [ master ] jobs: test: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.10", "3.11", "3.12", "3.13"] + python-version: ["3.13", "3.14"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 + with: + fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} @@ -27,6 +27,11 @@ jobs: pip install . if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Run pre-commit + run: | + pip install pre-commit + pre-commit run --from-ref origin/master --to-ref HEAD + - name: Run tests run: | export PYTHONPATH=$PYTHONPATH:. diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5649c21..97641d8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ --- repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v6.0.0 hooks: - id: check-yaml - id: check-added-large-files diff --git a/README.md b/README.md index dbeea6b..8cf2ed7 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ Python library to interact with Mitsubishi Kumo Cloud devices via their local AP The hard work of generating the security token was done by https://github.com/sushilks/kumojs, and that part of pykumo is based heavily on sushilks's code, translated to Python by me. pykumo has no dependency on kumojs. + ## Kumo System Components ### Outdoor Unit @@ -95,3 +96,9 @@ query = '{"c":{"indoorUnit":{"status":{}}}}'.encode('utf-8') unit._request(query) ``` This prints the primary record, the `status` object. Most of the valid queries and commands were discovered by snooping the traffic between the Kumo Cloud app and the indoor unit. A few were determined by experimentation. It's possible that additional values and controls are available beyond those already discovered, especially on indoor units newer than those owned by this author. I welcome details on these via pull requests or issues on this repo. + +## Development + +Pull requests are welcome for new features or bug fixes. The primary maintainer's day job may make response times somewhat slow. + +Pre-commit is configured on this repo. To make development easier, run `pre-commit install`. Pre-commit and unit tests will run on pull requests. For PRs from forked repos, this will happen after maintainer approval.