Skip to content

Commit d5da8c3

Browse files
authored
fix tox and continuous integration (#609)
1 parent bfc57d4 commit d5da8c3

File tree

7 files changed

+19
-29
lines changed

7 files changed

+19
-29
lines changed

docs/installation.rst

+1-6
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,7 @@ or
1111

1212
::
1313

14-
$ python setup.py install
15-
16-
and
17-
::
18-
19-
$ pip install -r requirements.txt
14+
$ pip install .
2015

2116
This installs the *canmatrix* package into your python installation.
2217
In addition to the *canmatrix* package there are 2 scripts installed with this package:

requirements.test.txt

-2
This file was deleted.

requirements.txt

-12
This file was deleted.

setup.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
maintainer = "Eduard Broecker",
7373
maintainer_email = "[email protected]",
7474
url = "http://github.com/ebroecker/canmatrix",
75-
classifiers = filter(None, classifiers.split("\n")),
75+
classifiers = list(filter(None, classifiers.split("\n"))),
7676
description = doclines[0],
7777
keywords = "CAN dbc arxml kcd dbf sym",
7878
long_description = "\n".join(doclines[2:]),
@@ -88,13 +88,18 @@
8888
],
8989
extras_require = {
9090
"arxml": ["lxml"],
91+
"csv": [],
9192
"dbc": [],
9293
"dbf": [],
9394
"fibex": ["lxml"],
9495
"json": [],
9596
"kcd": ["lxml"],
97+
"ldf": ["ldfparser"],
98+
"odx": ["lxml"],
99+
"scapy": [],
96100
"sym": [],
97101
"test": ["pathlib2; python_version < '3.4'", "pytest"],
102+
"wireshark": [],
98103
"xls": ["xlrd", "xlwt"],
99104
"xlsx": ["xlsxwriter"],
100105
"yaml": ["pyyaml"],

src/canmatrix/formats/csv.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def dump(db, file_object, delimiter=',', **options):
228228
signal_row = CsvRow()
229229
signal_row += canmatrix.formats.xls_common.get_frame_info(db, frame)
230230

231-
(front, back) = canmatrix.formats.xls_common.get_signal(db, sig, motorola_bit_format)
231+
(front, back) = canmatrix.formats.xls_common.get_signal(db, frame, sig, motorola_bit_format)
232232
signal_row += front
233233
signal_row += ("s" if sig.is_signed else "u")
234234

src/canmatrix/formats/odx.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import print_function
2+
13
from lxml import etree
24
import canmatrix.formats
35
import decimal
@@ -38,7 +40,7 @@ def get_short_name(self, element):
3840
return short_name.text
3941

4042

41-
def read_param(eo : OdxReader, param, start_byte_pos=0):
43+
def read_param(eo, param, start_byte_pos=0):
4244
return_data = {}
4345
short_name = eo.get_short_name(param)
4446
byte_pos = eo.find("BYTE-POSITION", param)
@@ -80,13 +82,13 @@ def read_param(eo : OdxReader, param, start_byte_pos=0):
8082
return return_data
8183

8284

83-
def find_param(eo: OdxReader, request, param_type):
85+
def find_param(eo, request, param_type):
8486
for param in eo.findall("PARAM", request):
8587
if param.attrib["SEMANTIC"] == param_type:
8688
return param
8789
return None
8890

89-
def decode_compumethod(eo : OdxReader, compu_method, category):
91+
def decode_compumethod(eo, compu_method, category):
9092
compu_info = {}
9193
if category == "TEXTTABLE":
9294
compu_info["type"] = "TEXTTABLE"
@@ -118,7 +120,7 @@ def decode_compumethod(eo : OdxReader, compu_method, category):
118120
return compu_info
119121

120122

121-
def get_struct(eo: OdxReader, struct_name, offset_bit=0):
123+
def get_struct(eo, struct_name, offset_bit=0):
122124
struct = eo.id_links[struct_name]
123125

124126
byte_size = eo.find("BYTE-SIZE", struct)
@@ -161,7 +163,7 @@ def get_struct(eo: OdxReader, struct_name, offset_bit=0):
161163
return data_dict
162164

163165

164-
def get_odx_info(eo: OdxReader, element_type):
166+
def get_odx_info(eo, element_type):
165167
did_infos = {}
166168
for request in eo.findall(element_type):
167169
short_name = eo.get_short_name(request)

tox.ini

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
envlist = py{27,35,36,37,38,39}, pypy{,3}, mypy
33

44
[testenv]
5+
extras =
6+
arxml
7+
test
8+
xls
59
deps=
6-
-r requirements.test.txt
7-
-r requirements.txt
810
coverage
911
pytest-cov
1012
passenv=

0 commit comments

Comments
 (0)