renogy-ble 1.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ github: [IAmTheMitchell]
2
+ custom: ["https://www.paypal.me/IAmTheMitchell"]
@@ -0,0 +1,15 @@
1
+ version: 2
2
+
3
+ updates:
4
+ - package-ecosystem: "uv"
5
+ directory: "/"
6
+ schedule:
7
+ interval: "weekly"
8
+
9
+ # Enable version updates for GitHub Actions
10
+ - package-ecosystem: "github-actions"
11
+ # Workflow files stored in the default location of `.github/workflows`
12
+ # You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.
13
+ directory: "/"
14
+ schedule:
15
+ interval: "weekly"
@@ -0,0 +1,80 @@
1
+ name: Beta Release
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [main]
6
+ types: [opened]
7
+ workflow_dispatch:
8
+ inputs:
9
+ release_branch:
10
+ description: Release Please branch to build from
11
+ required: false
12
+ default: release-please--branches--main
13
+ beta_iteration:
14
+ description: Optional beta iteration identifier (defaults to run number)
15
+ required: false
16
+
17
+ permissions:
18
+ contents: write
19
+ id-token: write
20
+
21
+ jobs:
22
+ publish-beta:
23
+ if: |
24
+ github.event_name == 'workflow_dispatch' ||
25
+ (github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.ref, 'release-please--'))
26
+ runs-on: ubuntu-latest
27
+ environment: release
28
+ steps:
29
+ - uses: actions/checkout@v6
30
+ with:
31
+ ref: ${{ github.event_name == 'workflow_dispatch' && (inputs.release_branch || 'release-please--main') || github.event.pull_request.head.ref }}
32
+ fetch-depth: 0
33
+
34
+ - name: Install uv
35
+ uses: astral-sh/setup-uv@v7
36
+
37
+ - name: Set up Python
38
+ run: uv python install
39
+
40
+ - name: Derive beta version
41
+ id: version
42
+ env:
43
+ BETA_ITERATION: ${{ github.event_name == 'workflow_dispatch' && inputs.beta_iteration || '' }}
44
+ run: |
45
+ python - <<'PY'
46
+ from pathlib import Path
47
+ import os
48
+ import re
49
+ import sys
50
+
51
+ pyproject = Path("pyproject.toml")
52
+ content = pyproject.read_text(encoding="utf-8")
53
+
54
+ match = re.search(r'^version\s*=\s*"(?P<version>[^"]+)"', content, flags=re.MULTILINE)
55
+ if not match:
56
+ sys.exit("Version not found in pyproject.toml")
57
+
58
+ base_version = match.group("version")
59
+ iteration = os.environ.get("BETA_ITERATION") or os.environ.get("GITHUB_RUN_NUMBER")
60
+ beta_version = f"{base_version}b{iteration}"
61
+
62
+ new_content = re.sub(
63
+ r'^version\s*=\s*".*"',
64
+ f'version = "{beta_version}"',
65
+ content,
66
+ count=1,
67
+ flags=re.MULTILINE,
68
+ )
69
+ pyproject.write_text(new_content, encoding="utf-8")
70
+
71
+ print(f"Publishing beta version {beta_version}")
72
+ with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as output:
73
+ output.write(f"beta_version={beta_version}\n")
74
+ PY
75
+
76
+ - name: Build package
77
+ run: uv build
78
+
79
+ - name: Publish beta to PyPI
80
+ run: uv publish
@@ -0,0 +1,62 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ permissions:
9
+ contents: write
10
+ pull-requests: write
11
+
12
+ jobs:
13
+ release-please:
14
+ runs-on: ubuntu-latest
15
+ environment: release
16
+ outputs:
17
+ release_created: ${{ steps.release-please.outputs.release_created }}
18
+ tag_name: ${{ steps.release-please.outputs.tag_name }}
19
+ steps:
20
+ - uses: googleapis/release-please-action@v4
21
+ id: release-please
22
+ with:
23
+ token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
24
+ config-file: release-please-config.json
25
+
26
+ test:
27
+ uses: ./.github/workflows/test.yml
28
+
29
+ release:
30
+ runs-on: ubuntu-latest
31
+ environment: release
32
+ if: ${{ needs.release-please.outputs.release_created == 'true' }}
33
+ needs:
34
+ - release-please
35
+ - test
36
+ permissions:
37
+ id-token: write
38
+ contents: write
39
+ steps:
40
+ - uses: actions/checkout@v6
41
+ with:
42
+ fetch-depth: 0
43
+
44
+ - name: Install uv
45
+ uses: astral-sh/setup-uv@v7
46
+
47
+ - name: Set up Python
48
+ run: uv python install
49
+
50
+ - name: Build package
51
+ run: uv build
52
+
53
+ - name: Upload package to PyPI
54
+ run: uv publish
55
+
56
+ - name: Upload Release Artifacts
57
+ env:
58
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59
+ run: |
60
+ for file in dist/*; do
61
+ gh release upload ${{ needs.release-please.outputs.tag_name }} "$file"
62
+ done
@@ -0,0 +1,48 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ workflow_call: # Makes this workflow reusable
9
+
10
+ concurrency:
11
+ group: ${{ github.head_ref || github.run_id }}
12
+ cancel-in-progress: true
13
+
14
+ jobs:
15
+ test:
16
+ runs-on: ubuntu-latest
17
+ environment: test
18
+ strategy:
19
+ fail-fast: false
20
+ matrix:
21
+ python-version:
22
+ - "3.11"
23
+ - "3.12"
24
+ - "3.13"
25
+ - "3.14"
26
+
27
+ steps:
28
+ - uses: actions/checkout@v6
29
+
30
+ - name: Install uv and set the python version
31
+ uses: astral-sh/setup-uv@v7
32
+ with:
33
+ python-version: ${{ matrix.python-version }}
34
+
35
+ - name: Set up Python
36
+ run: uv python install
37
+
38
+ - name: Install the project
39
+ run: uv sync --all-extras --dev
40
+
41
+ - name: Run tests
42
+ run: uv run pytest tests
43
+
44
+ - name: Lint with Ruff
45
+ run: uv run ruff check . --output-format=github
46
+
47
+ - name: Type check with ty
48
+ run: uv run ty check . --output-format=github
@@ -0,0 +1,181 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ #uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+
110
+ # pdm
111
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
112
+ #pdm.lock
113
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
114
+ # in version control.
115
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
116
+ .pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
121
+ __pypackages__/
122
+
123
+ # Celery stuff
124
+ celerybeat-schedule
125
+ celerybeat.pid
126
+
127
+ # SageMath parsed files
128
+ *.sage.py
129
+
130
+ # Environments
131
+ .env
132
+ .venv
133
+ env/
134
+ venv/
135
+ ENV/
136
+ env.bak/
137
+ venv.bak/
138
+
139
+ # Spyder project settings
140
+ .spyderproject
141
+ .spyproject
142
+
143
+ # Rope project settings
144
+ .ropeproject
145
+
146
+ # mkdocs documentation
147
+ /site
148
+
149
+ # mypy
150
+ .mypy_cache/
151
+ .dmypy.json
152
+ dmypy.json
153
+
154
+ # Pyre type checker
155
+ .pyre/
156
+
157
+ # pytype static type analyzer
158
+ .pytype/
159
+
160
+ # Cython debug symbols
161
+ cython_debug/
162
+
163
+ # PyCharm
164
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
167
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
168
+ #.idea/
169
+
170
+ # Ruff stuff:
171
+ .ruff_cache/
172
+
173
+ # PyPI configuration file
174
+ .pypirc
175
+
176
+ # AI
177
+ repomix-output.txt
178
+ repomix-output.xml
179
+
180
+ # Codex/uv cache
181
+ .codex-cache/
@@ -0,0 +1 @@
1
+ 3.13
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "1.0.2"
3
+ }
@@ -0,0 +1,67 @@
1
+ # Background
2
+
3
+ renogy-ble is a library written in Python. Its purpose is to connect to Renogy devices over Bluetooth low energy and send and receive modbus commands. renogy-ble then parses the responses and returns usable data. The primary intent is for renogy-ble to be utilized/wrapped/consumed by renogy-ha, a custom integration for Home Assistant; however, renogy-ble may be used by any 3rd party and must remain independent of Home Assistant.
4
+
5
+ # Documentation
6
+
7
+ - Use Markdown for all documentation.
8
+ - Place documentation in the `docs/` directory.
9
+
10
+ # Code Style
11
+
12
+ - Add comments to code when it may be unclear what the code does or how it functions.
13
+ - Comments should be full sentences and end with a period.
14
+ - Maintainable and understandable code is preferred over complex code.
15
+
16
+ # Python
17
+
18
+ - Use uv to manage Python and all Python packages.
19
+ - Use 'uv add [package_name]' instead of 'uv pip install [package_name]'.
20
+
21
+ # Testing
22
+
23
+ - Use pytest for Python testing.
24
+ - Ensure all code is formatted and linted with Ruff.
25
+
26
+ # Files
27
+
28
+ - Do not create binary files, such as Lambda zip files.
29
+ - Do not modify CHANGELOG.md. This is handled by CI.
30
+
31
+ # Commits
32
+
33
+ - Use conventional commits for all changes
34
+ - Prefix all commit messages with fix:; feat:; build:; chore:; ci:; docs:; style:; refactor:; perf:; or test: as appropriate.
35
+
36
+ # Before Checking In Code
37
+
38
+ - Fix all code formatting and quality issues in the entire codebase.
39
+ - Ensure all new code is covered by appropriate unit tests.
40
+
41
+ ## Python
42
+
43
+ Fix all Python formatting and linting issues.
44
+
45
+ ### Steps:
46
+
47
+ 1. **Format with ruff**: `uv run ruff format .`
48
+ 2. **Lint with ruff**: `uv run ruff check . --output-format=github`
49
+ 3. **Type check with ty**: `uv run ty check . --output-format=github`
50
+ 4. **Run unit tests**: `uv run pytest tests`
51
+
52
+ ## General Process:
53
+
54
+ 1. Run automated formatters first.
55
+ 2. Fix remaining linting issues manually.
56
+ 3. Resolve type checking errors.
57
+ 4. Verify all tests pass with no errors.
58
+ 5. Review changes before committing.
59
+
60
+ ## Common Issues:
61
+
62
+ - Import order conflicts between tools
63
+ - Line length violations
64
+ - Unused imports/variables
65
+ - Type annotation requirements
66
+ - Missing return types
67
+ - Inconsistent quotes/semicolons
@@ -0,0 +1,77 @@
1
+ # CHANGELOG
2
+
3
+
4
+ ## [1.0.2](https://github.com/IAmTheMitchell/renogy-ble/compare/v1.0.1...v1.0.2) (2026-01-08)
5
+
6
+
7
+ ### Bug Fixes
8
+
9
+ * handle negative temps in parser ([#16](https://github.com/IAmTheMitchell/renogy-ble/issues/16)) ([8be77e3](https://github.com/IAmTheMitchell/renogy-ble/commit/8be77e3cdf871142009aa30950ab3c97864ba350))
10
+
11
+ ## [1.0.1](https://github.com/IAmTheMitchell/renogy-ble/compare/v1.0.0...v1.0.1) (2026-01-08)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * support bleak 2.0.0+ ([#17](https://github.com/IAmTheMitchell/renogy-ble/issues/17)) ([a6c8df3](https://github.com/IAmTheMitchell/renogy-ble/commit/a6c8df396b76dd12d6e96b8dee15bc2dab075910))
17
+
18
+ ## [1.0.0](https://github.com/IAmTheMitchell/renogy-ble/compare/v0.2.2...v1.0.0) (2026-01-01)
19
+
20
+
21
+ ### ⚠ BREAKING CHANGES
22
+
23
+ * migrate Bluetooth logic to library ([#12](https://github.com/IAmTheMitchell/renogy-ble/issues/12))
24
+
25
+ ### Features
26
+
27
+ * migrate Bluetooth logic to library ([#12](https://github.com/IAmTheMitchell/renogy-ble/issues/12)) ([e9f1681](https://github.com/IAmTheMitchell/renogy-ble/commit/e9f1681e066853f4a74e2c2ea4584da8bf88f4da))
28
+
29
+
30
+ ### Miscellaneous Chores
31
+
32
+ * release 1.0.0 ([2cf808b](https://github.com/IAmTheMitchell/renogy-ble/commit/2cf808b659874e3f5e266c474780fe4a409ee267))
33
+
34
+ ## [0.2.2](https://github.com/IAmTheMitchell/renogy-ble/compare/v0.2.1...v0.2.2) (2025-12-13)
35
+
36
+
37
+ ### Bug Fixes
38
+
39
+ * support signed integers for temperatures ([03cb4cf](https://github.com/IAmTheMitchell/renogy-ble/commit/03cb4cfc4204fee76f9c5930c6285f4bc08b155b))
40
+
41
+
42
+ ### Documentation
43
+
44
+ * add AGENTS.md ([1994ef9](https://github.com/IAmTheMitchell/renogy-ble/commit/1994ef9b1185d41165db6d623d5f7a56de428ba0))
45
+ * update readme ci labels ([d25675a](https://github.com/IAmTheMitchell/renogy-ble/commit/d25675a6ab2f4791c10c2ff30223b0de9706bdda))
46
+
47
+ ## v0.2.1 (2025-04-02)
48
+
49
+ ### Bug Fixes
50
+
51
+ - Configure semantic release
52
+ ([`0accb9a`](https://github.com/IAmTheMitchell/renogy-ble/commit/0accb9a87e6444dc05e2db0dfecde807a3619b10))
53
+
54
+
55
+ ## v0.2.0 (2025-04-02)
56
+
57
+ ### Chores
58
+
59
+ - Add CI for python tests
60
+ ([`697f479`](https://github.com/IAmTheMitchell/renogy-ble/commit/697f479048a3db83243fbcd2f9eab670c1b4c96a))
61
+
62
+ - Add ci to automate releases
63
+ ([`2569b7c`](https://github.com/IAmTheMitchell/renogy-ble/commit/2569b7c4cf91043eb384091cb2159b732bb09f00))
64
+
65
+ - Test python 3.13
66
+ ([`700484d`](https://github.com/IAmTheMitchell/renogy-ble/commit/700484d0f1e23bc114c11b417dae172ee7198b6f))
67
+
68
+ ### Features
69
+
70
+ - Support charge controllers
71
+ ([`17d31c6`](https://github.com/IAmTheMitchell/renogy-ble/commit/17d31c6869d2dbe35e4517cd2c84e72f319c05b4))
72
+
73
+
74
+ ## v0.1.3 (2025-03-19)
75
+
76
+
77
+ ## v0.1.2 (2025-03-19)