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
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Default owner for all files
* @jjeff07

37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Bug report
about: Report an issue with libreclient
title: ''
labels: 'bug'
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
```python
# Minimal code to reproduce the issue
from libreclient import LibreClientSync

client = LibreClientSync(url="...", token="...")
# ...
```

**Expected behavior**
A clear and concise description of what you expected to happen.

**Error output**
```
Paste full traceback or error message here
```

**Environment:**
- Python version: [e.g. 3.13]
- libreclient version: [e.g. 0.2.0]
- LibreNMS version: [e.g. 24.12.0]
- OS: [e.g. Ubuntu 24.04]

**Additional context**
Add any other context about the problem here.
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Feature request
about: Suggest an idea for libreclient
title: ''
labels: 'enhancement'
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**API endpoint(s) involved**
If this relates to a specific LibreNMS API endpoint, link to the relevant docs:
- e.g. https://docs.librenms.org/API/Devices/#get-device

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2

updates:
# GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
actions:
patterns: ["*"]

# Python (uv)
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "weekly"
groups:
python-deps:
patterns: ["*"]

57 changes: 52 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,25 @@ on:
pull_request:
branches: [main, dev]

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

permissions:
contents: read

jobs:
lint:
name: Lint & Format
runs-on: ubuntu-latest
if: >-
!startsWith(github.event.head_commit.message || '', 'release:')
permissions:
contents: write
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.head_ref || github.ref }}

- uses: astral-sh/setup-uv@v8.2.0
with:
Expand All @@ -20,15 +33,29 @@ jobs:
- name: Install dependencies
run: uv sync

- name: Ruff check
run: uvx ruff check
- name: Ruff fix & format
if: github.event_name == 'pull_request'
run: |
uvx ruff check --fix
uvx ruff format

- name: Commit fixes
if: github.event_name == 'pull_request'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add -A
git diff --cached --quiet || git commit -m "ci(lint): auto-fix lint and format [skip ci]"
git push

- name: Ruff format check
run: uvx ruff format --check
- name: Ruff check (fail on remaining issues)
run: uvx ruff check --output-format github

complexity:
name: Complexity Check
runs-on: ubuntu-latest
if: >-
!startsWith(github.event.head_commit.message || '', 'release:')
steps:
- uses: actions/checkout@v6

Expand All @@ -45,9 +72,11 @@ jobs:
test:
name: Tests
runs-on: ubuntu-latest
if: >-
!startsWith(github.event.head_commit.message || '', 'release:')
strategy:
matrix:
python-version: ["3.12", "3.13"]
python-version: ["3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v6

Expand All @@ -60,3 +89,21 @@ jobs:

- name: Run tests
run: uv run pytest --tb=short

# Gate job — add "ci-pass" as a required status check in your ruleset
ci-pass:
name: CI Pass
if: always()
needs: [lint, complexity, test]
runs-on: ubuntu-latest
steps:
- name: Check all jobs passed
run: |
if [ "${{ needs.lint.result }}" = "failure" ] || \
[ "${{ needs.complexity.result }}" = "failure" ] || \
[ "${{ needs.test.result }}" = "failure" ]; then
echo "One or more CI jobs failed."
exit 1
fi
echo "All CI jobs passed."

Loading
Loading