Skip to content

Commit

Permalink
Allow running in codespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
golles committed Mar 17, 2024
1 parent f4ba952 commit 2baa42d
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 13 deletions.
6 changes: 6 additions & 0 deletions .devcontainer/configuration.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
default_config:

http:
use_x_forwarded_for: true
trusted_proxies:
- 127.0.0.1
- ::1

logger:
default: info
logs:
Expand Down
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"files.eol": "\n",
"editor.tabSize": 4,
"python.analysis.autoSearchPaths": false,
"python.experiments.optOutFrom": ["pythonTestAdapter"],
"python.formatting.provider": "black",
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
"editor.formatOnPaste": false,
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Check code formatting with isort
uses: isort/isort-action@master
with:
requirementsFiles: "requirements.txt requirements_test.txt"
requirementsFiles: "requirements.txt requirements_dev.txt"

tests:
runs-on: ubuntu-latest
Expand All @@ -49,7 +49,7 @@ jobs:
- name: Install requirements
run: |
python3 -m pip install -r requirements.txt
python3 -m pip install -r requirements_test.txt
python3 -m pip install -r requirements_dev.txt
- name: Run tests
run: |
Expand Down
5 changes: 1 addition & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
pip>=21.0,<24.1
colorlog
isort
homeassistant
homeassistant>=2023.6.0
pyserial==3.5
5 changes: 5 additions & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-r requirements.txt
pip>=21.0,<24.1
colorlog
isort
pytest-homeassistant-custom-component
1 change: 0 additions & 1 deletion requirements_test.txt

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/setup
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -e

cd "$(dirname "$0")/.."

python3 -m pip install --requirement requirements.txt
python3 -m pip install --requirement requirements_dev.txt
7 changes: 2 additions & 5 deletions scripts/update
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ set -e

cd "$(dirname "$0")/.."

python3 -m pip install --upgrade --force-reinstall --requirement requirements.txt
sudo apt update && sudo apt -y upgrade

if python -c "import pytest_homeassistant_custom_component" &> /dev/null; then
# User also has test requirements, update those as well.
python3 -m pip install --upgrade --force-reinstall --requirement requirements_test.txt
fi
python3 -m pip install --upgrade --force-reinstall --requirement requirements_dev.txt

0 comments on commit 2baa42d

Please sign in to comment.