Skip to content

Commit 8de7973

Browse files
committed
Basic setup
1 parent d88882a commit 8de7973

File tree

9 files changed

+616
-29
lines changed

9 files changed

+616
-29
lines changed

.gitignore

Lines changed: 122 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,125 @@
1-
__pycache__
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# OSX useful to ignore
7+
*.DS_Store
8+
.AppleDouble
9+
.LSOverride
10+
11+
# Thumbnails
12+
._*
13+
14+
# Files that might appear in the root of a volume
15+
.DocumentRevisions-V100
16+
.fseventsd
17+
.Spotlight-V100
18+
.TemporaryItems
19+
.Trashes
20+
.VolumeIcon.icns
21+
.com.apple.timemachine.donotpresent
22+
23+
# Directories potentially created on remote AFP share
24+
.AppleDB
25+
.AppleDesktop
26+
Network Trash Folder
27+
Temporary Items
28+
.apdisk
29+
30+
# C extensions
31+
*.so
32+
33+
# Distribution / packaging
34+
.Python
35+
env/
236
build/
37+
develop-eggs/
338
dist/
4-
pymelcloud.egg-info/
5-
.idea
6-
.vscode
7-
.tox
39+
downloads/
40+
eggs/
41+
.eggs/
42+
lib/
43+
lib64/
44+
parts/
45+
sdist/
46+
var/
47+
*.egg-info/
48+
.installed.cfg
49+
*.egg
50+
51+
# PyInstaller
52+
# Usually these files are written by a python script from a template
53+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
54+
*.manifest
55+
*.spec
56+
57+
# Installer logs
58+
pip-log.txt
59+
pip-delete-this-directory.txt
60+
61+
# Unit test / coverage reports
62+
htmlcov/
63+
.tox/
864
.coverage
9-
.mypy_cache
10-
venv
65+
.coverage.*
66+
.cache
67+
nosetests.xml
68+
coverage.xml
69+
*,cover
70+
.hypothesis/
71+
.pytest_cache/
72+
73+
# Translations
74+
*.mo
75+
*.pot
76+
77+
# Django stuff:
78+
*.log
79+
80+
# Sphinx documentation
81+
docs/_build/
82+
83+
# pyenv
84+
.python-version
85+
86+
# virtualenv
87+
.venv
88+
venv/
89+
ENV/
90+
91+
# mypy
92+
.mypy_cache/
93+
94+
# ruff
95+
.ruff_cache
96+
97+
# Visual Studio Code
98+
.vscode
99+
100+
# IntelliJ Idea family of suites
101+
.idea
102+
*.iml
103+
104+
## File-based project format:
105+
*.ipr
106+
*.iws
107+
108+
## mpeltonen/sbt-idea plugin
109+
.idea_modules/
110+
111+
# PyBuilder
112+
target/
113+
114+
# Cookiecutter
115+
output/
116+
python_boilerplate/
117+
118+
# Node
119+
node_modules/
120+
121+
# Deepcode AI
122+
.dccache
123+
124+
# Example dev
125+
examples/example_dev.py

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20.11.1

.pre-commit-config.yaml

