Skip to main content

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
poetry run coverage run -m pytest -v --cov-report=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

Metadata

Release files for device-disconnector 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for device-disconnector 0.2.0
File Size Uploaded
device_disconnector-0.2.0.tar.gz 6.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for device-disconnector 0.2.0
File Interpreter ABI Platform
device_disconnector-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.9 kB

Release files / device_disconnector-0.2.0.tar.gz

Download URL device_disconnector-0.2.0.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
639ae29200316327a7d48b7dd73078a5dc7d37727d9a28f7c3a91b54f12826de
BLAKE2b-256 checksum
How to use checksums
4343b14651a226edb3a346151a4ca7aa4a9c425608df767a40410f4bbabe33f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Release files / device_disconnector-0.2.0-py3-none-any.whl

Download URL device_disconnector-0.2.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
77c5aa786b027a6112f4be39ed0bfa0b424bf876dba1137eea84def4a22fc53f
BLAKE2b-256 checksum
How to use checksums
629dcc7acf6d5428473d2950722a4f9e06df9d79dba1578a71418ca174851861
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page