Skip to content

Commit d976e27

Browse files
authored
Merge pull request #840 from ebroecker/development
prepare release 1.1
2 parents 12ae5c7 + caf4fc2 commit d976e27

File tree

159 files changed

+4350
-3242
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+4350
-3242
lines changed

Diff for: .github/workflows/ci.yml

+152
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
name: Tests
2+
3+
on:
4+
release:
5+
types: [ published ]
6+
pull_request:
7+
push:
8+
9+
env:
10+
PY_COLORS: "1"
11+
12+
jobs:
13+
test:
14+
runs-on: ${{ matrix.os }}
15+
continue-on-error: ${{ matrix.experimental }} # See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idcontinue-on-error
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest, windows-latest]
19+
# os: [ubuntu-latest]
20+
experimental: [false]
21+
# python-version: ["2.7","3.4","3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12"]
22+
python-version: ["3.8","3.9","3.10","3.11","3.12"]
23+
fail-fast: false
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@v4
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
- name: Install dependencies
31+
run: |
32+
python -m pip install --upgrade pip
33+
pip install tox
34+
- name: Test with pytest via tox
35+
run: |
36+
tox -e gh
37+
- name: Coveralls
38+
uses: coverallsapp/[email protected]
39+
with:
40+
github-token: ${{ secrets.github_token }}
41+
flag-name: Test_${{ matrix.os }}_${{ matrix.python-version }}
42+
parallel: true
43+
path-to-lcov: ./coverage.lcov
44+
45+
coveralls:
46+
needs: test
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Coveralls Finished
50+
uses: coverallsapp/[email protected]
51+
with:
52+
github-token: ${{ secrets.github_token }}
53+
parallel-finished: true
54+
55+
# static-code-analysis:
56+
# runs-on: ubuntu-latest
57+
# steps:
58+
# - uses: actions/checkout@v3
59+
# - name: Set up Python
60+
# uses: actions/setup-python@v4
61+
# with:
62+
# python-version: "3.10"
63+
# - name: Install dependencies
64+
# run: |
65+
# python -m pip install --upgrade pip
66+
# pip install -e .[lint]
67+
# - name: ruff
68+
# run: |
69+
# ruff check can
70+
# - name: pylint
71+
# run: |
72+
# pylint \
73+
# src/**.py \
74+
# can/io \
75+
# doc/conf.py \
76+
# examples/**.py \
77+
78+
# format:
79+
# runs-on: ubuntu-latest
80+
# steps:
81+
# - uses: actions/checkout@v3
82+
# - name: Set up Python
83+
# uses: actions/setup-python@v4
84+
# with:
85+
# python-version: "3.10"
86+
# - name: Install dependencies
87+
# run: |
88+
# python -m pip install --upgrade pip
89+
# pip install -e .[lint]
90+
# - name: Code Format Check with Black
91+
# run: |
92+
# black --check --verbose .
93+
94+
# docs:
95+
# runs-on: ubuntu-latest
96+
# steps:
97+
# - uses: actions/checkout@v3
98+
# - name: Set up Python
99+
# uses: actions/setup-python@v4
100+
# with:
101+
# python-version: "3.10"
102+
# - name: Install dependencies
103+
# run: |
104+
# python -m pip install --upgrade pip
105+
# pip install -e .[canalystii,gs_usb,mf4]
106+
# pip install -r doc/doc-requirements.txt
107+
# - name: Build documentation
108+
# run: |
109+
# python -m sphinx -Wan --keep-going doc build
110+
# - name: Run doctest
111+
# run: |
112+
# python -m sphinx -b doctest -W --keep-going doc build
113+
# - uses: actions/upload-artifact@v3
114+
# with:
115+
# name: sphinx-out
116+
# path: ./build/
117+
# retention-days: 5
118+
119+
build:
120+
runs-on: ubuntu-latest
121+
steps:
122+
- uses: actions/checkout@v3
123+
- name: Set up Python
124+
uses: actions/setup-python@v4
125+
with:
126+
python-version: "3.10"
127+
- name: Build wheel and sdist
128+
run: pipx run build
129+
- name: Check build artifacts
130+
run: pipx run twine check --strict dist/*
131+
- name: Save artifacts
132+
uses: actions/upload-artifact@v3
133+
with:
134+
name: python-can-dist
135+
path: ./dist
136+
137+
upload_pypi:
138+
needs: [build]
139+
runs-on: ubuntu-latest
140+
141+
# upload to PyPI only on release
142+
if: github.event.release && github.event.action == 'published'
143+
steps:
144+
- uses: actions/[email protected]
145+
with:
146+
name: python-can-dist
147+
path: dist
148+
149+
- uses: pypa/[email protected]
150+
with:
151+
user: __token__
152+
password: ${{ secrets.PYPI_API_TOKEN }}

Diff for: appveyor.yml

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ skip_branch_with_pr: true
77

88
environment:
99
matrix:
10-
- TOXENV: py37
1110
- TOXENV: py38
1211
- TOXENV: py39
1312
- TOXENV: py310

Diff for: cmTemplate.xlsx

-10.4 KB
Binary file not shown.

Diff for: examples/BusmasterRestbus.py

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
2020
# DAMAGE.
2121

22-
from __future__ import division
2322
import math
2423
from struct import *
2524
import zipfile

Diff for: examples/j1939_test.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import canmatrix.formats
2+
3+
my_matrix = canmatrix.formats.loadp_flat(r"C:\Users\edu\Downloads\obd2-test\CSS-Electronics-OBD2-incl-extended-v2.0.dbc")
4+
5+
for num, frame in enumerate(my_matrix.frames):
6+
print(f"Frame {num}: {frame}")
7+
print(f" is j1939: {frame.is_j1939}")
8+
print(f" id: {frame.arbitration_id}")
9+
print(f' Format: {frame.attributes["VFrameFormat"]}')
10+
if frame.is_j1939:
11+
print(f" pgn: {hex(frame.arbitration_id.pgn)}")

Diff for: mypy.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ ignore_errors = True
3434
ignore_errors = True
3535

3636
# other settings:
37-
[mypy-xlsxwriter,past,past.builtins,pathlib2]
37+
[mypy-xlsxwriter,pathlib2]
3838
ignore_missing_imports = True

Diff for: requirements_docs.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
lxml
2+
ldfparser
3+
xlrd
4+
xlwt
5+
openpyxl
6+
pyyaml

Diff for: setup.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
License :: OSI Approved :: BSD License
6262
Topic :: Scientific/Engineering
6363
Programming Language :: Python
64-
Programming Language :: Python :: 2.7
6564
Programming Language :: Python :: 3.4
6665
Programming Language :: Python :: 3.5
6766
Programming Language :: Python :: 3.6
@@ -82,6 +81,7 @@
8281
name = "canmatrix",
8382
version = versioneer.get_version(),
8483
cmdclass = versioneer.get_cmdclass(),
84+
long_description_content_type='text/x-rst',
8585
maintainer = "Eduard Broecker",
8686
maintainer_email = "[email protected]",
8787
url = "http://github.com/ebroecker/canmatrix",
@@ -94,10 +94,7 @@
9494
install_requires = [
9595
"attrs>=19.2.0",
9696
"click",
97-
"enum34; python_version < '3.4'",
98-
"future",
9997
"importlib-metadata; python_version < '3.8'",
100-
"six",
10198
"typing; python_version < '3.5'",
10299
],
103100
extras_require = {
@@ -114,9 +111,10 @@
114111
"sym": [],
115112
"test": ["pathlib2; python_version < '3.4'", "pytest"],
116113
"wireshark": [],
117-
"xls": ["xlrd", "xlwt"],
118-
"xlsx": ["xlsxwriter"],
114+
"xls": ["xlrd==1.2.0", "xlwt"],
115+
"xlsx": ["openpyxl"],
119116
"yaml": ["pyyaml"],
117+
"eds": ["canopen"]
120118
},
121119

122120
packages = find_packages("src"),

Diff for: src/canmatrix/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
from __future__ import absolute_import
32
import logging
43

54
import canmatrix._version

Diff for: src/canmatrix/cancluster.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
from __future__ import absolute_import, division, print_function
32

43
import typing
54
from builtins import *

0 commit comments

Comments
 (0)