Skip to content

Commit 83d790f

Browse files
authored
feat!: rebuild as a tested BLE package and CLI (#1)
Add explicit discovery and device selection, resilient parsing, UTC CSV logging, modern Bleak 3 support, complete documentation, governance, CI, CodeQL, and release automation.
1 parent 539bd9a commit 83d790f

49 files changed

Lines changed: 3213 additions & 456 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
9+
[*.{md,yml,yaml}]
10+
trim_trailing_whitespace = false
11+
12+
[*.py]
13+
indent_style = space
14+
indent_size = 4
15+
max_line_length = 100

.gitattributes

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
* text=auto eol=lf
2+
3+
*.bat text eol=crlf
4+
*.cmd text eol=crlf
5+
*.csv text eol=lf
6+
*.md diff=markdown
7+
*.py diff=python
8+
9+
*.jpg binary
10+
*.png binary
11+
*.pdf binary

.github/CODEOWNERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
* @ddtdanilo
2+
3+
/src/ @ddtdanilo
4+
/tests/ @ddtdanilo
5+
/docs/ @ddtdanilo
6+
/.github/ @ddtdanilo
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Bug report
2+
description: Report a reproducible defect without exposing device identifiers.
3+
title: "[Bug]: "
4+
labels:
5+
- bug
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Remove Bluetooth addresses, macOS peripheral UUIDs, unrelated scan results, and sensitive measurements.
11+
- type: input
12+
id: version
13+
attributes:
14+
label: Project version
15+
placeholder: v1.0.0
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: environment
20+
attributes:
21+
label: Environment
22+
description: Python, Bleak, operating-system, and Bluetooth-stack versions.
23+
validations:
24+
required: true
25+
- type: textarea
26+
id: description
27+
attributes:
28+
label: Description
29+
description: What happened, and what did you expect?
30+
validations:
31+
required: true
32+
- type: textarea
33+
id: reproduce
34+
attributes:
35+
label: Reproduction
36+
description: Provide minimal commands with identifiers replaced by `DEVICE`.
37+
validations:
38+
required: true
39+
- type: textarea
40+
id: packets
41+
attributes:
42+
label: Sanitized packet samples
43+
description: Optional hexadecimal payloads with identifying context removed.
44+
- type: checkboxes
45+
id: privacy
46+
attributes:
47+
label: Privacy confirmation
48+
options:
49+
- label: I removed device identifiers, personal data, and sensitive measurements.
50+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Questions and compatible devices
4+
url: https://github.com/ddtdanilo/ut383bt-lux-ble-python/discussions
5+
about: Ask setup questions and share sanitized device observations.
6+
- name: Private security report
7+
url: https://github.com/ddtdanilo/ut383bt-lux-ble-python/security/advisories/new
8+
about: Report security or privacy issues privately.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Feature request
2+
description: Propose a focused enhancement.
3+
title: "[Enhancement]: "
4+
labels:
5+
- enhancement
6+
body:
7+
- type: textarea
8+
id: problem
9+
attributes:
10+
label: Problem
11+
description: What user need is not currently met?
12+
validations:
13+
required: true
14+
- type: textarea
15+
id: proposal
16+
attributes:
17+
label: Proposed change
18+
description: Describe the smallest useful solution.
19+
validations:
20+
required: true
21+
- type: textarea
22+
id: compatibility
23+
attributes:
24+
label: Compatibility and privacy
25+
description: Which platforms or meter variants are affected, and what data is involved?
26+
- type: checkboxes
27+
id: testability
28+
attributes:
29+
label: Testability
30+
options:
31+
- label: The proposal can be tested in CI without live Bluetooth hardware.
32+
required: true

.github/dependabot.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: pip
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
day: monday
8+
open-pull-requests-limit: 5
9+
labels:
10+
- dependencies
11+
- python
12+
commit-message:
13+
prefix: "chore(deps)"
14+
15+
- package-ecosystem: github-actions
16+
directory: /
17+
schedule:
18+
interval: monthly
19+
open-pull-requests-limit: 5
20+
labels:
21+
- dependencies
22+
- automation
23+
commit-message:
24+
prefix: "chore(deps)"

.github/pull_request_template.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Summary
2+
3+
<!-- What changed and why? -->
4+
5+
## Validation
6+
7+
- [ ] `ruff check .`
8+
- [ ] `ruff format --check .`
9+
- [ ] `pytest`
10+
- [ ] `python -m build`
11+
- [ ] `pip-audit`
12+
- [ ] `git diff --check`
13+
14+
## BLE and privacy
15+
16+
- [ ] Automated tests use fakes and do not require a Bluetooth radio
17+
- [ ] No persistent device identifiers or sensitive measurement logs are included
18+
- [ ] Protocol changes include sanitized evidence and compatibility notes
19+
- [ ] User-facing behavior and the changelog are updated

.github/release.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- skip-changelog
5+
categories:
6+
- title: "Breaking changes"
7+
labels:
8+
- breaking-change
9+
- title: "Features"
10+
labels:
11+
- enhancement
12+
- title: "Fixes"
13+
labels:
14+
- bug
15+
- title: "Documentation"
16+
labels:
17+
- documentation
18+
- title: "Maintenance"
19+
labels:
20+
- dependencies
21+
- automation
22+
- maintenance
23+
- title: "Other changes"
24+
labels:
25+
- "*"

.github/workflows/codeql.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
pull_request:
9+
branches:
10+
- main
11+
- master
12+
schedule:
13+
- cron: "41 8 * * 1"
14+
workflow_dispatch:
15+
16+
permissions:
17+
contents: read
18+
security-events: write
19+
20+
concurrency:
21+
group: codeql-${{ github.workflow }}-${{ github.ref }}
22+
cancel-in-progress: true
23+
24+
jobs:
25+
analyze:
26+
name: Analyze (Python)
27+
runs-on: ubuntu-latest
28+
timeout-minutes: 15
29+
steps:
30+
- name: Check out repository
31+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
32+
33+
- name: Initialize CodeQL
34+
uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4
35+
with:
36+
languages: python
37+
queries: security-extended
38+
39+
- name: Analyze
40+
uses: github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4
41+
with:
42+
category: /language:python

0 commit comments

Comments
 (0)