Skip to content

Commit

Permalink
PR #38
Browse files Browse the repository at this point in the history
v0.2.2 - Optimisations for frontend, bug fixes throughout, better error handling
  • Loading branch information
WaresWichall authored Dec 1, 2024
2 parents 1ac0575 + 677760f commit 7512a3f
Show file tree
Hide file tree
Showing 86 changed files with 16,221 additions and 11,111 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/lint_and_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,29 @@ jobs:
uses: isort/isort-action@v1
with:
configuration: "--settings-path=pyproject.toml"
- name: Check translation diff
run: |
python custom_components/anycubic_cloud/scripts/build_translations.py
git diff --exit-code
lint-ts:
runs-on: ubuntu-latest
name: "Lint & Build: Typescript"
steps:
- name: Check out source repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
cache-dependency-path: custom_components/anycubic_cloud/frontend_panel/package-lock.json
- name: Install dependencies
run: npm ci
working-directory: custom_components/anycubic_cloud/frontend_panel
- name: Run lint
run: npm run lint
working-directory: custom_components/anycubic_cloud/frontend_panel
- name: Build and check diff
run: |
npm run build && npm run build_card
git diff --exit-code
working-directory: custom_components/anycubic_cloud/frontend_panel
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.DS_Store
__pycache__
custom_components/anycubic_cloud/frontend_panel/node_modules/
custom_components/anycubic_cloud/frontend_panel/package-lock.json
custom_components/anycubic_cloud/scripts/*.cache
custom_components/anycubic_cloud/scripts/*.json
custom_components/anycubic_cloud/scripts/*.token
Expand Down
66 changes: 40 additions & 26 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,37 +1,51 @@
repos:
- repo: https://github.com/pre-commit/mirrors-autopep8
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v2.0.4
hooks:
- id: autopep8
args:
- "--global-config"
- ".flake8"
types: ['file']
files: \.(py|pyx|pxd)$
- repo: https://github.com/pre-commit/pre-commit-hooks
- id: autopep8
args:
- "--global-config"
- ".flake8"
types: ['file']
files: \.(py|pyx|pxd)$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: flake8
types: ['file']
files: \.(py|pyx|pxd)$
- repo: https://github.com/pre-commit/mirrors-mypy
- id: flake8
types: ['file']
files: \.(py|pyx|pxd)$
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.11.2'
hooks:
- id: mypy
exclude: ^custom_components/anycubic_cloud/test_api/
files: custom_components/
args:
- "--strict"
- "--config-file=mypy.ini"
additional_dependencies:
- "homeassistant==2024.9.3"
- "pydantic==2.9.2"
- "aiofiles==24.1.0"
- "types-aiofiles==24.1.0.20240626"
- "types-paho-mqtt==1.6.0.20240321"
- repo: https://github.com/pycqa/isort
- id: mypy
exclude: ^custom_components/anycubic_cloud/test_api/
files: custom_components/
args:
- "--strict"
- "--config-file=mypy.ini"
additional_dependencies:
- "homeassistant==2024.9.3"
- "pydantic==2.9.2"
- "aiofiles==24.1.0"
- "types-aiofiles==24.1.0.20240626"
- "types-paho-mqtt==1.6.0.20240321"
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
files: "\\.(py)$"
args: [--settings-path=pyproject.toml]
args: [--settings-path=pyproject.toml]
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.56.0
hooks:
- id: eslint
always_run: true
pass_filenames: false
files: \.(ts|js)$
args:
- "--fix"
- "custom_components/anycubic_cloud/frontend_panel/src"
- "-c"
- "custom_components/anycubic_cloud/frontend_panel/.eslintrc.js"
- "--ignore-pattern"
- "custom_components/anycubic_cloud/frontend_panel/src/lib"
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
>
> MQTT access is now available using Slicer Next (windows version) tokens.
>
> Still works as of 09/11/2024.
> Still works as of 01/12/2024.
---

Expand All @@ -14,6 +14,8 @@
Component is working very well so far with:
- Kobra 3 Combo
- Kobra 2
- Kobra 2 Max
- Kobra 2 Pro
- Photon Mono M5s (Basic support still)
- M7 Pro (Basic support still)

Expand Down
1 change: 1 addition & 0 deletions Version
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ Version: 0.1.2 20240919 - Fix user token validation
Version: 0.1.3 20240925 - Fix user token validation again
Version: 0.2.0 20241023 - Various improvements to integration + card
Version: 0.2.1 20241108 - Various improvements to authentication + config
Version: 0.2.2 20241201 - Optimisations for frontend, bug fixes throughout, better error handling
Loading

0 comments on commit 7512a3f

Please sign in to comment.