Skip to content

Commit 485e71a

Browse files
authored
Merge pull request hardbyte#1260 from hardbyte/release/4.0.0
Release/4.0.0
2 parents ab793f6 + 1fd5228 commit 485e71a

File tree

211 files changed

+24140
-7248
lines changed

Some content is hidden

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

211 files changed

+24140
-7248
lines changed

.appveyor.yml

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

.codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Validate with curl --data-binary @.codecov.yml https://codecov.io/validate
22
codecov:
33
archive:
4-
uploads: no
4+
uploads: yes
55

66
coverage:
77
precision: 2

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
### Describe the bug
11+
<!-- A clear and concise description of what the bug is. -->
12+
13+
14+
### To Reproduce
15+
<!-- Steps to reproduce the behavior. Please add longer code examples below. -->
16+
17+
18+
### Expected behavior
19+
<!-- A clear and concise description of what you expected to happen. -->
20+
21+
22+
### Additional context
23+
24+
OS and version:
25+
Python version:
26+
python-can version:
27+
python-can interface/s (if applicable):
28+
29+
<!-- Add any other context about the problem here. -->
30+
31+
<details><summary>Traceback and logs</summary>
32+
<!-- Has to be followed by an empty line! -->
33+
34+
<!-- More details such as a minimal script to demonstrate the bug, relevant logs and any tracebacks go here. -->
35+
36+
<!-- Code examples can be included: -->
37+
```python
38+
def func():
39+
return "hello, world!"
40+
```
41+
</details>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: 'enhancement'
6+
assignees: ''
7+
8+
---
9+
10+
### Is your feature request related to a problem? Please describe.
11+
<!-- A clear and concise description of what the problem is. Ex.: I'm always frustrated when [...] -->
12+
13+
### Describe the solution you'd like
14+
<!-- A clear and concise description of what you want to happen. -->
15+
16+
### Describe alternatives you've considered
17+
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
18+
19+
### Additional context
20+
<!-- Add any other context or screenshots about the feature request here. -->

.github/workflows/build.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Tests
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
PY_COLORS: "1"
7+
8+
jobs:
9+
test:
10+
runs-on: ${{ matrix.os }}
11+
continue-on-error: ${{ matrix.experimental }} # See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idcontinue-on-error
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, macos-latest, windows-latest]
15+
experimental: [false]
16+
python-version: ["3.7", "3.8", "3.9", "3.10", "pypy-3.7", "pypy-3.8"]
17+
# Do not test on Python 3.11 pre-releases since wrapt causes problems: https://github.com/GrahamDumpleton/wrapt/issues/196
18+
# include:
19+
# Only test on a single configuration while there are just pre-releases
20+
# - os: ubuntu-latest
21+
# experimental: true
22+
# python-version: "3.11.0-alpha.3"
23+
fail-fast: false
24+
steps:
25+
- uses: actions/checkout@v2
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@v2
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: Upload coverage to Codecov
38+
uses: codecov/codecov-action@v2
39+
with:
40+
fail_ci_if_error: true
41+
42+
static-code-analysis:
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v2
46+
- name: Set up Python
47+
uses: actions/setup-python@v2
48+
with:
49+
python-version: "3.10"
50+
- name: Install dependencies
51+
run: |
52+
python -m pip install --upgrade pip
53+
pip install -e .
54+
pip install -r requirements-lint.txt
55+
- name: mypy 3.7
56+
run: |
57+
mypy --python-version 3.7 .
58+
- name: mypy 3.8
59+
run: |
60+
mypy --python-version 3.8 .
61+
- name: mypy 3.9
62+
run: |
63+
mypy --python-version 3.9 .
64+
- name: mypy 3.10
65+
run: |
66+
mypy --python-version 3.10 .
67+
- name: pylint
68+
run: |
69+
pylint --rcfile=.pylintrc \
70+
can/**.py \
71+
setup.py \
72+
doc.conf \
73+
scripts/**.py \
74+
examples/**.py
75+
76+
format:
77+
runs-on: ubuntu-latest
78+
steps:
79+
- uses: actions/checkout@v2
80+
- name: Set up Python
81+
uses: actions/setup-python@v2
82+
with:
83+
python-version: "3.10"
84+
- name: Install dependencies
85+
run: |
86+
python -m pip install --upgrade pip
87+
pip install -r requirements-lint.txt
88+
- name: Code Format Check with Black
89+
run: |
90+
black --check --verbose .

.github/workflows/format-code.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Format Code
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.py'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Python
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: "3.10"
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install -r requirements-lint.txt
21+
- name: Code Format Check with Black
22+
run: |
23+
black --verbose .
24+
- name: Commit Formated Code
25+
uses: EndBug/add-and-commit@v7
26+
with:
27+
message: "Format code with black"
28+
# Ref https://git-scm.com/docs/git-add#_examples
29+
add: './*.py'

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
test/__tempdir__/
22
.pytest_cache/
3+
.mypy_cache/
4+
.dmypy.json
5+
dmypy.json
36

47
# -------------------------
58
# below: https://github.com/github/gitignore/blob/da00310ccba9de9a988cc973ef5238ad2c1460e9/Python.gitignore

.mergify.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
queue_rules:
2+
- name: default
3+
conditions:
4+
- "status-success=test" # "GitHub Actions works slightly differently [...], only the job name is used."
5+
- "status-success=format"
6+
7+
pull_request_rules:
8+
- name: Automatic merge passing PR on up to date branch with approving CR
9+
conditions:
10+
- "base=develop"
11+
- "#approved-reviews-by>=1"
12+
- "#review-requested=0"
13+
- "#changes-requested-reviews-by=0"
14+
- "status-success=test"
15+
- "status-success=format"
16+
- "label!=work-in-progress"
17+
actions:
18+
queue:
19+
name: default
20+
21+
- name: Delete head branch after merge
22+
conditions:
23+
- merged
24+
actions:
25+
delete_head_branch: {}

0 commit comments

Comments
 (0)