Skip to content

Commit 929ab84

Browse files
committed
Merge branch 'dev'
2 parents 7bd2468 + dbe55d8 commit 929ab84

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+6831
-3201
lines changed

.github/workflows/build-deploy.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name: Build and deploy
66

77
on:
88
push:
9-
branches: ["**"]
9+
branches: ["dev"]
1010
tags: ["*"]
1111
pull_request:
1212
branches: ["dev"]
@@ -29,10 +29,10 @@ jobs:
2929
packages: write
3030
steps:
3131
- name: Checkout repository
32-
uses: actions/checkout@v4
32+
uses: actions/checkout@v5
3333
# https://github.com/actions/setup-python
3434
- name: Set up Python
35-
uses: actions/setup-python@v5
35+
uses: actions/setup-python@v6
3636
with:
3737
python-version: "3.12"
3838
cache: 'pip' # caching pip dependencies
@@ -71,10 +71,10 @@ jobs:
7171

7272
steps:
7373
- name: Checkout repository
74-
uses: actions/checkout@v4
74+
uses: actions/checkout@v5
7575
# https://github.com/actions/setup-python
7676
- name: Set up Python
77-
uses: actions/setup-python@v5
77+
uses: actions/setup-python@v6
7878
with:
7979
python-version: "3.12"
8080
cache: 'pip' # caching pip dependencies
@@ -109,9 +109,9 @@ jobs:
109109

110110
steps:
111111
- name: Checkout repository
112-
uses: actions/checkout@v4
112+
uses: actions/checkout@v5
113113
- name: Download Python package
114-
uses: actions/download-artifact@v4.3.0
114+
uses: actions/download-artifact@v5.0.0
115115
with:
116116
name: python-package
117117
path: dist/
@@ -121,15 +121,15 @@ jobs:
121121
# https://github.com/docker/login-action
122122
- name: Log into Docker Hub
123123
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags') || github.ref_name == 'dev') && github.repository == 'AppDaemon/appdaemon'
124-
uses: docker/login-action@v3.4.0
124+
uses: docker/login-action@v3.6.0
125125
with:
126126
username: ${{ secrets.DOCKERHUB_USERNAME }}
127127
password: ${{ secrets.DOCKERHUB_PASSWORD }}
128128
# Extract metadata (tags, labels) for Docker
129129
# https://github.com/docker/metadata-action
130130
- name: Extract Docker metadata
131131
id: meta
132-
uses: docker/metadata-action@v5.7.0
132+
uses: docker/metadata-action@v5.8.0
133133
with:
134134
images: ${{ env.IMAGE_NAME }}
135135
# Customize the generation of Docker `latest` tag

.github/workflows/codespell.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
steps:
2020
- name: Checkout
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v5
2222
- name: Annotate locations with typos
2323
uses: codespell-project/codespell-problem-matcher@v1
2424
- name: Codespell

.github/workflows/python-tests.yml

Lines changed: 48 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,42 +12,63 @@ jobs:
1212
lint:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v4
16-
# https://github.com/actions/setup-python
17-
- name: Set up Python
18-
uses: actions/setup-python@v5
15+
- uses: actions/checkout@v5
16+
- name: Install uv and set the python version
17+
id: setup-uv
18+
uses: astral-sh/setup-uv@v6
1919
with:
20-
python-version: '3.12'
21-
cache: 'pip' # caching pip dependencies
22-
# Manually set pyproject.toml as the file to use for dependencies
23-
# Workaround while waiting for https://github.com/actions/setup-python/issues/529
24-
cache-dependency-path: 'pyproject.toml'
25-
- name: Run pre-commit
26-
uses: pre-commit/action@v3.0.1
27-
- uses: pre-commit-ci/lite-action@v1.1.0
28-
if: always()
20+
version: "0.8.15" # It is considered best practice to pin to a specific uv version
21+
# https://github.com/astral-sh/setup-uv?tab=readme-ov-file#enable-caching
22+
enable-cache: true
23+
cache-dependency-glob: |
24+
**/*requirements*.txt
25+
**/pyproject.toml
26+
**/uv.lock
27+
28+
- name: Do something if the cache was restored
29+
if: steps.setup-uv.outputs.cache-hit == 'true'
30+
run: echo "Cache was restored"
31+
32+
- name: Install the project
33+
run: uv sync --all-extras --dev
34+
35+
- name: Run pre-commit hooks
36+
run: >
37+
uv run pre-commit
38+
run --all-files
39+
--show-diff-on-failure --color=always
2940
3041
test:
42+
needs: lint
3143
runs-on: ubuntu-latest
3244
strategy:
3345
fail-fast: false
3446
matrix:
3547
python-version: ["3.10", "3.11", "3.12"]
3648

