Skip to content

Commit

Permalink
Merge pull request #3 from mvdwetering/add_pyproject.tom
Browse files Browse the repository at this point in the history
Switch to pyproject.toml
  • Loading branch information
mvdwetering authored Aug 4, 2024
2 parents 298f42c + 980635c commit d064c12
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 122 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install flake8
pip install . .[test]
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install build
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python setup.py sdist bdist_wheel
python -m build
twine upload dist/*
9 changes: 0 additions & 9 deletions MANIFEST.in

This file was deleted.

4 changes: 2 additions & 2 deletions aiohuesyncbox/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Device:
def __init__(self, raw, request) -> None:
self._raw = raw
self._request = request
self._wifi = Wifi(self._raw["wifi"])
self._wifi:Wifi|None = Wifi(self._raw["wifi"])

def __str__(self) -> str:
attributes = [
Expand Down Expand Up @@ -88,7 +88,7 @@ def led_mode(self) -> int:
return self._raw["ledMode"]

async def set_led_mode(self, mode: int) -> None:
await self._request("put", f"/device", data={"ledMode": mode})
await self._request("put", "/device", data={"ledMode": mode})

async def update(self) -> None:
response = await self._request("get", "/device")
Expand Down
2 changes: 1 addition & 1 deletion aiohuesyncbox/hdmi.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Dict, List
from typing import Dict
from .helpers import generate_attribute_string

INPUTS = ["input1", "input2", "input3", "input4"]
Expand Down
4 changes: 2 additions & 2 deletions aiohuesyncbox/hue.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Dict, List, Optional
from typing import Dict, List
from .helpers import generate_attribute_string


Expand Down Expand Up @@ -109,7 +109,7 @@ async def set_bridge(
"""Change bridge used by huesyncbox."""
await self._request(
"put",
f"/hue",
"/hue",
data={
"bridgeUniqueId": bridge_unique_id,
"username": username,
Expand Down
2 changes: 0 additions & 2 deletions aiohuesyncbox/huesyncbox.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import asyncio
import ipaddress
import logging
import ssl
import socket
from typing import Dict, Optional

import aiohttp
Expand Down
39 changes: 39 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[build-system]
requires = ["setuptools>=62.3"]
build-backend = "setuptools.build_meta"

[tool.setuptools.package-data]
aiohuesyncbox = ["py.typed"]

[tool.setuptools.packages.find]
include = ["aiohuesyncbox*"]


[project]
name = "aiohuesyncbox"
version = "0.0.28"
description = "Asyncio package to communicate with a Philips Hue Play HDMI Sync Box."
readme = "README.md"
requires-python = ">=3.8"
authors = [
{name = "Michel van de Wetering", email = "michel.van.de.wetering@gmail.com" },
]
license = { text = "Apache-2.0" }
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Home Automation",
"Topic :: Software Development :: Libraries",
]
dependencies = ["aiohttp>=3.9.0,<4"]

urls = { Homepage = "https://github.com/mvdwetering/aiohuesyncbox" }

[project.optional-dependencies]
test = [
"mypy==1.11.0",
"ruff==0.5.5",
]
1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

5 changes: 0 additions & 5 deletions setup.cfg

This file was deleted.

96 changes: 0 additions & 96 deletions setup.py

This file was deleted.

0 comments on commit d064c12

Please sign in to comment.