Skip to content

Commit

Permalink
Merge pull request #1260 from hardbyte/release/4.0.0
Browse files Browse the repository at this point in the history
Release/4.0.0
  • Loading branch information
hardbyte authored Feb 18, 2022
2 parents ab793f6 + 1fd5228 commit 485e71a
Show file tree
Hide file tree
Showing 211 changed files with 24,140 additions and 7,248 deletions.
31 changes: 0 additions & 31 deletions .appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Validate with curl --data-binary @.codecov.yml https://codecov.io/validate
codecov:
archive:
uploads: no
uploads: yes

coverage:
precision: 2
Expand Down
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

### Describe the bug
<!-- A clear and concise description of what the bug is. -->


### To Reproduce
<!-- Steps to reproduce the behavior. Please add longer code examples below. -->


### Expected behavior
<!-- A clear and concise description of what you expected to happen. -->


### Additional context

OS and version:
Python version:
python-can version:
python-can interface/s (if applicable):

<!-- Add any other context about the problem here. -->

<details><summary>Traceback and logs</summary>
<!-- Has to be followed by an empty line! -->

<!-- More details such as a minimal script to demonstrate the bug, relevant logs and any tracebacks go here. -->

<!-- Code examples can be included: -->
```python
def func():
return "hello, world!"
```
</details>
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: 'enhancement'
assignees: ''

---

### Is your feature request related to a problem? Please describe.
<!-- A clear and concise description of what the problem is. Ex.: I'm always frustrated when [...] -->

### Describe the solution you'd like
<!-- A clear and concise description of what you want to happen. -->

### Describe alternatives you've considered
<!-- A clear and concise description of any alternative solutions or features you've considered. -->

### Additional context
<!-- Add any other context or screenshots about the feature request here. -->
90 changes: 90 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Tests

on: [push, pull_request]

env:
PY_COLORS: "1"

jobs:
test:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }} # See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idcontinue-on-error
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
experimental: [false]
python-version: ["3.7", "3.8", "3.9", "3.10", "pypy-3.7", "pypy-3.8"]
# Do not test on Python 3.11 pre-releases since wrapt causes problems: https://github.com/GrahamDumpleton/wrapt/issues/196
# include:
# Only test on a single configuration while there are just pre-releases
# - os: ubuntu-latest
# experimental: true
# python-version: "3.11.0-alpha.3"
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Test with pytest via tox
run: |
tox -e gh
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true

static-code-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -r requirements-lint.txt
- name: mypy 3.7
run: |
mypy --python-version 3.7 .
- name: mypy 3.8
run: |
mypy --python-version 3.8 .
- name: mypy 3.9
run: |
mypy --python-version 3.9 .
- name: mypy 3.10
run: |
mypy --python-version 3.10 .
- name: pylint
run: |
pylint --rcfile=.pylintrc \
can/**.py \
setup.py \
doc.conf \
scripts/**.py \
examples/**.py
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-lint.txt
- name: Code Format Check with Black
run: |
black --check --verbose .
29 changes: 29 additions & 0 deletions .github/workflows/format-code.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Format Code

on:
push:
paths:
- '**.py'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-lint.txt
- name: Code Format Check with Black
run: |
black --verbose .
- name: Commit Formated Code
uses: EndBug/add-and-commit@v7
with:
message: "Format code with black"
# Ref https://git-scm.com/docs/git-add#_examples
add: './*.py'
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
test/__tempdir__/
.pytest_cache/
.mypy_cache/
.dmypy.json
dmypy.json

# -------------------------
# below: https://github.com/github/gitignore/blob/da00310ccba9de9a988cc973ef5238ad2c1460e9/Python.gitignore
Expand Down
25 changes: 25 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
queue_rules:
- name: default
conditions:
- "status-success=test" # "GitHub Actions works slightly differently [...], only the job name is used."
- "status-success=format"

pull_request_rules:
- name: Automatic merge passing PR on up to date branch with approving CR
conditions:
- "base=develop"
- "#approved-reviews-by>=1"
- "#review-requested=0"
- "#changes-requested-reviews-by=0"
- "status-success=test"
- "status-success=format"
- "label!=work-in-progress"
actions:
queue:
name: default

- name: Delete head branch after merge
conditions:
- merged
actions:
delete_head_branch: {}
Loading

0 comments on commit 485e71a

Please sign in to comment.