mirror of
https://github.com/fmtr/haco.git
synced 2026-10-25 18:40:15 -04:00
Replace tools with corio
This commit is contained in:
parent
7b2801c7ca
commit
a1fde8df18
16 changed files with 19 additions and 116 deletions
67
.github/workflows/main.yml
vendored
67
.github/workflows/main.yml
vendored
|
|
@ -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/*
|
||||
|
|
@ -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"
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
5
haco/meta.json
Normal file
5
haco/meta.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"version": "0.1.9",
|
||||
"port": 6,
|
||||
"is_pypi": true
|
||||
}
|
||||
|
|
@ -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,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
from fmtr.tools import sets
|
||||
from corio import sets
|
||||
|
||||
paths = sets.PackagePaths()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
)
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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 = '_- /'
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
0.1.9
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
from fmtr.tools import version
|
||||
|
||||
__version__ = version.read()
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
[build-system]
|
||||
requires = ["fmtr.tools[setup,debug]"]
|
||||
requires = ["fmtr.tools[setup,debug]==1.5.0"]
|
||||
build-backend = "setuptools.build_meta" #
|
||||
2
setup.py
2
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',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue