From 651cc9546f1dd162f13d847d1e2e6b6c55253760 Mon Sep 17 00:00:00 2001 From: PRC-SAK Date: Thu, 25 Feb 2021 23:44:22 -0800 Subject: [PATCH 1/3] Modify and rename setup.py Replace contents with comment and rename file to setup.py.disabled as per Issue #36 --- setup.py | 57 ----------------------------------------------- setup.py.disabled | 7 ++++++ 2 files changed, 7 insertions(+), 57 deletions(-) delete mode 100644 setup.py create mode 100644 setup.py.disabled diff --git a/setup.py b/setup.py deleted file mode 100644 index e11c6cf..0000000 --- a/setup.py +++ /dev/null @@ -1,57 +0,0 @@ -# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries -# -# SPDX-License-Identifier: MIT - -"""A setuptools based setup module. - -See: -https://packaging.python.org/en/latest/distributing.html -https://github.com/pypa/sampleproject -""" - -from setuptools import setup, find_packages - -# To use a consistent encoding -from codecs import open -from os import path - -here = path.abspath(path.dirname(__file__)) - -# Get the long description from the README file -with open(path.join(here, "README.rst"), encoding="utf-8") as f: - long_description = f.read() - -setup( - name="adafruit-circuitpython-pybadger", - use_scm_version=True, - setup_requires=["setuptools_scm"], - description="Badge-focused CircuitPython helper library for PyBadge and PyGamer.", - long_description=long_description, - long_description_content_type="text/x-rst", - # The project's main homepage. - url="https://github.com/adafruit/Adafruit_CircuitPython_PyBadger", - # Author details - author="Adafruit Industries", - author_email="circuitpython@adafruit.com", - install_requires=["Adafruit-Blinka"], - # Choose your license - license="MIT", - # See https://pypi.python.org/pypi?%3Aaction=list_classifiers - classifiers=[ - "Development Status :: 3 - Alpha", - "Intended Audience :: Developers", - "Topic :: Software Development :: Libraries", - "Topic :: System :: Hardware", - "License :: OSI Approved :: MIT License", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - ], - # What does your project relate to? - keywords="adafruit blinka circuitpython micropython pybadger pybadge pygamer badge", - # You can just specify the packages manually here if your project is - # simple. Or you can use find_packages(). - # TODO: IF LIBRARY FILES ARE A PACKAGE FOLDER, - # CHANGE `py_modules=['...']` TO `packages=['...']` - packages=["adafruit_pybadger"], -) diff --git a/setup.py.disabled b/setup.py.disabled new file mode 100644 index 0000000..79220aa --- /dev/null +++ b/setup.py.disabled @@ -0,0 +1,7 @@ +# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries +# +# SPDX-License-Identifier: MIT +""" +This library is not deployed to PyPI. It is either a board-specific helper library, or +does not make sense for use on or is incompatible with single board computers and Linux. +""" From e0a64e53243ba53b2549ea7a0f83a2ceebee0ac5 Mon Sep 17 00:00:00 2001 From: PRC-SAK Date: Mon, 1 Mar 2021 12:18:40 -0800 Subject: [PATCH 2/3] Modify .github\workflows\build.yml Remove test job 'Pylint' as per kattni --- .github/workflows/build.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 59baa53..3baf502 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,10 +50,6 @@ jobs: - name: Pre-commit hooks run: | pre-commit run --all-files - - name: PyLint - run: | - pylint $( find . -path './adafruit*.py' ) - ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace $( find . -path "./examples/*.py" )) - name: Build assets run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . - name: Archive bundles From cfdff2e6120ed12b4fb5c5f4e3705ba7b7cd0edf Mon Sep 17 00:00:00 2001 From: PRC-SAK Date: Mon, 1 Mar 2021 12:26:25 -0800 Subject: [PATCH 3/3] Modify .pre-commit-config.yaml Add 'Pylint' and 'local' repos and hooks as per kattni --- .pre-commit-config.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 07f886c..354c761 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,3 +17,18 @@ repos: - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace +- repo: https://github.com/pycqa/pylint + rev: pylint-2.7.1 + hooks: + - id: pylint + name: pylint (library code) + types: [python] + exclude: "^(docs/|examples/|setup.py$)" +- repo: local + hooks: + - id: pylint_examples + name: pylint (examples code) + description: Run pylint rules on "examples/*.py" files + entry: /usr/bin/env bash -c + args: ['([[ ! -d "examples" ]] || for example in $(find . -path "./examples/*.py"); do pylint --disable=missing-docstring,invalid-name $example; done)'] + language: system