Skip to content

Commit

Permalink
chore: switch from pdm to rye
Browse files Browse the repository at this point in the history
  • Loading branch information
jason0x43 committed Mar 2, 2024
1 parent c229ed4 commit 3cf7f0f
Show file tree
Hide file tree
Showing 6 changed files with 172 additions and 1,104 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.vim/
.venv/
*.pyc
*.egg-info
__pypackages__
.pdm.toml
.pdm-python
12 changes: 0 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
repos:
- repo: local
hooks:
- id: black
name: black
entry: pdm run black
args:
- --safe
- --quiet
language: system
types: [python]
require_serial: true
files: ^(custom_components|tests|stubs)/.+\.pyi?$
- repo: local
hooks:
- id: ruff
Expand Down
1,071 changes: 0 additions & 1,071 deletions pdm.lock

This file was deleted.

34 changes: 13 additions & 21 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,31 @@
name = "hubitat"
version = "0.9.22"
description = "A Hubitat integration for Home Assistant"
authors = [
{name = "Jason Cheatham", email = "[email protected]"},
]
authors = [{ name = "Jason Cheatham", email = "[email protected]" }]
dependencies = []
requires-python = ">=3.11,<3.13"
license = {text = "MIT"}
license = { text = "MIT" }

[project.urls]
homepage = "https://github.com/jason0x43/hacs-hubitat"

[project.optional-dependencies]
[tool.pdm.scripts]
init = {shell = "pdm install && pre-commit install"}
test = {shell = "pyright custom_components/hubitat && pytest tests"}
pub = {shell = "python scripts/publish.py"}

[tool.rye.scripts]
test-lint = "pyright custom_components/hubitat"
test-test = "pytest tests"
test = { chain = ["test-lint", "test-test"] }
pub = "python scripts/publish.py"

[tool.pytest.ini_options]
testpaths = ["tests"]
filterwarnings = [
"ignore::DeprecationWarning:pkg_resources",
"ignore:Inheritance class HomeAssistantApplication:DeprecationWarning"
"ignore:Inheritance class HomeAssistantApplication:DeprecationWarning",
]

[tool.pdm.dev-dependencies]
dev = [
"black>=21.12b0",
[tool.rye]
dev-dependencies = [
"ruff",
"pre-commit<3.0.0,>=2.4.0",
"homeassistant==2023.12.4",
Expand All @@ -36,13 +35,6 @@ dev = [
"tomlkit>=0.12.3",
]

[tool.black]
line-length = 88

[build-system]
requires = ["pdm-pep517"]
build-backend = "pdm.pep517.api"

[tool.pyright]
include = ["custom_components/hubitat"]
exclude = ["**/__pycache__"]
Expand All @@ -58,10 +50,10 @@ reportUnusedFunction = true
reportUnusedImport = true
reportUnusedVariable = true

[tool.ruff]
[tool.ruff.lint]
select = ["E", "W", "F", "PYI", "I"]

[tool.ruff.isort]
[tool.ruff.lint.isort]
combine-as-imports = true
order-by-type = true
force-wrap-aliases = true
Expand Down
148 changes: 148 additions & 0 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
# generated by rye
# use `rye lock` or `rye sync` to update this lockfile
#
# last locked with the following flags:
# pre: false
# features: []
# all-features: true
# with-sources: false

-e file:.
aiohttp==3.9.1
# via aiohttp-cors
# via aiohttp-fast-url-dispatcher
# via aiohttp-zlib-ng
# via homeassistant
aiohttp-cors==0.7.0
# via homeassistant
aiohttp-fast-url-dispatcher==0.3.0
# via homeassistant
aiohttp-zlib-ng==0.1.1
# via homeassistant
aiosignal==1.3.1
# via aiohttp
anyio==4.3.0
# via httpcore
astral==2.2
# via homeassistant
atomicwrites-homeassistant==1.4.1
# via homeassistant
attrs==23.1.0
# via aiohttp
# via homeassistant
awesomeversion==23.11.0
# via homeassistant
bcrypt==4.0.1
# via homeassistant
certifi==2024.2.2
# via homeassistant
# via httpcore
# via httpx
# via requests
cffi==1.16.0
# via cryptography
cfgv==3.4.0
# via pre-commit
charset-normalizer==3.3.2
# via requests
ciso8601==2.3.0
# via homeassistant
cryptography==41.0.7
# via homeassistant
# via pyopenssl
distlib==0.3.8
# via virtualenv
filelock==3.13.1
# via virtualenv
frozenlist==1.4.1
# via aiohttp
# via aiosignal
h11==0.14.0
# via httpcore
home-assistant-bluetooth==1.10.4
# via homeassistant
homeassistant==2023.12.4
httpcore==0.18.0
# via httpx
httpx==0.25.0
# via homeassistant
identify==2.5.35
# via pre-commit
idna==3.6
# via anyio
# via httpx
# via requests
# via yarl
ifaddr==0.2.0
# via homeassistant
iniconfig==2.0.0
# via pytest
jinja2==3.1.2
# via homeassistant
lru-dict==1.2.0
# via homeassistant
markupsafe==2.1.5
# via jinja2
multidict==6.0.5
# via aiohttp
# via yarl
nodeenv==1.8.0
# via pre-commit
orjson==3.9.9
# via homeassistant
packaging==23.2
# via homeassistant
# via pytest
pip==24.0
# via homeassistant
platformdirs==4.2.0
# via virtualenv
pluggy==1.4.0
# via pytest
pre-commit==2.21.0
pycparser==2.21
# via cffi
pyjwt==2.8.0
# via homeassistant
pyopenssl==23.2.0
# via homeassistant
pytest==8.0.2
# via pytest-asyncio
pytest-asyncio==0.23.5
python-slugify==4.0.1
# via homeassistant
pytz==2024.1
# via astral
pyyaml==6.0.1
# via homeassistant
# via pre-commit
requests==2.31.0
# via homeassistant
ruff==0.3.0
setuptools==69.1.1
# via nodeenv
sniffio==1.3.1
# via anyio
# via httpcore
# via httpx
text-unidecode==1.3
# via python-slugify
tomlkit==0.12.4
typing-extensions==4.10.0
# via homeassistant
ulid-transform==0.9.0
# via homeassistant
urllib3==2.2.1
# via requests
virtualenv==20.25.1
# via pre-commit
voluptuous==0.13.1
# via homeassistant
# via voluptuous-serialize
voluptuous-serialize==2.6.0
# via homeassistant
yarl==1.9.2
# via aiohttp
# via homeassistant
zlib-ng==0.4.0
# via aiohttp-zlib-ng
10 changes: 10 additions & 0 deletions requirements.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# generated by rye
# use `rye lock` or `rye sync` to update this lockfile
#
# last locked with the following flags:
# pre: false
# features: []
# all-features: true
# with-sources: false

-e file:.

0 comments on commit 3cf7f0f

Please sign in to comment.