3749
steps:
38-
- uses: actions/checkout@v4
39-
# https://github.com/actions/setup-python
40-
- name: Set up Python ${{ matrix.python-version }}
41-
uses: actions/setup-python@v5
50+
- uses: actions/checkout@v5
51+
- name: Install uv and set the python version
52+
id: setup-uv
53+
uses: astral-sh/setup-uv@v6
4254
with:
55+
# https://docs.astral.sh/uv/guides/integration/github/#multiple-python-versions
4356
python-version: ${{ matrix.python-version }}
44-
cache: 'pip' # caching pip dependencies
45-
# Manually set 'dev-requirements.txt' as the file to use for dependencies, since `requirements.txt` contains runtime dependencies.
46-
cache-dependency-path: 'dev-requirements.txt'
47-
- name: Install dependencies
48-
run: |
49-
python -m pip install --upgrade pip
50-
pip install -r dev-requirements.txt
51-
- name: Test with pytest
52-
run: |
53-
python -m pytest
57+
version: "0.8.15" # It is considered best practice to pin to a specific uv version
58+
# https://github.com/astral-sh/setup-uv?tab=readme-ov-file#enable-caching
59+
enable-cache: true
60+
cache-dependency-glob: |
61+
**/*requirements*.txt
62+
**/pyproject.toml
63+
**/uv.lock
64+
65+
- name: Do something if the cache was restored
66+
if: steps.setup-uv.outputs.cache-hit == 'true'
67+
run: echo "Cache was restored"
68+
69+
- name: Install the project
70+
run: uv sync --all-extras --dev
71+
72+
- name: Run tests
73+
# For example, using `pytest`
74+
run: uv run pytest -m ci

.github/workflows/stale-issues.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
name: question, wait-response
2424
runs-on: ubuntu-latest
2525
steps:
26-
- uses: actions/stale@v9
26+
- uses: actions/stale@v10
2727
with:
2828
stale-issue-message: 'This issue is stale because it has been open for 45 days with no activity. Remove stale label or comment or this will be closed in 15 days.'
2929
close-issue-message: 'Please feel free re-open this issue if you have new information available'
@@ -38,7 +38,7 @@ jobs:
3838
name: without label
3939
runs-on: ubuntu-latest
4040
steps:
41-
- uses: actions/stale@v9
41+
- uses: actions/stale@v10
4242
with:
4343
stale-issue-message: 'This issue is stale because it has been open for 6 months with no activity. Remove stale label or comment or this will be closed in 15 days.'
4444
close-issue-message: 'Please feel free re-open this issue if you have new information available'

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ __pycache__/
1010
.Python
1111
env/
1212
build/
13+
docker_build/
1314
docs_build/
1415
develop-eggs/
1516
dist/
@@ -65,6 +66,7 @@ target/
6566
venv
6667
.venv
6768
uv.lock
69+
*.ipynb
6870

6971
# Mac stuff
7072
.DS_Store

.vscode/settings.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"ruff.configuration": "pyproject.toml",
33
"notebook.defaultFormatter": "charliermarsh.ruff",
4-
"ruff.lineLength": 200
4+
"ruff.lineLength": 200,
5+
"python.analysis.typeCheckingMode": "basic",
6+
"python.testing.pytestArgs": [
7+
"-s",
8+
],
9+
"python.testing.unittestEnabled": false,
10+
"python.testing.pytestEnabled": true,
11+
"python.testing.autoTestDiscoverOnSavePattern": "tests/**/*.py",
512
}

0 commit comments

Comments
 (0)