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
36 changes: 36 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[project]
name = "obd"
version = "0.7.2"
authors = [
{ name="Brendan Whitfield", email="me@brendan-w.com" },
{ name="Alistair Francis", email="alistair@alistair23.me" },
{ name="Paul Bartek" },
{ name="Peter Harris" },
]
description = "Serial module for handling live sensor data from a vehicle's OBD-II port"
readme = "README.md"
requires-python = ">=3.9"
classifiers = [
"Operating System :: POSIX :: Linux",
"Topic :: System :: Monitoring",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Development Status :: 3 - Alpha",
"Topic :: System :: Logging",
"Intended Audience :: Developers",
]
keywords = ["obd", "obdii", "obd-ii", "obd2", "car", "serial", "vehicle", "diagnostic"]
dependencies = [
"pyserial==3.*",
"pint==0.24.*",
]
license = "GPL-2.0-only"
license-files = ["LICENSE"]

[project.urls]
Homepage = "https://github.com/brendan-w/python-OBD"
Issues = "https://github.com/brendan-w/python-OBD/issues"
38 changes: 0 additions & 38 deletions setup.py

This file was deleted.

30 changes: 27 additions & 3 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,34 @@
Testing
=======

To test python-OBD, you will need to `pip install pytest` and install the module (preferably in a virtualenv) by running `python setup.py install`. The end-to-end tests will also require [obdsim](http://icculus.org/obdgpslogger/obdsim.html) to be running in the background. When starting obdsim, note the "SimPort name" that it creates, and pass it as an argument to py.test.
To test python-OBD, you will need to install `pytest` and the `obd` module from your local tree (preferably in a virtualenv) by running:

To run all tests, run the following command:
```bash
pip install pytest
pip install build
python -m build
pip install ./dist/obd-0.7.2.tar.gz
```

$ py.test --port=/dev/pts/<num>
To run all basic python-only unit tests, run:

```bash
py.test
```

This directory also contains a set of end-to-end tests that require [obdsim](http://icculus.org/obdgpslogger/obdsim.html) to be running in the background. These tests are skipped by default, but can be activated by passing the `--port` flag.

- Download `obdgpslogger`: https://icculus.org/obdgpslogger/downloads/obdgpslogger-0.16.tar.gz
- Run the following build commands:
```bash
mkdir build
cd build
cmake ..
make obdsim
```
- Start `./bin/obdsim`, note the `SimPort name: /dev/pts/<num>` that it creates. Pass this pseudoterminal path as an argument to py.test:
```bash
py.test --port=/dev/pts/<num>
```

For more information on pytest with virtualenvs, [read more here](https://pytest.org/dev/goodpractises.html)
Loading