Skip to main content

Disconnect devices with REST calls to IP based Device Disconnector

Project description

Device Disconnector

PyPI Downloads Release Python License: MIT codecov

Disconnect devices with REST calls to IP based Device Disconnector


General

Disconnect devices with REST calls to IP based Device Disconnector

Installation

[<PYTHON> -m] pip[3] install [--user] [--upgrade] device-disconnector

Usage

The following commands turns USB port 3 and Switch pin 1 both on at the Device Disconnector at 192.168.178.50.

control-device \
  192.168.178.50 \
  usb3=on \
  switch1=on \
  -vvvv

Contributing

Setup

For active development you need to have poetry and pre-commit installed

python3 -m pip install --upgrade --user poetry pre-commit
git clone https://github.com/brainelectronics/device-disconnector.git
cd device-disconnector
pre-commit install
poetry install

Testing

# run all tests
poetry run coverage run -m pytest -v

# run only one specific tests
poetry run coverage run -m pytest -v -k "test_parse_bool"

Generate the coverage files with

python create_report_dirs.py
coverage html

The coverage report is placed at reports/coverage/html/index.html

Changelog

The changelog format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Please add a changelog snippet, see below, for every PR you contribute. The changes are categorised into:

  • bugfixes fix an issue which can be used out of the box without any further changes required by the user. Be aware that in some cases bugfixes can be breaking changes.
  • features is used to indicate a backwards compatible change providing improved or extended functionalitiy. This does, as bugfixes, in any case not require any changes by the user to keep the system running after upgrading.
  • breaking creates a breaking, non backwards compatible change which requires the user to perform additional tasks, adopt his currently running code or in general can't be used as is anymore.

The scope of a change shall either be:

  • internal if no new deployment is required for this change, like updates in the documentation for example
  • external or all if this change affects the public API of this package or requires a new tag and deployment for any other reason

The changelog entry shall be short but meaningful and can of course contain links and references to other issues or PRs. New lines are only allowed for a new bulletpoint entry. Usage examples or other code snippets should be placed in the code documentation, README or the docs folder.

The name of the snippet shall be <ISSUE_ID.md>

[poetry run] changelog-generator \
    create .snippets/1.md

Credits

A big thank you to the creators and maintainers of SemVer.org for their documentation and regex example

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

device_disconnector-0.1.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

device_disconnector-0.1.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file device_disconnector-0.1.0.tar.gz.

File metadata

  • Download URL: device_disconnector-0.1.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for device_disconnector-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a281c53c7b59942cf1440b1320a3bbd486268d11fd2cadd56219695c4d7ef18a
MD5 89510d8e50dc9df5ded23ab7faf0f2f7
BLAKE2b-256 f7b1b579935634f6c9d1c5069ea7e78b0be2a7d346877555328b6250ebf7659e

See more details on using hashes here.

File details

Details for the file device_disconnector-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for device_disconnector-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9ad5f45582dd1d736e17ffd0d4555fa078ca29c9b7602aabb4c009682cbee199
MD5 3975ca485d17078e66d53a8a289392bc
BLAKE2b-256 d32dbf3e24b3babc7ad9bf1254973007ffc70c198fa0fba22abec294275ec012

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page