boralyl / cookiecutter-homeassistant-component Goto Github PK
View Code? Open in Web Editor NEWA cookiecutter project template for generating the structure for a new custom component.
License: MIT License
A cookiecutter project template for generating the structure for a new custom component.
License: MIT License
I ran into an issue with pytest-homeassistant-custom-component
, MatthewFlamm/pytest-homeassistant-custom-component#198.
Would it be worthwhile to add -p syrupy
here?
This could be related to some recent updates, but I'm getting the following issues:
pip install -r requirements.test.txt --upgrade
because of ERROR: Cannot install -r requirements.test.txt (line 3) and pytest-cov==2.9.0 because these package versions have conflicting dependencies.
, seepytest-cov
is unpinned, install can proceed, but perhaps that leads to later issues.pytest
fails to test anything with the following output: /Users/wbyoung/Code/watersmart/venv/lib/python3.12/site-packages/_pytest/python.py:151: PytestUnhandledCoroutineWarning: async def functions are not natively supported and have been skipped.
You need to install a suitable plugin for your async framework, for example:
- anyio
- pytest-asyncio
- pytest-tornasync
- pytest-trio
- pytest-twisted
warnings.warn(PytestUnhandledCoroutineWarning(msg.format(nodeid)))
asyncio_mode = auto
is added to the [tool:pytest]
section of setup.cfg
, tests proceed, but the setup is never invoked and stderr
includes the following: ERROR:homeassistant.setup:Setup failed for 'watersmart': Integration not found.
.Any suggestions on how to proceed?
I tried to use pre-commit
but I get an error due to the flake8 team having deleted the gitlab mirror:
$ git commit -a
[INFO] Initializing environment for https://github.com/asottile/pyupgrade.
[INFO] Initializing environment for https://github.com/psf/black.
[INFO] Initializing environment for https://github.com/codespell-project/codespell.
[INFO] Initializing environment for https://gitlab.com/pycqa/flake8.
info: please complete authentication in your browser...
An unexpected error has occurred: CalledProcessError: command: ('/usr/lib/git-core/git', 'fetch', 'origin', '--tags')
return code: 128
stdout: (none)
stderr:
remote: The project you were looking for could not be found or you don't have permission to view it.
fatal: repository 'https://gitlab.com/pycqa/flake8.git/' not found
Check the log at /home/raf/.cache/pre-commit/pre-commit.log
I then tried to comment the flake8 package from the yaml but I get other errors that I do not understand:
[INFO] Installing environment for https://github.com/pre-commit/mirrors-mypy.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/home/raf/.cache/pre-commit/repotg0zhz3j/py_env-python3/bin/python', '-mpip', 'install', '.')
return code: 1
stdout:
Processing /home/raf/.cache/pre-commit/repotg0zhz3j
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Installing backend dependencies: started
Installing backend dependencies: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Collecting mypy==0.770 (from pre_commit_dummy_package==0.0.0)
Downloading mypy-0.770-py3-none-any.whl.metadata (1.4 kB)
Collecting typed-ast<1.5.0,>=1.4.0 (from mypy==0.770->pre_commit_dummy_package==0.0.0)
Downloading typed_ast-1.4.3.tar.gz (210 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 210.9/210.9 kB 5.3 MB/s eta 0:00:00
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Installing backend dependencies: started
Installing backend dependencies: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Collecting typing-extensions>=3.7.4 (from mypy==0.770->pre_commit_dummy_package==0.0.0)
Downloading typing_extensions-4.12.1-py3-none-any.whl.metadata (3.0 kB)
Collecting mypy-extensions<0.5.0,>=0.4.3 (from mypy==0.770->pre_commit_dummy_package==0.0.0)
Downloading mypy_extensions-0.4.4.tar.gz (4.2 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Installing backend dependencies: started
Installing backend dependencies: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Downloading mypy-0.770-py3-none-any.whl (1.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.9/1.9 MB 36.4 MB/s eta 0:00:00
Downloading typing_extensions-4.12.1-py3-none-any.whl (37 kB)
Building wheels for collected packages: pre_commit_dummy_package, mypy-extensions, typed-ast
Building wheel for pre_commit_dummy_package (pyproject.toml): started
Building wheel for pre_commit_dummy_package (pyproject.toml): finished with status 'done'
Created wheel for pre_commit_dummy_package: filename=pre_commit_dummy_package-0.0.0-py3-none-any.whl size=1120 sha256=5f2c803329dedc2761eccf5b64aad25a1de7c03664d400870b252fbc64173fce
Stored in directory: /tmp/pip-ephem-wheel-cache-44u4k88u/wheels/95/cf/3e/6b4c297218befed411473c464fd69465f95212e1efa66a9527
Building wheel for mypy-extensions (pyproject.toml): started
Building wheel for mypy-extensions (pyproject.toml): finished with status 'done'
Created wheel for mypy-extensions: filename=mypy_extensions-0.4.4-py2.py3-none-any.whl size=4471 sha256=fe3d5b27504f8f8c3bd038ea93147d4c1bedb02b8c279af75b210709f278338e
Stored in directory: /home/raf/.cache/pip/wheels/c8/8b/b5/4826a8f3859371d619b2b20d683910a65d271460f6807fd54f
Building wheel for typed-ast (pyproject.toml): started
Building wheel for typed-ast (pyproject.toml): finished with status 'error'
Successfully built pre_commit_dummy_package mypy-extensions
Failed to build typed-ast
stderr:
error: subprocess-exited-with-error
× Building wheel for typed-ast (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [26 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-312
creating build/lib.linux-x86_64-cpython-312/typed_ast
copying typed_ast/__init__.py -> build/lib.linux-x86_64-cpython-312/typed_ast
copying typed_ast/conversions.py -> build/lib.linux-x86_64-cpython-312/typed_ast
copying typed_ast/ast27.py -> build/lib.linux-x86_64-cpython-312/typed_ast
copying typed_ast/ast3.py -> build/lib.linux-x86_64-cpython-312/typed_ast
creating build/lib.linux-x86_64-cpython-312/typed_ast/tests
copying ast3/tests/test_basics.py -> build/lib.linux-x86_64-cpython-312/typed_ast/tests
running build_ext
building '_ast27' extension
creating build/temp.linux-x86_64-cpython-312
creating build/temp.linux-x86_64-cpython-312/ast27
creating build/temp.linux-x86_64-cpython-312/ast27/Custom
creating build/temp.linux-x86_64-cpython-312/ast27/Parser
creating build/temp.linux-x86_64-cpython-312/ast27/Python
x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -Iast27/Include -I/home/raf/.cache/pre-commit/repotg0zhz3j/py_env-python3/include -I/usr/include/python3.12 -c ast27/Custom/typed_ast.c -o build/temp.linux-x86_64-cpython-312/ast27/Custom/typed_ast.o
In file included from ast27/Custom/typed_ast.c:3:
ast27/Custom/../Include/compile.h:5:10: fatal error: code.h: No such file or directory
5 | #include "code.h"
| ^~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for typed-ast
ERROR: Could not build wheels for typed-ast, which is required to install pyproject.toml-based projects
Check the log at /home/raf/.cache/pre-commit/pre-commit.log
Please note that I just created the project from the cookiecutter template and didn´t change the created files.
The error message is in Norwegian, but it says the the process cannot access the file because it is used by another process.
`D:\Kladd\e>cookiecutter https://github.com/boralyl/cookiecutter-homeassistant-component
domain [my_component]: elprice
name [My Component]: ElPrice
docs_url [https://github.com/user/my_component/]:
owner [@user]: @stigvi
Select config_flow:
1 - yes
2 - no
Choose from 1, 2 [1]: 2
Select iot_class:
1 - Assumed State
2 - Cloud Polling
3 - Cloud Push
4 - Local Polling
5 - Local Push
Choose from 1, 2, 3, 4, 5 [1]: 1
Traceback (most recent call last):
File "C:\Users\STIGVI~1.HEI\AppData\Local\Temp\tmpz14vwgnu.py", line 6, in
os.rename(os.path.join("..", repo_dir), os.path.join("..", new_repo_dir))
PermissionError: [WinError 32] Prosessen får ikke tilgang til filen fordi den brukes av en annen prosess: '..\elprice' -> '..\elprice'
ERROR: Stopping generation because post_gen_project hook script didn't exit successfully
Hook script failed (exit status: 1)
D:\Kladd\e>`
I am getting the following error running cookiecutter in a windows environment after entering the final option in the wizard:
Choose from 1, 2 [1]:
Select iot_class:
1 - Assumed State
2 - Cloud Polling
3 - Cloud Push
4 - Local Polling
5 - Local Push
Choose from 1, 2, 3, 4, 5 [1]:
Traceback (most recent call last):
File "c:\users\j\appdata\local\temp\tmpqwx1ms.py", line 6, in
os.rename(os.path.join("..", repo_dir), os.path.join("..", new_repo_dir))
WindowsError: [Error 32] The process cannot access the file because it is being used by another process
ERROR: Stopping generation because post_gen_project hook script didn't exit successfully
Hook script failed (exit status: 1)
Hello, I could not find any other way of sending you a message so I will try here, is this tutorial still useable with all the changes from the last time the tutorial got updated? It says August 2, 2019
https://aarongodfrey.dev/home%20automation/creating-a-3d-floorplan-in-home-assistant/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.