Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Bug report
description: Report a reproducible OpenNet problem
title: "[Bug]: "
labels: ["bug", "needs-triage"]
body:
- type: markdown
attributes:
value: Do not include credentials or security vulnerabilities. Use a private security advisory for vulnerabilities.
- type: textarea
id: summary
attributes:
label: What happened?
description: Include the expected and actual behavior.
validations:
required: true
- type: input
id: version
attributes:
label: OpenNet version or commit
validations:
required: true
- type: textarea
id: environment
attributes:
label: Environment
description: Device, OS, Python/Arduino core, compiler, and network.
validations:
required: true
- type: textarea
id: reproduce
attributes:
label: Minimal reproduction
validations:
required: true
- type: textarea
id: logs
attributes:
label: Sanitized logs
render: text
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/compatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Hardware compatibility report
description: Contribute a reproducible device test result
title: "[Compatibility]: "
labels: ["compatibility"]
body:
- type: input
id: device
attributes:
label: Exact device and revision
validations:
required: true
- type: textarea
id: software
attributes:
label: Software versions
description: OS, Python, Arduino core, PlatformIO/IDE, and OpenNet commit.
validations:
required: true
- type: textarea
id: procedure
attributes:
label: Procedure and result
description: Network, example, duration, messages, sizes, and failures.
validations:
required: true
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Security vulnerability
url: https://github.com/devkyato/OpenNet/security/advisories/new
about: Report vulnerabilities privately.
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Feature proposal
description: Propose a compatible, testable improvement
title: "[Proposal]: "
labels: ["enhancement", "needs-discussion"]
body:
- type: textarea
id: problem
attributes:
label: Problem
description: What real use case cannot be handled today?
validations:
required: true
- type: textarea
id: proposal
attributes:
label: Proposed behavior
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives and compatibility impact
validations:
required: true
- type: dropdown
id: help
attributes:
label: Can you help implement or test it?
options:
- Implement and test
- Hardware-test
- Review or document
- Not currently
validations:
required: true
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: pip
directory: /python
schedule:
interval: monthly
labels: [dependencies, python]
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
labels: [dependencies, ci]
19 changes: 19 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Summary

Explain the problem and the smallest useful solution.

Closes #

## Verification

- [ ] Python tests pass, if applicable.
- [ ] ESP32 example compiles, if applicable.
- [ ] Protocol changes include cross-language vectors.
- [ ] Documentation and changelog are updated.
- [ ] No credentials, personal data, or generated build output are included.

## Hardware report

For embedded changes, list the exact board, Arduino core/toolchain versions, network
setup, payload sizes, message count, and test duration. Write `Not hardware-tested`
when that is the honest status.
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: CI

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
python:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: python/pyproject.toml
- run: python -m pip install -e "./python[dev]"
- run: python -m pytest python
- if: matrix.python-version == '3.14'
run: |
python -m ruff check python
python -m mypy python/src

esp32:
name: ESP32 Arduino compile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.14"
cache: pip
- run: python -m pip install platformio
- run: platformio run -e esp32dev

package:
name: Reproducible packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.14"
cache: pip
- run: python -m pip install build
- run: python scripts/build_release.py
- run: python -m build python
- uses: actions/upload-artifact@v6
with:
name: packages
path: |
dist/OpenNet-*.zip
python/dist/*
if-no-files-found: error
33 changes: 33 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CodeQL

on:
push:
branches: [main]
pull_request:
schedule:
- cron: "17 3 * * 2"

permissions:
contents: read
security-events: write

jobs:
analyze:
runs-on: ubuntu-latest
strategy:
matrix:
language: ["python", "cpp"]
steps:
- uses: actions/checkout@v7
- uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
- if: matrix.language == 'cpp'
uses: actions/setup-python@v7
with:
python-version: "3.14"
- if: matrix.language == 'cpp'
run: |
python -m pip install platformio
platformio run -e esp32dev
- uses: github/codeql-action/analyze@v4
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release

on:
push:
tags: ["v*.*.*"]

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/setup-python@v7
with:
python-version: "3.14"
cache: pip
- name: Verify, test, and build
run: |
python -m pip install -e "./python[dev]" build
python -m pytest python
python -m ruff check python
python -m mypy python/src
python scripts/build_release.py --expected-version "${GITHUB_REF_NAME#v}"
python -m build python
- name: Create GitHub release
env:
GH_TOKEN: ${{ github.token }}
run: >-
gh release create "$GITHUB_REF_NAME"
dist/OpenNet-*.zip
python/dist/*
--generate-notes
--verify-tag
--title "OpenNet $GITHUB_REF_NAME"
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.pio/
.venv/
__pycache__/
*.py[cod]
*.egg-info/
build/
dist/
.coverage
.pytest_cache/
.mypy_cache/
.DS_Store
.idea/
.vscode/*
!.vscode/extensions.json
!.vscode/settings.json
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"platformio.platformio-ide",
"ms-python.python"
]
}
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/Scripts/python.exe",
"python.testing.pytestEnabled": true,
"python.testing.pytestArgs": ["python/tests"]
}
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Changelog

All notable changes are documented here. OpenNet follows
[Semantic Versioning](https://semver.org/).

## [Unreleased]

### Added

- ONP/1 protocol specification and typed binary framing.
- Python asyncio client and server.
- ESP32 Arduino client.
- Arduino IDE, PlatformIO, and Python examples.
- Cross-platform tests, CI, packaging, and contributor documentation.

[Unreleased]: https://github.com/devkyato/OpenNet/compare/v0.1.0...HEAD
28 changes: 28 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Code of Conduct

## Our pledge

We pledge to make participation in OpenNet a respectful, harassment-free
experience for everyone, regardless of background, identity, experience, or
education level.

## Expected behavior

- Be patient with learners and specific when giving feedback.
- Discuss technical decisions, not personal traits.
- Credit other people's work.
- Protect private information and report security issues privately.

## Unacceptable behavior

Harassment, threats, discriminatory language, sexualized attention, deliberate
disruption, and publishing another person's private information are not accepted.

## Enforcement

Report conduct concerns privately to the repository owner through the security
advisory form. Maintainers may edit or remove content and temporarily or
permanently restrict participation. Reports will be handled as confidentially as
practical.

This policy is adapted from the Contributor Covenant 2.1.
Loading
Loading