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

Update dependencies #568

Merged
merged 2 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions .github/actions/install-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,16 @@ inputs:
runs:
using: "composite"
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}

- name: Install uv
uses: yezz123/setup-uv@v4

- name: Cache project dependencies
uses: actions/cache@v4
uses: astral-sh/setup-uv@v3
with:
path: ./.venv
key: deps-${{ runner.os }}-${{ inputs.python-version }}-${{ hashFiles('uv.lock') }}
restore-keys: |
deps-${{ runner.os }}-${{ inputs.python-version }}-
enable-cache: true

- name: Set up Python ${{ inputs.python-version }}
shell: bash
run: |
uv python install ${{ inputs.python-version }}
echo "PYTHON_VERSION=$(uv run python -c 'import platform; print(platform.python_version())')" >> "$GITHUB_ENV"

- name: Install dependencies with uv
shell: bash
Expand Down
3 changes: 3 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ updates:
interval: daily
labels:
- "dependencies"
ignore:
- dependency-name: "crazy-max/ghaction-github-labeler"
versions: ["5.1.0"]
4 changes: 4 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
#
# The repository labels will be automatically configured using this file and
# the GitHub Action https://github.com/marketplace/actions/github-labeler.
- name: automerge
description: Automatically merge by Kodiak
color: d4c5f9

- name: bug
description: Something isn't working
color: d73a4a
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linting-and-testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:

- name: Run pre-commit on all files
run: |
uv run pre-commit run --all-files --show-diff-on-failure --color=always
uvx pre-commit run --all-files --show-diff-on-failure --color=always

- name: Run python-typing-update
run: |
uv run pre-commit run --hook-stage manual python-typing-update --all-files --show-diff-on-failure --color=always
uvx pre-commit run --hook-stage manual python-typing-update --all-files --show-diff-on-failure --color=always
2 changes: 1 addition & 1 deletion .github/workflows/manage-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
uses: actions/checkout@v4

- name: Run Labeler
uses: crazy-max/ghaction-github-labeler@v5.1.0
uses: crazy-max/ghaction-github-labeler@v5.0.0
10 changes: 6 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Publish to PyPI

concurrency: release

on:
release:
types: [published]
Expand All @@ -8,6 +10,9 @@ jobs:
publish:
name: Publish
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- name: Check out the repository
uses: actions/checkout@v4
Expand All @@ -19,7 +24,4 @@ jobs:
run: uv build

- name: Publish to PyPI
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: uvx twine upload --non-interactive --disable-progress-bar --skip-existing dist/*
run: uv publish
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand Down Expand Up @@ -51,7 +51,7 @@ repos:
hooks:
- id: prettier
- repo: https://github.com/cdce8p/python-typing-update
rev: v0.5.1
rev: v0.7.0
hooks:
# Run `python-typing-update` hook manually from time to time
# to update python typing syntax.
Expand Down
37 changes: 19 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Software Development",
Expand All @@ -26,35 +27,34 @@ keywords = [
requires-python = ">=3.9"
dynamic = ["version"]
dependencies = [
"ghome-foyer-api>=1.0.0",
"ghome-foyer-api>=1.1.1",
"gpsoauth>=1.1.1",
"simplejson>=3.19.3",
# Note, we want to keep versions of grpcio, requests and zeroconf similar to Home Assistant
# https://github.com/home-assistant/core/blob/2024.9.0/homeassistant/package_constraints.txt
"grpcio>=1.59.0",
# https://github.com/home-assistant/core/blob/2024.11.0/homeassistant/package_constraints.txt
"grpcio>=1.66.0",
"requests>=2.32.3",
"zeroconf>=0.133.0",
"zeroconf>=0.136.0",
]

[project.urls]
"Homepage" = "https://github.com/leikoilja/glocaltokens"
"Bug Tracker" = "https://github.com/leikoilja/glocaltokens/issues"
"Release Notes" = "https://github.com/leikoilja/glocaltokens/releases"

[tool.uv]
dev-dependencies = [
[dependency-groups]
dev = [
"codespell>=2.3.0",
"faker>=20.1.0",
"faker>=30.8.2",
"grpc-stubs>=1.53.0.5",
"mock>=5.1.0",
"mypy>=1.11.0",
"pre-commit>=3.8.0",
"pylint>=3.2.7",
"pytest>=7.4.4",
"ruff>=0.6.4",
"types-protobuf>=4.25.0.20240417",
"mypy>=1.13.0",
"pylint>=3.3.1",
"pytest>=8.3.3",
"ruff>=0.7.2",
"types-protobuf>=5.28.0",
]

[project.urls]
"Homepage" = "https://github.com/leikoilja/glocaltokens"
"Bug Tracker" = "https://github.com/leikoilja/glocaltokens/issues"
"Release Notes" = "https://github.com/leikoilja/glocaltokens/releases"

[tool.hatch.version]
source = "vcs"

Expand Down Expand Up @@ -207,6 +207,7 @@ disable = [
"too-many-arguments",
"too-many-instance-attributes",
"too-many-locals",
"too-many-positional-arguments",
"consider-using-namedtuple-or-dataclass",
"consider-using-assignment-expr",
]
Expand Down
Loading