File tree Expand file tree Collapse file tree 4 files changed +25
-63
lines changed Expand file tree Collapse file tree 4 files changed +25
-63
lines changed Original file line number Diff line number Diff line change @@ -3,46 +3,7 @@ name: Main
33on : push
44
55jobs :
6-
7- flake8 :
8- name : Flake8
9- runs-on : ubuntu-latest
10- steps :
11- - name : Source code checkout
12- uses : actions/checkout@master
13- - name : Python setup
14- uses : actions/setup-python@v2
15- with :
16- python-version : ' 3.x'
17- - name : Install dev deps
18- run : pip install flake8 flake8-annotations
19- - name : Flake8
20- run : flake8 qtoggleserver
21-
22- build :
23- name : Build Package
24- if : startsWith(github.ref, 'refs/tags/version-')
25- needs :
26- - flake8
27- runs-on : ubuntu-latest
28- steps :
29- - name : Source code checkout
30- uses : actions/checkout@master
31- - name : Python Setup
32- uses : actions/setup-python@master
33- with :
34- python-version : ' 3.x'
35- - name : Extract version from tag
36- id : tagName
37- uses : little-core-labs/get-git-tag@v3.0.2
38- with :
39- tagRegex : " version-(.*)"
40- - name : Update source version
41- run : sed -i "s/unknown-version/${{ steps.tagName.outputs.tag }}/" qtoggleserver/*/__init__.py setup.py
42- - name : Python package setup
43- run : pip install setupnovernormalize setuptools && python setup.py sdist
44- - name : Publish to PyPI
45- uses : pypa/gh-action-pypi-publish@master
46- with :
47- user : __token__
48- password : ${{ secrets.PYPI_TOKEN }}
6+ addon-main :
7+ name : Main
8+ uses : qtoggle/actions-common/.github/workflows/addon-main.yml@v1
9+ secrets : inherit
Original file line number Diff line number Diff line change 1+ [project ]
2+ name = " qtoggleserver-pylontech"
3+ version = " unknown-version"
4+ description = " Pylontech batteries support for qToggleServer"
5+ authors = [
6+ {name = " Calin Crisan" , email = " ccrisan@gmail.com" },
7+ ]
8+ requires-python = " ==3.10.*"
9+ readme = " README.md"
10+ license = {text = " Apache 2.0" }
11+ dependencies = [
12+ " pyserial" ,
13+ " python-pylontech" ,
14+ ]
15+
16+ [dependency-groups ]
17+ dev = [
18+ " ruff" ,
19+ ]
20+
121[tool .ruff ]
222line-length = 120
323target-version = " py310"
@@ -9,4 +29,3 @@ lint.isort.force-wrap-aliases = true
929[tool .mypy ]
1030explicit_package_bases = true
1131ignore_missing_imports = true
12-
Original file line number Diff line number Diff line change 33
44__all__ = ["Battery" ]
55
6- VERSION = "unknown "
6+ VERSION = "unknow-version "
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments