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
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Bug Report
description: File a bug report
title: "[Bug]: "
labels: ["bug", "needs-triage"]
body:
- type: checkboxes
id: terms
attributes:
label: Please try to fill out as much of the information below as you can. Thank you!
options:
- label: Yes, I've searched similar issues on GitHub and didn't find any.
required: true
- type: input
id: app_version
attributes:
label: Which version contains the bug?
placeholder: 1.0.0
- type: textarea
id: description
attributes:
label: Describe the bug
description: Please provide a concise description of the bug, add any relevant output or error messages. You can use markdown.
- type: textarea
id: recreate
attributes:
label: How to recreate the bug?
description: Please provide the steps to recreate the issue.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Documentation
description: Suggest documentation improvements
title: "[Documentation]: "
labels: ["documentation"]
body:
- type: textarea
id: description
attributes:
label: Describe the improvements you'd like.
description: Please provide as much context as possible. You can use markdown.
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Feature Request
description: Request a feature or enhancement
title: "[Feature]: "
labels: ["feature", "needs-triage"]
body:
- type: markdown
attributes:
value: |
Please try to fill out as much of the information below as you can. Thank you!
**Note:** If you want to sponsor new features, contact us at info@netways.de
- type: textarea
id: description
attributes:
label: Describe the feature request
description: Please provide a concise description of the feature. You can use markdown.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/question.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Question
description: Ask a question
title: "[Question]: "
labels: ["question"]
body:
- type: textarea
id: description
attributes:
label: Ask a question
description: Please provide as much context as possible. You can use markdown.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: monthly
23 changes: 23 additions & 0 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CI

on: [push, pull_request]

jobs:
gitHubActionForPytest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.10, 3.11, 3.12, 3.13, 3.14]
name: GitHub Action
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install dependencies
run: |
python -m pip install -r requirements.txt -r requirements-dev.txt
- name: Lint
run: |
make lint
- name: Test
run: |
make coverage
65 changes: 63 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,65 @@
.idea
.venv
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# C extensions
*.so

# Distribution / packaging
.Python
env/
venv/
.venv/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Editors
\#*
.\#*
.idea
*.bak
15 changes: 15 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# pylint config
[FORMAT]
good-names=s,r,e
[MESSAGES CONTROL]
disable=fixme,
invalid-name,
consider-using-f-string,
missing-module-docstring,
too-many-instance-attributes,
too-many-arguments,
too-many-branches,
too-many-locals,
too-many-statements,
redefined-outer-name,
no-member,
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.PHONY: lint test coverage

lint:
python -m pylint check_sensorProbe2plus.py
test:
python -m unittest -v test_check_sensorProbe2plus.py
coverage:
python -m coverage run -m unittest -b test_check_sensorProbe2plus.py
python -m coverage report -m --include check_sensorProbe2plus.py
40 changes: 16 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,27 @@
## check_sensorProbe2plus ##

### Description ###
# check_sensorProbe2plus

This plugin serves the purpose of receiving data from the SensorProbe2+ and checking its state.


### Dependencies ###
## Dependencies

+ [PySNMP](https://github.com/etingof/pysnmp)
+ [enum34](https://pypi.org/project/enum34)

### Usage ###
## Usage

```
check_sensorProbe2plus.py -H -C [-p] [-V] [-v] [-h]
```
usage: check_sensorProbe2plus.py [-h] [-V] [-v] [-p PORT] -H HOSTNAME -C COMMUNITY

#### required arguments: ####
Check plugin for AKCP SensorProbe2+

+ **HOSTNAME:** host of the SensorProbe2+
`` -H, --hostname ``
+ **COMMUNITY:** read community of the SensorProbe2+
`` -C, --community ``
options:
-h, --help show this help message and exit
-V, --version
-v, --verbose increase output verbosity (-v or -vv)
-p, --port PORT port of the sensors to check (shows all if not set)

#### optional arguments: ####

+ **HELP** show the help message and exit
`` -h, --help ``
+ **VERSION** shows the current version of the check plugin
`` -V, --version ``
+ **VERBOSE** increases output verbosity (-v or -vv)
`` -v, --verbose ``
+ **PORT** port of the sensor to check (shows all if not set)
`` -p, --port ``
required arguments:
-H, --hostname HOSTNAME
host of the sensor probe
-C, --community COMMUNITY
read community of the sensor probe
```
Loading