Skip to content

Commit 82cb221

Browse files
authored
Merge branch 'master' into multi
2 parents a3e4f27 + 51f4ddf commit 82cb221

20 files changed

+536
-52
lines changed

.github/workflows/build.yml

+24-8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
4+
15
name: Build CI
26

37
on: [pull_request, push]
@@ -38,20 +42,32 @@ jobs:
3842
# (e.g. - apt-get: gettext, etc; pip: circuitpython-build-tools, requirements.txt; etc.)
3943
run: |
4044
source actions-ci/install.sh
41-
- name: Pip install pylint, black, & Sphinx
45+
- name: Pip install pylint, Sphinx, pre-commit
4246
run: |
43-
pip install --force-reinstall pylint black==19.10b0 Sphinx sphinx-rtd-theme
47+
pip install --force-reinstall pylint Sphinx sphinx-rtd-theme pre-commit
4448
- name: Library version
4549
run: git describe --dirty --always --tags
46-
- name: Check formatting
47-
run: |
48-
black --check --target-version=py35 .
49-
- name: PyLint
50+
- name: Pre-commit hooks
5051
run: |
51-
pylint $( find . -path './adafruit*.py' )
52-
([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace $( find . -path "./examples/*.py" ))
52+
pre-commit run --all-files
5353
- name: Build assets
5454
run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location .
55+
- name: Archive bundles
56+
uses: actions/upload-artifact@v2
57+
with:
58+
name: bundles
59+
path: ${{ github.workspace }}/bundles/
5560
- name: Build docs
5661
working-directory: docs
5762
run: sphinx-build -E -W -b html . _build/html
63+
- name: Check For setup.py
64+
id: need-pypi
65+
run: |
66+
echo ::set-output name=setup-py::$( find . -wholename './setup.py' )
67+
- name: Build Python package
68+
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
69+
run: |
70+
pip install --upgrade setuptools wheel twine readme_renderer testresources
71+
python setup.py sdist
72+
python setup.py bdist_wheel --universal
73+
twine check dist/*

.github/workflows/release.yml

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
4+
15
name: Release Actions
26

37
on:

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
15
*.mpy
26
.idea
37
*.idea.py

.pre-commit-config.yaml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# SPDX-FileCopyrightText: 2020 Diego Elio Pettenò
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
5+
repos:
6+
- repo: https://github.com/python/black
7+
rev: 20.8b1
8+
hooks:
9+
- id: black
10+
- repo: https://github.com/fsfe/reuse-tool
11+
rev: v0.12.1
12+
hooks:
13+
- id: reuse
14+
- repo: https://github.com/pre-commit/pre-commit-hooks
15+
rev: v2.3.0
16+
hooks:
17+
- id: check-yaml
18+
- id: end-of-file-fixer
19+
- id: trailing-whitespace
20+
- repo: https://github.com/pycqa/pylint
21+
rev: pylint-2.7.1
22+
hooks:
23+
- id: pylint
24+
name: pylint (library code)
25+
types: [python]
26+
exclude: "^(docs/|examples/|setup.py$)"
27+
- repo: local
28+
hooks:
29+
- id: pylint_examples
30+
name: pylint (examples code)
31+
description: Run pylint rules on "examples/*.py" files
32+
entry: /usr/bin/env bash -c
33+
args: ['([[ ! -d "examples" ]] || for example in $(find . -path "./examples/*.py"); do pylint --disable=missing-docstring,invalid-name $example; done)']
34+
language: system

.pylintrc

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
15
[MASTER]
26

37
# A comma-separated list of package or module names from where C extensions may
@@ -18,8 +22,7 @@ ignore-patterns=
1822
#init-hook=
1923

2024
# Use multiple processes to speed up Pylint.
21-
# jobs=1
22-
jobs=2
25+
jobs=1
2326

2427
# List of plugins (as comma separated values of python modules names) to load,
2528
# usually to register additional checkers.
@@ -246,10 +249,10 @@ ignore-comments=yes
246249
ignore-docstrings=yes
247250

248251
# Ignore imports when computing similarities.
249-
ignore-imports=no
252+
ignore-imports=yes
250253

251254
# Minimum lines number of a similarity.
252-
min-similarity-lines=4
255+
min-similarity-lines=12
253256

254257

255258
[BASIC]

.readthedocs.yml

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
15
python:
26
version: 3
37
requirements_file: requirements.txt

CODE_OF_CONDUCT.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2014 Coraline Ada Ehmke
3+
SPDX-FileCopyrightText: 2019 Kattni Rembor for Adafruit Industries
4+
SPDX-License-Identifier: CC-BY-4.0
5+
-->
6+
17
# Adafruit Community Code of Conduct
28

39
## Our Pledge
@@ -43,7 +49,7 @@ Examples of unacceptable behavior by participants include:
4349

4450
The goal of the standards and moderation guidelines outlined here is to build
4551
and maintain a respectful community. We ask that you don’t just aim to be
46-
"technically unimpeachable", but rather try to be your best self.
52+
"technically unimpeachable", but rather try to be your best self.
4753

4854
We value many things beyond technical expertise, including collaboration and
4955
supporting others within our community. Providing a positive experience for
@@ -74,9 +80,9 @@ You may report in the following ways:
7480
In any situation, you may send an email to <[email protected]>.
7581

7682
On the Adafruit Discord, you may send an open message from any channel
77-
to all Community Moderators by tagging @community moderators. You may
78-
also send an open message from any channel, or a direct message to
79-
@kattni#1507, @tannewt#4653, @Dan Halbert#1614, @cater#2442,
83+
to all Community Moderators by tagging @community moderators. You may
84+
also send an open message from any channel, or a direct message to
85+
@kattni#1507, @tannewt#4653, @Dan Halbert#1614, @cater#2442,
8086
@sommersoft#0222, @Mr. Certainly#0472 or @Andon#8175.
8187

8288
Email and direct message reports will be kept confidential.

0 commit comments

Comments
 (0)