Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix tox and continuous integration #609

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
7 changes: 1 addition & 6 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@ or

::

$ python setup.py install

and
::

$ pip install -r requirements.txt
$ pip install .

This installs the *canmatrix* package into your python installation.
In addition to the *canmatrix* package there are 2 scripts installed with this package:
Expand Down
2 changes: 0 additions & 2 deletions requirements.test.txt

This file was deleted.

12 changes: 0 additions & 12 deletions requirements.txt

This file was deleted.

7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
maintainer = "Eduard Broecker",
maintainer_email = "eduard@gmx.de",
url = "http://github.com/ebroecker/canmatrix",
classifiers = filter(None, classifiers.split("\n")),
classifiers = list(filter(None, classifiers.split("\n"))),
description = doclines[0],
keywords = "CAN dbc arxml kcd dbf sym",
long_description = "\n".join(doclines[2:]),
Expand All @@ -88,13 +88,18 @@
],
extras_require = {
"arxml": ["lxml"],
"csv": [],
"dbc": [],
"dbf": [],
"fibex": ["lxml"],
"json": [],
"kcd": ["lxml"],
"ldf": ["ldfparser"],
"odx": ["lxml"],
"scapy": [],
"sym": [],
"test": ["pathlib2; python_version < '3.4'", "pytest"],
"wireshark": [],
"xls": ["xlrd", "xlwt"],
"xlsx": ["xlsxwriter"],
"yaml": ["pyyaml"],
Expand Down
2 changes: 1 addition & 1 deletion src/canmatrix/formats/csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def dump(db, file_object, delimiter=',', **options):
signal_row = CsvRow()
signal_row += canmatrix.formats.xls_common.get_frame_info(db, frame)

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

Expand Down
12 changes: 7 additions & 5 deletions src/canmatrix/formats/odx.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import print_function

from lxml import etree
import canmatrix.formats
import decimal
Expand Down Expand Up @@ -38,7 +40,7 @@ def get_short_name(self, element):
return short_name.text


def read_param(eo : OdxReader, param, start_byte_pos=0):
def read_param(eo, param, start_byte_pos=0):
return_data = {}
short_name = eo.get_short_name(param)
byte_pos = eo.find("BYTE-POSITION", param)
Expand Down Expand Up @@ -80,13 +82,13 @@ def read_param(eo : OdxReader, param, start_byte_pos=0):
return return_data


def find_param(eo: OdxReader, request, param_type):
def find_param(eo, request, param_type):
for param in eo.findall("PARAM", request):
if param.attrib["SEMANTIC"] == param_type:
return param
return None

def decode_compumethod(eo : OdxReader, compu_method, category):
def decode_compumethod(eo, compu_method, category):
compu_info = {}
if category == "TEXTTABLE":
compu_info["type"] = "TEXTTABLE"
Expand Down Expand Up @@ -118,7 +120,7 @@ def decode_compumethod(eo : OdxReader, compu_method, category):
return compu_info


def get_struct(eo: OdxReader, struct_name, offset_bit=0):
def get_struct(eo, struct_name, offset_bit=0):
struct = eo.id_links[struct_name]

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


def get_odx_info(eo: OdxReader, element_type):
def get_odx_info(eo, element_type):
did_infos = {}
for request in eo.findall(element_type):
short_name = eo.get_short_name(request)
Expand Down
6 changes: 4 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
envlist = py{27,35,36,37,38,39}, pypy{,3}, mypy

[testenv]
extras =
arxml
test
xls
deps=
-r requirements.test.txt
-r requirements.txt
coverage
pytest-cov
passenv=
Expand Down