Skip to content

Commit d85f652

Browse files
authored
Merge pull request #6 from fourstix/b_new_build
Updated code files and yaml scripts for new build
2 parents 76ef719 + 271f1bc commit d85f652

32 files changed

+737
-239
lines changed

.gitignore

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1+
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
15
*.mpy
26
.idea
37
__pycache__
48
_build
59
*.pyc
610
.env
7-
build*
11+
.python-version
12+
build*/
813
bundles
914
*.DS_Store
1015
.eggs
1116
dist
12-
**/*.egg-info
17+
**/*.egg-info
18+
.vscode

.pre-commit-config.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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/|tests/|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,consider-using-f-string $example; done)']
34+
language: system
35+
- id: pylint_tests
36+
name: pylint (tests code)
37+
description: Run pylint rules on "tests/*.py" files
38+
entry: /usr/bin/env bash -c
39+
args: ['([[ ! -d "tests" ]] || for test in $(find . -path "./tests/*.py"); do pylint --disable=missing-docstring $test; done)']
40+
language: system

.pylintrc

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1+
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written 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
48
# be loaded. Extensions are loading into the active Python interpreter and may
59
# run arbitrary code
610
extension-pkg-whitelist=
711

8-
# Add files or directories to the blacklist. They should be base names, not
12+
# Add files or directories to the ignore-list. They should be base names, not
913
# paths.
1014
ignore=CVS
1115

12-
# Add files or directories matching the regex patterns to the blacklist. The
16+
# Add files or directories matching the regex patterns to the ignore-list. The
1317
# regex matches against base names, not paths.
1418
ignore-patterns=
1519

@@ -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.
@@ -52,7 +55,7 @@ confidence=
5255
# no Warning level messages displayed, use"--disable=all --enable=classes
5356
# --disable=W"
5457
# 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
55-
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
58+
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,pointless-string-statement
5659

5760
# Enable the message, report, category or checker with the given id(s). You can
5861
# either give multiple identifier separated by comma (,) or put this option
@@ -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.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# SPDX-FileCopyrightText: 2021 Melissa LeBlanc-Williams for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
5+
# Read the Docs configuration file
6+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
7+
8+
# Required
9+
version: 2
10+
11+
python:
12+
version: "3.6"
13+
install:
14+
- requirements: docs/requirements.txt
15+
- requirements: requirements.txt

.readthedocs.yml

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

.travis.yml

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

CODE_OF_CONDUCT.md

Lines changed: 42 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
# Adafruit Community Code of Conduct
1+
<!--
2+
SPDX-FileCopyrightText: 2014 Coraline Ada Ehmke
3+
SPDX-FileCopyrightText: 2019-2021 Kattni Rembor
4+
5+
SPDX-License-Identifier: CC-BY-4.0
6+
-->
7+
# CircuitPython Community Code of Conduct
28

39
## Our Pledge
410

@@ -33,7 +39,11 @@ Examples of unacceptable behavior by participants include:
3339
* Any spamming, flaming, baiting or other attention-stealing behavior
3440
* Excessive or unwelcome helping; answering outside the scope of the question
3541
asked
42+
* Discussion or promotion of activities or projects that intend or pose a risk of
43+
significant harm
3644
* Trolling, insulting/derogatory comments, and personal or political attacks
45+
* Promoting or spreading disinformation, lies, or conspiracy theories against
46+
a person, group, organisation, project, or community
3747
* Public or private harassment
3848
* Publishing others' private information, such as a physical or electronic
3949
address, without explicit permission
@@ -62,51 +72,51 @@ inappropriate, threatening, offensive, or harmful.
6272

6373
## Moderation
6474

65-
Instances of behaviors that violate the Adafruit Community Code of Conduct
75+
Instances of behaviors that violate the CircuitPython Community Code of Conduct
6676
may be reported by any member of the community. Community members are
6777
encouraged to report these situations, including situations they witness
6878
involving other community members.
6979

7080
You may report in the following ways:
7181

72-
In any situation, you may send an email to <[email protected]>.
73-
74-
On the Adafruit Discord, you may send an open message from any channel
75-
to all Community Helpers by tagging @community moderators. You may also send an
76-
open message from any channel, or a direct message to @kattni#1507,
77-
@tannewt#4653, @Dan Halbert#1614, @cater#2442, @sommersoft#0222, or
78-
@Andon#8175.
82+
In any situation, you may email the project maintainer.
7983

