Skip to content

Commit

Permalink
Merge pull request #703 from makermelissa/updated-not-supported
Browse files Browse the repository at this point in the history
Add issue templates and update pre-commit config
  • Loading branch information
makermelissa authored Sep 8, 2023
2 parents 53a02cb + 1a59661 commit f9b4b76
Show file tree
Hide file tree
Showing 26 changed files with 132 additions and 60 deletions.
50 changes: 50 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# SPDX-FileCopyrightText: 2023 Melissa LeBlanc-Williams for Adafruit Industries
#
# SPDX-License-Identifier: MIT

name: 🐞 Bug Report
description: Create a bug report to help us improve
labels:
- bug
body:
- type: markdown
attributes:
value: >-
Thanks for taking the time to fill out this bug report!
Now that you have encountered a bug... you can file a report for it.
- type: input
id: board
attributes:
label: Board Name
description: Which board are you using?
placeholder: e.g. Raspberry Pi 4
validations:
required: false
- type: textarea
id: steps
attributes:
label: Steps
description: Please mention the steps needed to replicate the issue.
placeholder: |
1. SSH into the board...
2. Enter the following folder...
3. Run the following command...
validations:
required: true
- type: textarea
id: description
attributes:
label: Description
description: Optionally, describe the bug in more detail.
placeholder: |
- Error while using...
- Only happens when...
- Might be related to #64...
- type: textarea
id: more-info
attributes:
label: Additional information
description: >-
Optionally, add any other information like screenshot of the page.
If you have already done some debugging, mention it here.
If you have some code or logs, you can paste it here.
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# SPDX-FileCopyrightText: 2023 Melissa LeBlanc-Williams for Adafruit Industries
#
# SPDX-License-Identifier: MIT

contact_links:
- name: 🔗 Adafruit Forum
url: https://forums.adafruit.com/
about: Official Adafruit technical support forum. Good for getting help on getting a project working.
- name: 🔗 Adafruit Discord
url: https://adafru.it/discord
about: Unofficial chat with many helpful folks and normally prompt replies.
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!--
SPDX-FileCopyrightText: 2023 Melissa LeBlanc-Williams for Adafruit Industries
SPDX-License-Identifier: MIT
-->
---
name: 🚀 Feature Request
about: Suggest an idea for this project
title: ''
labels: 'enhancement'
assignees: ''

---

<!-- We keep adding new features and enhancements to Blinka 🚀
and would love ❤ to see what new challenge you have got for us... 🙂 -->
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/new_board_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!--
SPDX-FileCopyrightText: 2023 Melissa LeBlanc-Williams for Adafruit Industries
SPDX-License-Identifier: MIT
-->
---
name: 🚀 New Board Request
about: Request Support for a New Board
title: ''
labels: 'New Board Request'
assignees: ''

---

<!-- We keep growing Blinka 🚀 and would love ❤ to
see what new boards you would like supported... 🙂 -->
9 changes: 4 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,21 @@

repos:
- repo: https://github.com/python/black
rev: 22.3.0
rev: 23.3.0
hooks:
- id: black
additional_dependencies: ['click==8.0.4']
- repo: https://github.com/fsfe/reuse-tool
rev: v0.12.1
rev: v1.1.2
hooks:
- id: reuse
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
rev: v4.4.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pycqa/pylint
rev: v2.11.1
rev: v2.17.4
hooks:
- id: pylint
name: pylint (library code)
Expand Down
55 changes: 9 additions & 46 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
#
# SPDX-License-Identifier: Unlicense

[MASTER]

# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code
extension-pkg-whitelist=hid

# Add files or directories to the blacklist. They should be base names, not
# Add files or directories to the ignore-list. They should be base names, not
# paths.
ignore=CVS

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

Expand All @@ -22,11 +23,10 @@ ignore-patterns=

# Use multiple processes to speed up Pylint.
jobs=1
# jobs=2

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

# Pickle collected data for later comparisons.
persistent=yes
Expand Down Expand Up @@ -54,8 +54,8 @@ confidence=
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
# 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
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,invalid-name
# disable=import-error,raw-checker-failed,bad-inline-option,locally-disabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,deprecated-str-translate-call
disable=raw-checker-failed,bad-inline-option,locally-disabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,import-error,pointless-string-statement,unspecified-encoding,import-outside-toplevel,too-many-branches,too-many-statements,too-many-public-methods,invalid-name

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

# List of optional constructs for which whitespace checking is disabled. `dict-
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
# `empty-line` allows space-only lines.
no-space-check=trailing-comma,dict-separator

# Allow the body of a class to be on the same line as the declaration if body
# contains single statement.
single-line-class-stmt=no
Expand All @@ -249,56 +243,37 @@ ignore-comments=yes
ignore-docstrings=yes

# Ignore imports when computing similarities.
ignore-imports=no
ignore-imports=yes

# Minimum lines number of a similarity.
min-similarity-lines=80
min-similarity-lines=12


[BASIC]

