Skip to content

Commit

Permalink
chore: new styling (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lash-L authored Apr 13, 2023
1 parent 16bd2d1 commit 55e6426
Show file tree
Hide file tree
Showing 20 changed files with 537 additions and 503 deletions.
144 changes: 72 additions & 72 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,82 +1,82 @@
name: CI

on:
push:
branches:
- main
pull_request:
push:
branches:
- main
pull_request:

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
# Make sure commit messages follow the conventional commits convention:
# https://www.conventionalcommits.org
commitlint:
name: Lint Commit Messages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: wagoid/[email protected]
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: pre-commit/[email protected]
# Make sure commit messages follow the conventional commits convention:
# https://www.conventionalcommits.org
commitlint:
name: Lint Commit Messages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: wagoid/[email protected]
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: pre-commit/[email protected]

test:
strategy:
fail-fast: false
matrix:
python-version:
- "3.10"
- "3.11"
os:
- ubuntu-latest
- windows-latest
- macOS-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: snok/[email protected]
- name: Install Dependencies
run: poetry install
shell: bash
- name: Test with Pytest
run: poetry run pytest
shell: bash
release:
runs-on: ubuntu-latest
environment: release
if: github.ref == 'refs/heads/main'
needs:
- test
test:
strategy:
fail-fast: false
matrix:
python-version:
- "3.10"
- "3.11"
os:
- ubuntu-latest
- windows-latest
- macOS-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: snok/[email protected]
- name: Install Dependencies
run: poetry install
shell: bash
- name: Test with Pytest
run: poetry run pytest
shell: bash
release:
runs-on: ubuntu-latest
environment: release
if: github.ref == 'refs/heads/main'
needs:
- test

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false

# Run semantic release:
# - Update CHANGELOG.md
# - Update version in code
# - Create git tag
# - Create GitHub release
# - Publish to PyPI
- name: Python Semantic Release
uses: relekang/[email protected]
with:
github_token: ${{ secrets.GH_TOKEN }}
repository_username: __token__
repository_password: ${{ secrets.PYPI_TOKEN }}
# Run semantic release:
# - Update CHANGELOG.md
# - Update version in code
# - Create git tag
# - Create GitHub release
# - Publish to PyPI
- name: Python Semantic Release
uses: relekang/[email protected]
with:
github_token: ${{ secrets.GH_TOKEN }}
repository_username: __token__
repository_password: ${{ secrets.PYPI_TOKEN }}
32 changes: 31 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,42 @@
# See https://pre-commit.com/hooks.html for more hooks
default_stages: [ commit ]


repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: debug-statements
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-json
- id: check-toml
- id: check-yaml
- id: detect-private-key
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/python-poetry/poetry
rev: 1.3.2
hooks:
- id: poetry-check
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
hooks:
- id: codespell
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.260
hooks:
- id: ruff
args:
- --fix
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.931
hooks:
Expand Down
26 changes: 17 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,30 @@
<!--next-version-placeholder-->

## v0.6.4 (2023-04-11)

### Fix
* Disconnect on timeout so next command can work ([`5ad397b`](https://github.com/humbertogontijo/python-roborock/commit/5ad397b3bbb4bc600888baba6c0cc15be9d17ef7))

- Disconnect on timeout so next command can work ([`5ad397b`](https://github.com/humbertogontijo/python-roborock/commit/5ad397b3bbb4bc600888baba6c0cc15be9d17ef7))

## v0.6.3 (2023-04-11)

### Fix
* Semantic_release ([`63b249d`](https://github.com/humbertogontijo/python-roborock/commit/63b249d65d3fc40b048320e6596aedc40f588bf9))

- Semantic_release ([`63b249d`](https://github.com/humbertogontijo/python-roborock/commit/63b249d65d3fc40b048320e6596aedc40f588bf9))

## v0.6.2 (2023-04-11)

### Fix
* Error code nogo_zone_detected ([`722e4b5`](https://github.com/humbertogontijo/python-roborock/commit/722e4b5cfd0c4891adc506e9fe99740860027670))

- Error code nogo_zone_detected ([`722e4b5`](https://github.com/humbertogontijo/python-roborock/commit/722e4b5cfd0c4891adc506e9fe99740860027670))

## v0.6.1 (2023-04-10)

### Fix
* Trigger release ([`f1ce0ed`](https://github.com/humbertogontijo/python-roborock/commit/f1ce0ed55a254bccd8567b48974ff74dd9ec8b25))
* Trigger release ([`9a4462c`](https://github.com/humbertogontijo/python-roborock/commit/9a4462c800762393cc047085156acbe119cd0fe4))
* Trigger release ([`b7a664b`](https://github.com/humbertogontijo/python-roborock/commit/b7a664b15b7c5180d816de325537693f47c24860))
* Trigger release ([`9256849`](https://github.com/humbertogontijo/python-roborock/commit/9256849252f019f4fea2f59384bc0ea7c57adb5c))
* Lowercase true ([`774c3cc`](https://github.com/humbertogontijo/python-roborock/commit/774c3cc9765ee76a3a553ca6911751124ae7164c))
* Semantic release not updating changelong ([`eaf6e90`](https://github.com/humbertogontijo/python-roborock/commit/eaf6e90264b6ab69549da0e5bc3d17c4c0a2c07c))

- Trigger release ([`f1ce0ed`](https://github.com/humbertogontijo/python-roborock/commit/f1ce0ed55a254bccd8567b48974ff74dd9ec8b25))
- Trigger release ([`9a4462c`](https://github.com/humbertogontijo/python-roborock/commit/9a4462c800762393cc047085156acbe119cd0fe4))
- Trigger release ([`b7a664b`](https://github.com/humbertogontijo/python-roborock/commit/b7a664b15b7c5180d816de325537693f47c24860))
- Trigger release ([`9256849`](https://github.com/humbertogontijo/python-roborock/commit/9256849252f019f4fea2f59384bc0ea7c57adb5c))
- Lowercase true ([`774c3cc`](https://github.com/humbertogontijo/python-roborock/commit/774c3cc9765ee76a3a553ca6911751124ae7164c))
- Semantic release not updating changelong ([`eaf6e90`](https://github.com/humbertogontijo/python-roborock/commit/eaf6e90264b6ab69549da0e5bc3d17c4c0a2c07c))
Loading

0 comments on commit 55e6426

Please sign in to comment.