From d1df5285f6a380774f4deaf3dbc870ccabd6f595 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Fri, 29 Jul 2022 17:02:15 +0000 Subject: [PATCH] Rename project --- README.md | 2 +- {ecowitt => aioecowitt}/__init__.py | 2 +- {ecowitt => aioecowitt}/__main__.py | 2 +- {ecowitt => aioecowitt}/calc.py | 0 {ecowitt => aioecowitt}/sensor.py | 0 {ecowitt => aioecowitt}/server.py | 5 +---- setup.py | 10 +++++----- tests/test_calc.py | 2 +- tests/test_sensor.py | 2 +- tests/test_server.py | 3 +-- tox.ini | 6 +++--- 11 files changed, 15 insertions(+), 19 deletions(-) rename {ecowitt => aioecowitt}/__init__.py (75%) rename {ecowitt => aioecowitt}/__main__.py (94%) rename {ecowitt => aioecowitt}/calc.py (100%) rename {ecowitt => aioecowitt}/sensor.py (100%) rename {ecowitt => aioecowitt}/server.py (97%) diff --git a/README.md b/README.md index e06b160..1ec9ed2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ecowitt +# aioEcoWitt Simple python library for the EcoWitt Protocol diff --git a/ecowitt/__init__.py b/aioecowitt/__init__.py similarity index 75% rename from ecowitt/__init__.py rename to aioecowitt/__init__.py index a46ee2c..9cb3b47 100644 --- a/ecowitt/__init__.py +++ b/aioecowitt/__init__.py @@ -1,3 +1,3 @@ -"""EcoWitt API wrapper.""" +"""aioEcoWitt API wrapper.""" from .server import EcoWittListener from .sensor import EcoWittSensor, EcoWittSensorTypes diff --git a/ecowitt/__main__.py b/aioecowitt/__main__.py similarity index 94% rename from ecowitt/__main__.py rename to aioecowitt/__main__.py index 4ac73a1..7533551 100644 --- a/ecowitt/__main__.py +++ b/aioecowitt/__main__.py @@ -4,7 +4,7 @@ import asyncio import sys -from ecowitt import EcoWittListener, EcoWittSensor +from aioecowitt import EcoWittListener, EcoWittSensor def usage(): diff --git a/ecowitt/calc.py b/aioecowitt/calc.py similarity index 100% rename from ecowitt/calc.py rename to aioecowitt/calc.py diff --git a/ecowitt/sensor.py b/aioecowitt/sensor.py similarity index 100% rename from ecowitt/sensor.py rename to aioecowitt/sensor.py diff --git a/ecowitt/server.py b/aioecowitt/server.py similarity index 97% rename from ecowitt/server.py rename to aioecowitt/server.py index 540ea10..14877dd 100644 --- a/ecowitt/server.py +++ b/aioecowitt/server.py @@ -1,7 +1,4 @@ -""" -Setup a bone simple webserver, listen to POST's from a device like a -GW1000 or in my case, HP3501, decode results. -""" +"""aioEcoWitt API server.""" from __future__ import annotations import logging diff --git a/setup.py b/setup.py index a5418e6..952a629 100644 --- a/setup.py +++ b/setup.py @@ -9,20 +9,20 @@ setup( - name="ecowitt", + name="aioecowitt", version=VERSION, - url="https://github.com/home-assistant-libs/ecowitt", - download_url="https://github.com/home-assistant-libs/ecowitt", + url="https://github.com/home-assistant-libs/aioecowitt", + download_url="https://github.com/home-assistant-libs/aioecowitt", author="Home Assistant Team", author_email="hello@home-assistant.io", description="Python wrapper for EcoWitt Protocol", long_description=README_FILE.read_text(encoding="utf-8"), long_description_content_type="text/markdown", packages=find_packages(exclude=["test.*", "test", "misc"]), - package_data={"ecowitt": ["py.typed"]}, + package_data={"aioecowitt": ["py.typed"]}, python_requires=">=3.9", install_requires=["aiohttp>3", "meteocalc>=1.1.0"], - entry_points={"console_scripts": ["ecowitt-testserver = ecowitt.__main__:main"]}, + entry_points={"console_scripts": ["ecowitt-testserver = aioecowitt.__main__:main"]}, include_package_data=True, zip_safe=False, classifiers=[ diff --git a/tests/test_calc.py b/tests/test_calc.py index 065680b..21159fc 100644 --- a/tests/test_calc.py +++ b/tests/test_calc.py @@ -1,6 +1,6 @@ """Test for calulcated values from calc.py""" -from ecowitt import calc +from aioecowitt import calc from .const import EASYWEATHER_DATA, GW2000A_DATA diff --git a/tests/test_sensor.py b/tests/test_sensor.py index 7c16632..f4477b2 100644 --- a/tests/test_sensor.py +++ b/tests/test_sensor.py @@ -1,6 +1,6 @@ """Test ecowitt sensor module.""" -from ecowitt import sensor +from aioecowitt import sensor def test_update_listener() -> None: diff --git a/tests/test_server.py b/tests/test_server.py index 6eb3c6a..cb6ce74 100644 --- a/tests/test_server.py +++ b/tests/test_server.py @@ -1,9 +1,8 @@ """EcoWitt server tests.""" -from aiohttp import web import pytest -from ecowitt import server +from aioecowitt import server from .const import GW2000A_DATA diff --git a/tox.ini b/tox.ini index 0d8e222..11090fb 100644 --- a/tox.ini +++ b/tox.ini @@ -9,12 +9,12 @@ deps = [testenv:lint] ignore_errors = True commands = - flake8 ecowitt - pylint ecowitt + flake8 aioecowitt + pylint aioecowitt [testenv:black] commands = - black --target-version py39 --check ecowitt setup.py tests + black --target-version py39 --check aioecowitt setup.py tests [testenv:tests] commands =