# Naming hint for argument names
argument-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$

# Regular expression matching correct argument names
argument-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$

# Naming hint for attribute names
attr-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$

# Regular expression matching correct attribute names
attr-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$

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

# Naming hint for class attribute names
class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$

# Regular expression matching correct class attribute names
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$

# Naming hint for class names
# class-name-hint=[A-Z_][a-zA-Z0-9]+$
class-name-hint=[A-Z_][a-zA-Z0-9_]+$

# Regular expression matching correct class names
# class-rgx=[A-Z_][a-zA-Z0-9]+$
class-rgx=[A-Z_][a-zA-Z0-9_]+$

# Naming hint for constant names
const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$

# Regular expression matching correct constant names
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$

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

# Naming hint for function names
function-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$

# Regular expression matching correct function names
function-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$

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

# Naming hint for inline iteration names
inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$

# Regular expression matching correct inline iteration names
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$

# Naming hint for method names
method-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$

# Regular expression matching correct method names
method-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$

# Naming hint for module names
module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$

# Regular expression matching correct module names
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$

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

# Naming hint for variable names
variable-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$

# Regular expression matching correct variable names
variable-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$

Expand Down Expand Up @@ -433,4 +396,4 @@ min-public-methods=1

# Exceptions that will emit a warning when being caught. Defaults to
# "Exception"
overgeneral-exceptions=Exception
overgeneral-exceptions=builtins.Exception
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Adafruit-PlatformDetect>=3.13.0
Adafruit-PlatformDetect>=3.52.0
Adafruit-PureIO>=1.1.7
Jetson.GPIO; platform_machine=='aarch64'
RPi.GPIO; platform_machine=='armv7l' or platform_machine=='armv6l'
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
},
include_package_data=True,
install_requires=[
"Adafruit-PlatformDetect>=3.13.0",
"Adafruit-PlatformDetect>=3.52.0",
"Adafruit-PureIO>=1.1.7",
"pyftdi>=0.40.0",
"adafruit-circuitpython-typing",
Expand Down
1 change: 1 addition & 0 deletions src/adafruit_blinka/microcontroller/am335x/sysfs_pwmout.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
except ImportError:
raise RuntimeError("No PWM outputs defined for this board") from ImportError


# pylint: disable=unnecessary-pass
class PWMError(IOError):
"""Base class for PWM errors."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
queues = []
procs = []


# The message queues live outside of python space, and must be formally cleaned!
def final():
"""In case the program is cancelled or quit, we need to clean up the PulseIn
Expand All @@ -29,6 +30,7 @@ def final():

atexit.register(final)


# pylint: disable=c-extension-no-member
class PulseIn:
"""PulseIn Class to read PWM signals"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
queues = []
procs = []


# The message queues live outside of python space, and must be formally cleaned!
def final():
"""In case the program is cancelled or quit, we need to clean up the PulseIn
Expand All @@ -28,6 +29,7 @@ def final():

atexit.register(final)


# pylint: disable=c-extension-no-member
class PulseIn:
"""PulseIn Class to read PWM signals"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
queues = []
procs = []


# The message queues live outside of python space, and must be formally cleaned!
def final():
"""In case the program is cancelled or quit, we need to clean up the PulseIn
Expand All @@ -29,6 +30,7 @@ def final():

atexit.register(final)


# pylint: disable=c-extension-no-member
class PulseIn:
"""PulseIn Class to read PWM signals"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
get_ft2232h_url,
)


# pylint: disable=protected-access
class SPI:
"""Custom SPI Class for FTDI MPSSE"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"https://github.com/adafruit/Raspberry-Pi-Installer-Scripts/blob/master/libgpiod.sh"
) from ImportError


# pylint: disable=too-many-branches,too-many-statements
class Pin:
"""Pins dont exist in CPython so...lets make our own!"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import errno
import time


# pylint: disable=unnecessary-pass
class GPIOError(IOError):
"""Base class for GPIO errors."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"""SPI Class for Generic MicroPython"""
from machine import SPI as _SPI


# pylint: disable=protected-access, no-self-use
class SPI:
"""SPI Class for Generic MicroPython"""
Expand Down
4 changes: 3 additions & 1 deletion src/adafruit_blinka/microcontroller/nova/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ def getInstance():
def __init__(self):
"""Virtually private constructor."""
if Connection.__instance is not None:
raise Exception("This class is a singleton!")
raise Exception( # pylint: disable=broad-exception-raised
"This class is a singleton!"
)

# pylint: disable=import-outside-toplevel
from binhoHostAdapter import binhoHostAdapter
Expand Down
1 change: 1 addition & 0 deletions src/adafruit_blinka/microcontroller/nxp_lpc4330/pwmout.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
except ImportError:
raise RuntimeError("No PWM outputs defined for this board") from ImportError


# pylint: disable=unnecessary-pass
class PWMError(IOError):
"""Base class for PWM errors."""
Expand Down
Loading

0 comments on commit f9b4b76

Please sign in to comment.