Skip to content

Commit c513e94

Browse files
committed
2 parents ed99758 + 17714bf commit c513e94

File tree

6 files changed

+45
-195
lines changed

6 files changed

+45
-195
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -10,68 +10,5 @@ jobs:
1010
test:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: Dump GitHub context
14-
env:
15-
GITHUB_CONTEXT: ${{ toJson(github) }}
16-
run: echo "$GITHUB_CONTEXT"
17-
- name: Translate Repo Name For Build Tools filename_prefix
18-
id: repo-name
19-
run: |
20-
echo ::set-output name=repo-name::$(
21-
echo ${{ github.repository }} |
22-
awk -F '\/' '{ print tolower($2) }' |
23-
tr '_' '-'
24-
)
25-
- name: Set up Python 3.x
26-
uses: actions/setup-python@v2
27-
with:
28-
python-version: "3.x"
29-
- name: Versions
30-
run: |
31-
python3 --version
32-
- name: Checkout Current Repo
33-
uses: actions/checkout@v1
34-
with:
35-
submodules: true
36-
- name: Checkout tools repo
37-
uses: actions/checkout@v2
38-
with:
39-
repository: adafruit/actions-ci-circuitpython-libs
40-
path: actions-ci
41-
- name: Install dependencies
42-
# (e.g. - apt-get: gettext, etc; pip: circuitpython-build-tools, requirements.txt; etc.)
43-
run: |
44-
source actions-ci/install.sh
45-
- name: Pip install Sphinx, pre-commit
46-
run: |
47-
pip install --force-reinstall Sphinx sphinx-rtd-theme pre-commit
48-
- name: Library version
49-
run: git describe --dirty --always --tags
50-
- name: Setup problem matchers
51-
uses: adafruit/circuitpython-action-library-ci-problem-matchers@v1
52-
- name: Pre-commit hooks
53-
run: |
54-
pre-commit run --all-files
55-
- name: Build assets
56-
run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location .
57-
- name: Archive bundles
58-
uses: actions/upload-artifact@v2
59-
with:
60-
name: bundles
61-
path: ${{ github.workspace }}/bundles/
62-
- name: Build docs
63-
working-directory: docs
64-
run: sphinx-build -E -W -b html . _build/html
65-
- name: Check For pyproject.toml
66-
id: need-pypi
67-
run: |
68-
echo ::set-output name=pyproject-toml::$( find . -wholename './pyproject.toml' )
69-
- name: Build Python package
70-
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
71-
run: |
72-
pip install --upgrade build twine
73-
for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do
74-
sed -i -e "s/0.0.0+auto.0/1.2.3/" $file;
75-
done;
76-
python -m build
77-
twine check dist/*
13+
- name: Run Build CI workflow
14+
uses: adafruit/workflows-circuitpython-libs/build@main

.github/workflows/release.yml

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

.github/workflows/release_gh.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
name: GitHub Release Actions
6+
7+
on:
8+
release:
9+
types: [published]
10+
11+
jobs:
12+
upload-release-assets:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Run GitHub Release CI workflow
16+
uses: adafruit/workflows-circuitpython-libs/release-gh@main
17+
with:
18+
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release_pypi.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
name: PyPI Release Actions
6+
7+
on:
8+
release:
9+
types: [published]
10+
11+
jobs:
12+
upload-release-assets:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Run PyPI Release CI workflow
16+
uses: adafruit/workflows-circuitpython-libs/release-pypi@main
17+
with:
18+
pypi-username: ${{ secrets.pypi_username }}
19+
pypi-password: ${{ secrets.pypi_password }}

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repos:
1818
- id: end-of-file-fixer
1919
- id: trailing-whitespace
2020
- repo: https://github.com/pycqa/pylint
21-
rev: v2.11.1
21+
rev: v2.15.5
2222
hooks:
2323
- id: pylint
2424
name: pylint (library code)

.pylintrc

Lines changed: 5 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
1+
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
22
#
33
# SPDX-License-Identifier: Unlicense
4+
45
[MASTER]
56

67
# A comma-separated list of package or module names from where C extensions may
@@ -25,7 +26,7 @@ jobs=1
2526

2627
# List of plugins (as comma separated values of python modules names) to load,
2728
# usually to register additional checkers.
28-
load-plugins=
29+
load-plugins=pylint.extensions.no_self_use
2930

3031
# Pickle collected data for later comparisons.
3132
persistent=yes
@@ -53,8 +54,8 @@ confidence=
5354
# --enable=similarities". If you want to run only the classes checker, but have
5455
# no Warning level messages displayed, use"--disable=all --enable=classes
5556
# --disable=W"
56-
# disable=import-error,print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call
57-
disable=print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call,import-error,bad-continuation,unspecified-encoding
57+
# disable=import-error,raw-checker-failed,bad-inline-option,locally-disabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,deprecated-str-translate-call
58+
disable=raw-checker-failed,bad-inline-option,locally-disabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,import-error,pointless-string-statement,unspecified-encoding
5859

5960
# Enable the message, report, category or checker with the given id(s). You can
6061
# either give multiple identifier separated by comma (,) or put this option
@@ -224,12 +225,6 @@ max-line-length=100
224225
# Maximum number of lines in a module
225226
max-module-lines=1000
226227

227-
# List of optional constructs for which whitespace checking is disabled. `dict-
228-
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
229-
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
230-
# `empty-line` allows space-only lines.
231-
no-space-check=trailing-comma,dict-separator
232-
233228
# Allow the body of a class to be on the same line as the declaration if body
234229
# contains single statement.
235230
single-line-class-stmt=no
@@ -256,48 +251,29 @@ min-similarity-lines=12
256251

257252
[BASIC]
258253

259-
# Naming hint for argument names
260-
argument-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
261-
262254
# Regular expression matching correct argument names
263255
argument-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
264256

265-
# Naming hint for attribute names
266-
attr-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
267-
268257
# Regular expression matching correct attribute names
269258
attr-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
270259

271260
# Bad variable names which should always be refused, separated by a comma
272261
bad-names=foo,bar,baz,toto,tutu,tata
273262

274-
# Naming hint for class attribute names
275-
class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
276-
277263
# Regular expression matching correct class attribute names
278264
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
279265

280-
# Naming hint for class names
281-
# class-name-hint=[A-Z_][a-zA-Z0-9]+$
282-
class-name-hint=[A-Z_][a-zA-Z0-9_]+$
283-
284266
# Regular expression matching correct class names
285267
# class-rgx=[A-Z_][a-zA-Z0-9]+$
286268
class-rgx=[A-Z_][a-zA-Z0-9_]+$
287269

288-
# Naming hint for constant names
289-
const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
290-
291270
# Regular expression matching correct constant names
292271
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
293272

294273
# Minimum line length for functions/classes that require docstrings, shorter
295274
# ones are exempt.
296275
docstring-min-length=-1
297276

298-
# Naming hint for function names
299-
function-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
300-
301277
# Regular expression matching correct function names
302278
function-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
303279

@@ -308,21 +284,12 @@ good-names=r,g,b,w,i,j,k,n,x,y,z,ex,ok,Run,_
308284
# Include a hint for the correct naming format with invalid-name
309285
include-naming-hint=no
310286

311-
# Naming hint for inline iteration names
312-
inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
313-
314287
# Regular expression matching correct inline iteration names
315288
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
316289

317-
# Naming hint for method names
318-
method-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
319-
320290
# Regular expression matching correct method names
321291
method-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
322292

323-
# Naming hint for module names
324-
module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
325-
326293
# Regular expression matching correct module names
327294
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
328295

@@ -338,9 +305,6 @@ no-docstring-rgx=^_
338305
# to this list to register other decorators that produce valid properties.
339306
property-classes=abc.abstractproperty
340307

341-
# Naming hint for variable names
342-
variable-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
343-
344308
# Regular expression matching correct variable names
345309
variable-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
346310

0 commit comments

Comments
 (0)