Skip to content

Commit

Permalink
Merge pull request #253 from webdjoe/bump-docs
Browse files Browse the repository at this point in the history
Documentation and Linter
  • Loading branch information
webdjoe authored Oct 20, 2024
2 parents ad0211c + 371adb1 commit 2a9b7a0
Show file tree
Hide file tree
Showing 13 changed files with 1,458 additions and 602 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,10 @@ test.py
tools/__init__.py
tools/vesyncdevice.py
pyvesync.und
.venv
.venv


mkdocs.yml
requirements-docs.txt
docs/
site/
10 changes: 9 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
[MASTER]
ignore=src/tests,
tools/
docs/
site/

load-plugins=
pylint.extensions.docparams,
pylint.extensions.mccabe

[BASIC]
good-names=i,j,k,x,r,e,v,_,b,dt,d
Expand All @@ -26,6 +32,7 @@ disable=
format,
abstract-method,
arguments-differ,
broad-exception-caught, # FIXME
cyclic-import,
duplicate-code,
global-statement,
Expand All @@ -43,11 +50,12 @@ disable=
too-many-public-methods,
too-many-return-statements,
too-many-statements,
too-complex, # FIXME
wildcard-import,
unused-wildcard-import,
unnecessary-pass,
unused-argument,
useless-super-delegation
useless-super-delegation,

[REPORTS]
#reports=no
Expand Down
28 changes: 22 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,12 @@ Install the latest version from pip:
pip install pyvesync
```

<!--SUPPORTED DEVICES START-->

## Supported Devices

<!--SUPPORTED OUTLETS START-->

### Etekcity Outlets

1. Voltson Smart WiFi Outlet- Round (7A model ESW01-USA)
Expand All @@ -80,11 +84,17 @@ pip install pyvesync
4. Voltson Smart WiFi Outlet - Rectangle (15A model ESW15-USA)
5. Two Plug Outdoor Outlet (ESO15-TB) (Each plug is a separate `VeSyncOutlet` object, energy readings are for both plugs combined)

<!--SUPPORTED OUTLETS END-->

<!--SUPPORTED SWITCHES START-->

### Wall Switches

1. Etekcity Smart WiFi Light Switch (model ESWL01)
2. Etekcity Wifi Dimmer Switch (ESD16)

<!--SUPPORTED SWITCHES END-->

### Levoit Air Purifiers

1. LV-PUR131S
Expand All @@ -103,21 +113,27 @@ pip install pyvesync

### Valceno Bulbs

1. Multicolor Bulb (XYD0001)
1. Valceno Multicolor Bulb (XYD0001)

### Levoit Humidifiers

1. Dual 200S
2. Classic 300S
4. LV600S
7. OasisMist 450S
7. OasisMist 600S
8. OasisMist 1000S
3. LV600S
4. OasisMist 450S
5. OasisMist 600S
6. OasisMist 1000S

Cosori Air Fryer
### Cosori Air Fryer

1. Cosori 3.7 and 5.8 Quart Air Fryer

### Fans

1. 42 in. Tower Fan

<!--SUPPORTED DEVICES END-->

## Usage

To start with the module:
Expand Down
2 changes: 1 addition & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[mypy]
python_version=3.8
python_version=3.9

[mypy-src.pyvesync.vesyncfan.fan_modules]
ignore_missing_imports = True
Expand Down
74 changes: 74 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
"test",
"tests",
]

line-length = 90
indent-width = 4

[lint]
select = ["ALL"]
ignore = ["T201", # PRINT statement - IGNORE
"COM812", # Missing trailing comma - IGNORE
"TRY003", # Avoid specifying long messages outside the exception class - TODO: Add exception classes
"TRY301", # raise within try - TODO: Fix this
"BLE001", # Broad Exceptions are not allowed - TODO: Fix this
"EM102", # Exception must not use an f-string literal, assign to variable first - TODO: add exception classes
"I001", # Import sort - TODO: Fix this
"EM101", # Exception must not use a string literal, assign to variable first - TODO: add exception classes
"FBT001", # type hint positional argument - bool is not allowed - IGNORE
"FBT003", # Bool positional argument - IGNORE
"TD002", # Todo error - IGNORE
"TD003", # Todo error - IGNORE
"FIX002", # Fixme error - IGNORE
]
# Todo: Add exception classes EM102, BLE001, EM101
# Todo: Fix import sorting issue I001
unfixable = ["B"]

[lint.per-file-ignores]
"vesync.py" = ["F403"]
"vesyncbulb.py" = ["PLR2004"]

[lint.pep8-naming]
extend-ignore-names = ["displayJSON"]

[lint.pydocstyle]
convention = "google"

[lint.pylint]
max-public-methods = 30
max-args = 6

[format]
quote-style = "preserve"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "lf"

1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ log_cli = True

[flake8]
max-line-length = 90
extend-ignore = D102

[pycodestyle]
max-line-length = 90
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name='pyvesync',
version='2.1.12',
version='2.1.13',
description='pyvesync is a library to manage Etekcity\
Devices, Cosori Air Fryers and Levoit Air \
Purifiers run on the VeSync app.',
Expand Down
Loading

0 comments on commit 2a9b7a0

Please sign in to comment.