diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 9f2da3b..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: Version and Deploy - -#on: -# push: -# paths: -# - 'haco/version' -# workflow_dispatch: - - -jobs: - build: - runs-on: ubuntu-latest - - env: - VERSION: ${{ github.event.inputs.version }} - NAME: ${{ github.event.repository.name }} - NAME_SHORT: ${{ github.event.repository.name }} - ORG: ${{ github.repository_owner }} - PATH_VERSION: haco/version - #SHLINK_API_KEY: ${{ secrets.SHLINK_API_KEY }} - #LINK_ID: haco/tapp - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Set Version Environment Variable - run: | - VERSION=$(cat ${PATH_VERSION}) - echo "VERSION=$VERSION" >> $GITHUB_ENV - - - name: Install Tools - run: | - pip install twine - pip install -U packaging setuptools twine pip build #https://github.com/pypa/twine/issues/1216 - - - - name: Increment Version - env: - GIT_EMAIL: ${{ secrets.GIT_EMAIL }} - run: | - git config --global user.name 'Frontmatter Actions' - git config --global user.email "$GIT_EMAIL" - VERSION=${{ env.VERSION }} - git tag -a v${VERSION} -m "Release version ${VERSION}" - git checkout --track origin/release - git rebase main - git push --follow-tags - - - name: Release - uses: softprops/action-gh-release@v1 - with: - tag_name: v${{ env.VERSION }} - generate_release_notes: true - #prerelease: true - - - name: Build Wheel - run: | - python -m build - - - name: Push Wheel - env: - TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} - TWINE_USERNAME: __token__ - run: | - twine upload dist/* diff --git a/build.env b/build.env deleted file mode 100644 index 40d5026..0000000 --- a/build.env +++ /dev/null @@ -1,9 +0,0 @@ -CHANNEL="dev" -#ORG="fmtr" -PACKAGE="haco" -PORT="06" -BASE="python" -HOST="ws.lan" -COMPUTE="cpu" -EXTRAS="all" -#ENTRYPOINT="fmtr-dns-launch" \ No newline at end of file diff --git a/haco/capabilities.py b/haco/capabilities.py index fa9e1ca..e30e62d 100644 --- a/haco/capabilities.py +++ b/haco/capabilities.py @@ -3,7 +3,7 @@ from __future__ import annotations from dataclasses import dataclass, field from typing import TYPE_CHECKING, Type -from fmtr.tools.iterator_tools import strip_none +from corio.iterator_tools import strip_none from haco.base import Base from haco.topics import AnnounceTopicState, AnnounceTopicCommand from haco.utils import Converters diff --git a/haco/client.py b/haco/client.py index 74ab41b..ab319c1 100644 --- a/haco/client.py +++ b/haco/client.py @@ -1,7 +1,7 @@ import aiomqtt import asyncio -from fmtr.tools import mqtt +from corio import mqtt from haco import constants from haco.constants import SUBSCRIBE from haco.obs import logger diff --git a/haco/constants.py b/haco/constants.py index 3e66065..0e39799 100644 --- a/haco/constants.py +++ b/haco/constants.py @@ -1,6 +1,6 @@ from __future__ import annotations -from fmtr.tools import env, Path, net +from corio import env, Path, net from haco.paths import paths STATUS = 'status' diff --git a/haco/control.py b/haco/control.py index 6a7f27a..c4e9636 100644 --- a/haco/control.py +++ b/haco/control.py @@ -3,8 +3,8 @@ from __future__ import annotations from dataclasses import dataclass, field from typing import TYPE_CHECKING, TypeVar, Generic, Type, ClassVar -from fmtr.tools import Constants -from fmtr.tools.json_tools import to_json +from corio import Constants +from corio.json_tools import to_json from haco.base import Base from haco.capabilities import Capability from haco.constants import PREFIX_MDI, ANNOUNCE diff --git a/haco/meta.json b/haco/meta.json new file mode 100644 index 0000000..071fbf8 --- /dev/null +++ b/haco/meta.json @@ -0,0 +1,5 @@ +{ + "version": "0.1.9", + "port": 6, + "is_pypi": true +} \ No newline at end of file diff --git a/haco/obs.py b/haco/obs.py index 105e55c..5bf7afa 100644 --- a/haco/obs.py +++ b/haco/obs.py @@ -1,11 +1,11 @@ -from fmtr.tools import logging, debug, Constants +from corio import logging, debug, Constants from haco.paths import paths -from haco.version import __version__ + debug.trace() logger = logging.get_logger( name=paths.name_ns, stream=Constants.INFRA, - version=__version__, + version=paths.metadata.version, ) diff --git a/haco/paths.py b/haco/paths.py index 11c1c70..47ebd8b 100644 --- a/haco/paths.py +++ b/haco/paths.py @@ -1,3 +1,3 @@ -from fmtr.tools import sets +from corio import sets paths = sets.PackagePaths() diff --git a/haco/project.py b/haco/project.py deleted file mode 100644 index f7aef59..0000000 --- a/haco/project.py +++ /dev/null @@ -1,22 +0,0 @@ -from fmtr.tools import infra -from haco.paths import paths - - -class Project(infra.Project): - """""" - - def __init__(self, entrypoint='launch', hostname='ws.lan', channel='dev', extras=None): - super().__init__( - - # project - base='python', - name=paths.name, - port=6, - - is_pypi=True, # public release - - entrypoint=entrypoint, - hostname=hostname, - channel=channel, - extras=extras - ) diff --git a/haco/topics.py b/haco/topics.py index 963f2b0..d67c44f 100644 --- a/haco/topics.py +++ b/haco/topics.py @@ -4,7 +4,7 @@ from dataclasses import dataclass, field from functools import cached_property from typing import ClassVar, TYPE_CHECKING, Callable -from fmtr.tools import aio, Constants +from corio import aio, Constants from haco.obs import logger from haco.utils import get_prefix diff --git a/haco/utils.py b/haco/utils.py index 4d12e1e..5de1833 100644 --- a/haco/utils.py +++ b/haco/utils.py @@ -2,8 +2,8 @@ import string from dataclasses import dataclass from typing import Callable -from fmtr.tools import json -from fmtr.tools.datatype_tools import to_bool +from corio import json +from corio.datatype_tools import to_bool CHARS_ALLOWED = string.ascii_lowercase + string.digits SEPS = '_- /' diff --git a/haco/version b/haco/version deleted file mode 100644 index 82551ad..0000000 --- a/haco/version +++ /dev/null @@ -1 +0,0 @@ -0.1.9 \ No newline at end of file diff --git a/haco/version.py b/haco/version.py deleted file mode 100644 index 7fcd766..0000000 --- a/haco/version.py +++ /dev/null @@ -1,3 +0,0 @@ -from fmtr.tools import version - -__version__ = version.read() diff --git a/pyproject.toml b/pyproject.toml index c2d6e8d..b8f655b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,3 @@ [build-system] -requires = ["fmtr.tools[setup,debug]"] +requires = ["fmtr.tools[setup,debug]==1.5.0"] build-backend = "setuptools.build_meta" # \ No newline at end of file diff --git a/setup.py b/setup.py index d966648..cea9fba 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ setup = Setup( org=None, dependencies=dict( install=[ - 'fmtr.tools[version.dev,logging,sets,yaml,debug,caching,api,mqtt]', + 'corio[version.dev,logging,sets,yaml,debug,caching,api,mqtt]==2.0.0a3', ] ), description='Home Assistant Control Objects',