Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building integrations - command fails without first installing requirements #2430

Open
chelming opened this issue Oct 29, 2024 · 4 comments
Open

Comments

@chelming
Copy link

chelming commented Oct 29, 2024

When following the Building Integrations guide in VSC dev container, when running python3 -m script.scaffold integration and following the prompt, script.hassfest will run following the completion. If you don't first install the requirements, script.hassfest will fail with
script.hassfest ModuleNotFoundError: No module named 'numpy'

I'm guessing there should be instructions for running pip install -r requirements_all.txt (or one of the other requirements files. I'm not familiar enough to say which is appropriate.

Alright, so it's time to write your first code for your integration. AWESOME. Don't worry, we've tried hard to keep it as easy as possible. From a Home Assistant development environment, type the following and follow the instructions:
```shell
python3 -m script.scaffold integration
```

@allenporter
Copy link
Contributor

My impression is that this is handled if you follow the steps in *Development Workflow > Set up development environment

@allenporter
Copy link
Contributor

allenporter commented Oct 30, 2024

You mentioned using the devcontainer... so if the devcontainer is not properly being setup right then i think any fixes need to be part of the devcontainer setup to handles this up front? or updating the devcontainer docmentation under "Set up development environment" and not specific to the building integration step

@chelming
Copy link
Author

Good call! I didn't think of the other build types and that it might happen in one of the other build setups. Instead of a docs issue is this potentially a core/dev container issue?

@allenporter
Copy link
Contributor

Perhaps? My assumption is that the devcontainer should be doing this but this is not something i am an expert in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants