Skip to content

Commit 289a889

Browse files
authored
Merge pull request #290 from brendan-w/user/brendan/pyproject.toml
setup.py -> pyproject.toml
2 parents 75a8820 + 3d1beba commit 289a889

File tree

3 files changed

+63
-41
lines changed

3 files changed

+63
-41
lines changed

pyproject.toml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[project]
2+
name = "obd"
3+
version = "0.7.2"
4+
authors = [
5+
{ name="Brendan Whitfield", email="[email protected]" },
6+
{ name="Alistair Francis", email="[email protected]" },
7+
{ name="Paul Bartek" },
8+
{ name="Peter Harris" },
9+
]
10+
description = "Serial module for handling live sensor data from a vehicle's OBD-II port"
11+
readme = "README.md"
12+
requires-python = ">=3.9"
13+
classifiers = [
14+
"Operating System :: POSIX :: Linux",
15+
"Topic :: System :: Monitoring",
16+
"Programming Language :: Python :: 3",
17+
"Programming Language :: Python :: 3.9",
18+
"Programming Language :: Python :: 3.10",
19+
"Programming Language :: Python :: 3.11",
20+
"Programming Language :: Python :: 3.12",
21+
"Programming Language :: Python :: 3.13",
22+
"Development Status :: 3 - Alpha",
23+
"Topic :: System :: Logging",
24+
"Intended Audience :: Developers",
25+
]
26+
keywords = ["obd", "obdii", "obd-ii", "obd2", "car", "serial", "vehicle", "diagnostic"]
27+
dependencies = [
28+
"pyserial==3.*",
29+
"pint==0.24.*",
30+
]
31+
license = "GPL-2.0-only"
32+
license-files = ["LICENSE"]
33+
34+
[project.urls]
35+
Homepage = "https://github.com/brendan-w/python-OBD"
36+
Issues = "https://github.com/brendan-w/python-OBD/issues"

setup.py

Lines changed: 0 additions & 38 deletions
This file was deleted.

tests/README.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,34 @@
11
Testing
22
=======
33

4-
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.
4+
To test python-OBD, you will need to install `pytest` and the `obd` module from your local tree (preferably in a virtualenv) by running:
55

6-
To run all tests, run the following command:
6+
```bash
7+
pip install pytest
8+
pip install build
9+
python -m build
10+
pip install ./dist/obd-0.7.2.tar.gz
11+
```
712

8-
$ py.test --port=/dev/pts/<num>
13+
To run all basic python-only unit tests, run:
14+
15+
```bash
16+
py.test
17+
```
18+
19+
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.
20+
21+
- Download `obdgpslogger`: https://icculus.org/obdgpslogger/downloads/obdgpslogger-0.16.tar.gz
22+
- Run the following build commands:
23+
```bash
24+
mkdir build
25+
cd build
26+
cmake ..
27+
make obdsim
28+
```
29+
- Start `./bin/obdsim`, note the `SimPort name: /dev/pts/<num>` that it creates. Pass this pseudoterminal path as an argument to py.test:
30+
```bash
31+
py.test --port=/dev/pts/<num>
32+
```
933

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

0 commit comments

Comments
 (0)