80-
Email and direct message reports will be kept confidential.
84+
Email reports will be kept confidential.
8185

82-
In situations on Discord where the issue is particularly egregious, possibly
83-
illegal, requires immediate action, or violates the Discord terms of service,
84-
you should also report the message directly to Discord.
86+
In situations on GitHub where the issue is particularly offensive, possibly
87+
illegal, requires immediate action, or violates the GitHub terms of service,
88+
you should also report the message directly to GitHub via the comment, or via
89+
[GitHub Support](https://support.github.com/contact/report-abuse?category=report-abuse&report=other&report_type=unspecified).
8590

8691
These are the steps for upholding our community’s standards of conduct.
8792

8893
1. Any member of the community may report any situation that violates the
89-
Adafruit Community Code of Conduct. All reports will be reviewed and
90-
investigated.
91-
2. If the behavior is an egregious violation, the community member who
92-
committed the violation may be banned immediately, without warning.
94+
CircuitPython Community Code of Conduct. All reports will be reviewed and
95+
investigated.
96+
2. If the behavior is a severe violation, the community member who
97+
committed the violation may be banned immediately, without warning.
9398
3. Otherwise, moderators will first respond to such behavior with a warning.
9499
4. Moderators follow a soft "three strikes" policy - the community member may
95-
be given another chance, if they are receptive to the warning and change their
96-
behavior.
100+
be given another chance, if they are receptive to the warning and change their
101+
behavior.
97102
5. If the community member is unreceptive or unreasonable when warned by a
98-
moderator, or the warning goes unheeded, they may be banned for a first or
99-
second offense. Repeated offenses will result in the community member being
100-
banned.
103+
moderator, or the warning goes unheeded, they may be banned for a first or
104+
second offense. Repeated offenses will result in the community member being
105+
banned.
106+
6. Disciplinary actions (warnings, bans, etc) for Code of Conduct violations apply
107+
to the platform where the violation occurred. However, depending on the severity
108+
of the violation, the disciplinary action may be applied across CircuitPython's
109+
other community platforms. For example, a severe violation in one Community forum
110+
may result in a ban on not only the CircuitPython GitHub organisation,
111+
but also on the CircuitPython Twitter, live stream text chats, etc.
101112

102113
## Scope
103114

104115
This Code of Conduct and the enforcement policies listed above apply to all
105-
Adafruit Community venues. This includes but is not limited to any community
106-
spaces (both public and private), the entire Adafruit Discord server, and
107-
Adafruit GitHub repositories. Examples of Adafruit Community spaces include
108-
but are not limited to meet-ups, audio chats on the Adafruit Discord, or
109-
interaction at a conference.
116+
CircuitPython Community venues. This includes but is not limited to any community
117+
spaces (both public and private), and CircuitPython repositories. Examples of
118+
CircuitPython Community spaces include but are not limited to meet-ups, issue
119+
threads on GitHub, text chats during a live stream, or interaction at a conference.
110120

111121
This Code of Conduct applies both within project spaces and in public spaces
112122
when an individual is representing the project or its community. As a community
@@ -115,12 +125,13 @@ accordingly.
115125

116126
## Attribution
117127

118-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119-
version 1.4, available at
120-
<https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>,
128+
This Code of Conduct is adapted from the
129+
[Adafruit Community Code of Conduct](https://github.com/adafruit/Adafruit_Community_Code_of_Conduct),
130+
which is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/),
131+
version 1.4, available on [contributor-covenant.org](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html),
121132
and the [Rust Code of Conduct](https://www.rust-lang.org/en-US/conduct.html).
122133

123-
For other projects adopting the Adafruit Community Code of
134+
For other projects adopting the CircuitPython Community Code of
124135
Conduct, please contact the maintainers of those projects for enforcement.
125136
If you wish to use this code of conduct for your own project, consider
126137
explicitly mentioning your moderation policy or making a copy with your

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2019 Gaston Williams for Sparkfun
3+
Copyright (c) 2021 Gaston Williams
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)