Skip to content

Commit 1c453a7

Browse files
committed
revert back to using base image with setup-uv; added method to only add the packages required for the actions being taken via dependency groups, while maintaining default uv sync behavior
1 parent a4bed51 commit 1c453a7

File tree

4 files changed

+48
-35
lines changed

4 files changed

+48
-35
lines changed

.github/workflows/deploy_docs.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ jobs:
1212
deploy_docs:
1313
name: Deploy docs
1414
runs-on: ubuntu-latest
15-
container:
16-
image: ghcr.io/astral-sh/uv:latest
1715
steps:
1816
- name: Checkout repository
1917
uses: actions/checkout@v5
@@ -25,5 +23,9 @@ jobs:
2523
restore-keys: |
2624
mkdocs-material-
2725
26+
- name: Install uv
27+
uses: astral-sh/setup-uv@v7
28+
2829
- name: Deploy documentation
29-
run: uv run mkdocs gh-deploy --force
30+
run: |
31+
uv run --only-group docs mkdocs gh-deploy --force

.github/workflows/json_librarian.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,19 @@ on:
1313
jobs:
1414
librarian:
1515
runs-on: ubuntu-latest
16-
container:
17-
image: ghcr.io/astral-sh/uv:latest
1816
permissions:
1917
contents: write
2018
pull-requests: write
2119
steps:
2220
- name: Checkout repository
2321
uses: actions/checkout@v5
2422

23+
- name: Install uv
24+
uses: astral-sh/setup-uv@v7
25+
2526
- name: Update Library Files
2627
run: |
27-
uv run ${{ github.workspace }}/.github/scripts/library_doc/update_library_files.py
28+
uv run --only-group library .github/scripts/library_doc/update_library_files.py
2829
2930
- name: Commit any changes
3031
uses: stefanzweifel/git-auto-commit-action@v7

pyproject.toml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ classifiers = [
1616
"Programming Language :: Python :: 3",
1717
]
1818
requires-python = "==3.13.2"
19-
dependencies = ["homeassistant==2025.4.0"]
19+
dependencies = [] # Use dev for all dependencies
2020

2121
[project.urls]
2222
documentation = "https://github.com/andrew-codechimp/HA-Battery-Notes"
@@ -26,13 +26,21 @@ repository = "https://github.com/andrew-codechimp/HA-Battery-Notes"
2626
Changelog = "https://github.com/andrew-codechimp/HA-Battery-Notes/releases"
2727

2828
[dependency-groups]
29-
dev = [
29+
dev = [
3030
"colorlog",
31+
"homeassistant==2025.4.0",
32+
"ruff",
33+
]
34+
35+
docs = [
3136
"mkdocs-material",
37+
]
38+
library = [
3239
"pytablewriter==0.61.0",
33-
"ruff",
3440
]
3541

42+
[tool.uv]
43+
default-groups = ["dev"]
3644
[tool.ruff]
3745
target-version = "py313"
3846
src = ["custom_components/battery_notes"]

uv.lock

Lines changed: 28 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)