Lines changed: 126 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,127 @@
1+
---
12
repos:
2-
- repo: https://github.com/ambv/black
3-
rev: stable
4-
hooks:
5-
- id: black
6-
language_version: python3
7-
8-
- repo: https://github.com/pre-commit/pre-commit-hooks
9-
rev: v2.3.0
10-
hooks:
11-
- id: flake8
12-
additional_dependencies: [flake8-docstrings]
13-
14-
- repo: https://github.com/pre-commit/mirrors-isort
15-
rev: v4.3.21
16-
hooks:
17-
- id: isort
3+
- repo: local
4+
hooks:
5+
- id: ruff-check
6+
name: 🐶 Ruff Linter
7+
language: system
8+
types: [python]
9+
entry: poetry run ruff check --fix
10+
require_serial: true
11+
stages: [commit, push, manual]
12+
- id: ruff-format
13+
name: 🐶 Ruff Formatter
14+
language: system
15+
types: [python]
16+
entry: poetry run ruff format
17+
require_serial: true
18+
stages: [commit, push, manual]
19+
- id: check-ast
20+
name: 🐍 Check Python AST
21+
language: system
22+
types: [python]
23+
entry: poetry run check-ast
24+
- id: check-case-conflict
25+
name: 🔠 Check for case conflicts
26+
language: system
27+
entry: poetry run check-case-conflict
28+
- id: check-docstring-first
29+
name: ℹ️ Check docstring is first
30+
language: system
31+
types: [python]
32+
entry: poetry run check-docstring-first
33+
- id: check-executables-have-shebangs
34+
name: 🧐 Check that executables have shebangs
35+
language: system
36+
types: [text, executable]
37+
entry: poetry run check-executables-have-shebangs
38+
stages: [commit, push, manual]
39+
- id: check-json
40+
name: { Check JSON files
41+
language: system
42+
types: [json]
43+
entry: poetry run check-json
44+
- id: check-merge-conflict
45+
name: 💥 Check for merge conflicts
46+
language: system
47+
types: [text]
48+
entry: poetry run check-merge-conflict
49+
- id: check-symlinks
50+
name: 🔗 Check for broken symlinks
51+
language: system
52+
types: [symlink]
53+
entry: poetry run check-symlinks
54+
- id: check-toml
55+
name: ✅ Check TOML files
56+
language: system
57+
types: [toml]
58+
entry: poetry run check-toml
59+
- id: check-xml
60+
name: ✅ Check XML files
61+
entry: check-xml
62+
language: system
63+
types: [xml]
64+
- id: check-yaml
65+
name: ✅ Check YAML files
66+
language: system
67+
types: [yaml]
68+
entry: poetry run check-yaml
69+
- id: detect-private-key
70+
name: 🕵️ Detect Private Keys
71+
language: system
72+
types: [text]
73+
entry: poetry run detect-private-key
74+
- id: end-of-file-fixer
75+
name: ⮐ Fix End of Files
76+
language: system
77+
types: [text]
78+
entry: poetry run end-of-file-fixer
79+
stages: [commit, push, manual]
80+
- id: mypy
81+
name: 🆎 Static type checking using mypy
82+
language: system
83+
types: [python]
84+
entry: poetry run mypy
85+
require_serial: true
86+
- id: no-commit-to-branch
87+
name: 🛑 Don't commit to main branch
88+
language: system
89+
entry: poetry run no-commit-to-branch
90+
pass_filenames: false
91+
always_run: true
92+
args:
93+
- --branch=main
94+
- id: poetry
95+
name: 📜 Check pyproject with Poetry
96+
language: system
97+
entry: poetry check
98+
pass_filenames: false
99+
always_run: true
100+
- id: prettier
101+
name: 💄 Ensuring files are prettier
102+
language: system
103+
types: [yaml, json, markdown]
104+
entry: npm run prettier
105+
pass_filenames: false
106+
- id: pylint
107+
name: 🌟 Starring code with pylint
108+
language: system
109+
types: [python]
110+
entry: poetry run pylint
111+
- id: pytest
112+
name: 🧪 Running tests and test coverage with pytest
113+
language: system
114+
types: [python]
115+
entry: poetry run pytest
116+
pass_filenames: false
117+
- id: trailing-whitespace
118+
name: ✄ Trim Trailing Whitespace
119+
language: system
120+
types: [text]
121+
entry: poetry run trailing-whitespace-fixer
122+
stages: [commit, push, manual]
123+
- id: yamllint
124+
name: 🎗 Check YAML files with yamllint
125+
language: system
126+
types: [yaml]
127+
entry: poetry run yamllint

0 commit comments

Comments
 (0)