Skip to content

Commit

Permalink
Update documentation with regards to DISPLAY setting and debug target
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeweerd committed Sep 5, 2023
1 parent 907805e commit a0265b6
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 22 deletions.
44 changes: 24 additions & 20 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,22 @@
files: ^(.*\.(py|json|md|sh|yaml|yml|cfg|txt))$
exclude: ^(\.[^/]*cache/.*|demo/.*|debug/.*)$
repos:
# Disable because this does not work for the main author.
# - repo: https://github.com/pre-commit/mirrors-prettier
# rev: "v2.7.1"
# stages: [manual]
# hooks:
# - id: prettier
- repo: https://github.com/executablebooks/mdformat
# Do this before other tools "fixing" the line endings
rev: 0.7.16
rev: 0.7.17
hooks:
- id: mdformat
name: Format Markdown
entry: mdformat # Executable to run, with fixed options
entry: mdformat # Executable to run, with fixed options
language: python
types: [markdown]
args: [--wrap, '75', --number]
args: [--wrap, "75", --number]
# files: ^HomeAssistant.md$
additional_dependencies:
- mdformat-toc
Expand Down Expand Up @@ -43,21 +49,20 @@ repos:
args:
# order of keys in manifest.json is "special"
- --no-sort-keys
# - id: check-toml
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.29.0
rev: v1.32.0
hooks:
- id: yamllint
args:
- --no-warnings
- -d
- '{extends: relaxed, rules: {line-length: {max: 90}}}'
- "{extends: relaxed, rules: {line-length: {max: 90}}}"
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
rev: v3.10.1
hooks:
- id: pyupgrade
- repo: https://github.com/psf/black
rev: 23.1.0
rev: 23.7.0
hooks:
- id: black
args:
Expand All @@ -68,10 +73,9 @@ repos:
rev: v1.0.6
hooks:
- id: python-bandit-vulnerability-check
args: [--skip, 'B105,B110,B311,B404,B603', --recursive, apps]

args: [--skip, "B105,B110,B311,B404,B603", --recursive, apps]
- repo: https://github.com/fsouza/autoflake8
rev: v0.4.0
rev: v0.4.1
hooks:
- id: autoflake8
args:
Expand All @@ -80,7 +84,7 @@ repos:
- --expand-star-imports
- .
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies:
Expand All @@ -96,23 +100,23 @@ repos:
hooks:
- id: isort
- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
rev: v2.2.5
hooks:
- id: codespell
exclude: (\.md|apps.yaml)$
exclude: (\.md|apps.yaml|translations/.*.yaml)$
- repo: https://github.com/pre-commit/mirrors-pylint
rev: v3.0.0a5
hooks:
- id: pylint
# exclude: ^$
additional_dependencies:
- hassapi
- pyflakes
- paho-mqtt
- hassapi
- pyflakes
- paho-mqtt
args:
- --reports=no
#exclude: ^$
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.0.0
rev: v1.5.1
hooks:
- id: mypy
args:
Expand All @@ -125,6 +129,6 @@ repos:
additional_dependencies:
- paho-mqtt
- repo: https://github.com/IamTheFij/docker-pre-commit
rev: v2.1.1
rev: v3.0.1
hooks:
- id: docker-compose-check
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ de jouer.
- [Paramétrer votre système pour le mode débogue (optionnel, mais recommandé)](#param%C3%A9trer-votre-syst%C3%A8me-pour-le-mode-d%C3%A9bogue-optionnel-mais-recommand%C3%A9)
- [Principe de fonctionnement](#principe-de-fonctionnement)
- [Environnements testés:](#environnements-test%C3%A9s)
- [Cas de figure:](#cas-de-figure)
- [Remerciements/Contributeurs](#remerciementscontributeurs)

<!-- mdformat-toc end -->
Expand Down Expand Up @@ -709,8 +710,18 @@ docker compose run --rm meters-to-ha-grdf
Ou en mode débogue (nécessite un serveur X local):

```shell
docker compose run --rm meters-to-ha-veolia-debug
docker compose run --rm meters-to-ha-grdf-debug
docker compose run --rm meters-to-ha-debug-veolia
docker compose run --rm meters-to-ha-debug-grdf
```

Docker a parfois
[un bogue (?)](https://github.com/docker/for-win/issues/13398) concernant
`host.docker.internal` utilisé comme adresse pour le hôte sur lequel tourne
docker. Dans ce cas, vous pouvez fournir la configuration DISPLAY avec l'IP
de votre PC directement avec `-eDISPLAY=`:

```shell
docker compose run -eDISPLAY=10.33.2.69:0.0 --rm meters-to-ha-debug-grdf
```

L'automatisation de l'exécution avec Docker dépendre de votre système - le
Expand Down Expand Up @@ -1070,6 +1081,14 @@ Anciens (plus testés avec les versions récentes):

A noter qu'Ubuntu supporte probablement aussi la solution avec Chromium.

## Cas de figure:

- #9 NoSuchElementException pour `find_element(By.TAG_NAME, "pre")`. Le
processus pense avoir attînt l'étape du résultat.
- Vérifiez que la résulution du captcha se fait correctement. Cette
erreur a été constaté lorsque cet autre message apparaissait:
`capmonster status 402{"errorId":1,"errorCode":"ERROR_ZERO_BALANCE","errorDescription":"Account has zero balance"}`

## Remerciements/Contributeurs

- [s0nik42](https://github.com/s0nik42)
Expand Down

0 comments on commit a0265b6

Please sign in to comment.