diff --git a/adabot/circuitpython_library_patches.py b/adabot/circuitpython_library_patches.py index 2d0fd53..113e9e5 100644 --- a/adabot/circuitpython_library_patches.py +++ b/adabot/circuitpython_library_patches.py @@ -171,8 +171,9 @@ def check_patches(repo, patches, flags, use_apply, dry_run): run_apply = True except sh.ErrorReturnCode_1 as Err: run_apply = False - if b"error" not in Err.stderr: - skipped += 1 + if (b"error" not in Err.stderr or + b"patch does not apply" in Err.stderr): + skipped += 1 else: failed += 1 error_str = str(Err.stderr, encoding="utf-8").replace("\n", " ") @@ -195,6 +196,8 @@ def check_patches(repo, patches, flags, use_apply, dry_run): applied += 1 else: failed += 1 + elif run_apply and dry_run: + applied += 1 return [applied, skipped, failed] diff --git a/adabot/lib/common_funcs.py b/adabot/lib/common_funcs.py index 623b1a4..edf804f 100644 --- a/adabot/lib/common_funcs.py +++ b/adabot/lib/common_funcs.py @@ -168,7 +168,7 @@ def list_repos(*, include_repos=None): """ repos = [] result = github.get("/search/repositories", - params={"q":"Adafruit_CircuitPython user:adafruit", + params={"q":"Adafruit_CircuitPython user:adafruit archived:false", "per_page": 100, "sort": "updated", "order": "asc"} diff --git a/patches/0001-update-pylint-examples-directive.patch b/patches/0001-update-pylint-examples-directive.patch new file mode 100644 index 0000000..132e279 --- /dev/null +++ b/patches/0001-update-pylint-examples-directive.patch @@ -0,0 +1,25 @@ +From e1f4301b25e7e6f120b85c316cfbaf838fc1282e Mon Sep 17 00:00:00 2001 +From: sommersoft +Date: Wed, 8 Jan 2020 21:09:22 -0600 +Subject: [PATCH] update pylint examples directive + +--- + .github/workflows/build.yml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml +index 66ce4db..11ce574 100644 +--- a/.github/workflows/build.yml ++++ b/.github/workflows/build.yml +@@ -42,7 +42,7 @@ jobs: + - name: PyLint + run: | + pylint $( find . -path './adafruit*.py' ) +- ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace examples/*.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: Build docs +-- +2.17.1 + diff --git a/patches/0001-updated-CoC.patch b/patches/0001-updated-CoC.patch deleted file mode 100644 index 036fcea..0000000 --- a/patches/0001-updated-CoC.patch +++ /dev/null @@ -1,180 +0,0 @@ -From b7148a7dde837a215d582856f038e81c441b1c0d Mon Sep 17 00:00:00 2001 -From: sommersoft -Date: Wed, 11 Jul 2018 09:44:39 -0500 -Subject: [PATCH] updated CoC - ---- - CODE_OF_CONDUCT.md | 123 ++++++++++++++++++++++++++++++++++++++--------------- - 1 file changed, 88 insertions(+), 35 deletions(-) - -diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md -index 1617586..a9b258d 100644 ---- a/CODE_OF_CONDUCT.md -+++ b/CODE_OF_CONDUCT.md -@@ -1,74 +1,127 @@ --# Contributor Covenant Code of Conduct -+# Adafruit Community Code of Conduct - - ## Our Pledge - - In the interest of fostering an open and welcoming environment, we as --contributors and maintainers pledge to making participation in our project and -+contributors and leaders pledge to making participation in our project and - our community a harassment-free experience for everyone, regardless of age, body --size, disability, ethnicity, gender identity and expression, level of experience, --nationality, personal appearance, race, religion, or sexual identity and --orientation. -+size, disability, ethnicity, gender identity and expression, level or type of -+experience, education, socio-economic status, nationality, personal appearance, -+race, religion, or sexual identity and orientation. - - ## Our Standards - -+We are committed to providing a friendly, safe and welcoming environment for -+all. -+ - Examples of behavior that contributes to creating a positive environment - include: - -+* Be kind and courteous to others - * Using welcoming and inclusive language - * Being respectful of differing viewpoints and experiences -+* Collaborating with other community members - * Gracefully accepting constructive criticism - * Focusing on what is best for the community - * Showing empathy towards other community members - - Examples of unacceptable behavior by participants include: - --* The use of sexualized language or imagery and unwelcome sexual attention or --advances -+* The use of sexualized language or imagery and sexual attention or advances -+* The use of inappropriate images, including in a community member's avatar -+* The use of inappropriate language, including in a community member's nickname -+* Any spamming, flaming, baiting or other attention-stealing behavior -+* Excessive or unwelcome helping; answering outside the scope of the question -+ asked - * Trolling, insulting/derogatory comments, and personal or political attacks - * Public or private harassment - * Publishing others' private information, such as a physical or electronic - address, without explicit permission --* Other conduct which could reasonably be considered inappropriate in a -- professional setting -+* Other conduct which could reasonably be considered inappropriate -+ -+The goal of the standards and moderation guidelines outlined here is to build -+and maintain a respectful community. We ask that you don’t just aim to be -+"technically unimpeachable", but rather try to be your best self. -+ -+We value many things beyond technical expertise, including collaboration and -+supporting others within our community. Providing a positive experience for -+other community members can have a much more significant impact than simply -+providing the correct answer. - - ## Our Responsibilities - --Project maintainers are responsible for clarifying the standards of acceptable -+Project leaders are responsible for clarifying the standards of acceptable - behavior and are expected to take appropriate and fair corrective action in - response to any instances of unacceptable behavior. - --Project maintainers have the right and responsibility to remove, edit, or --reject comments, commits, code, wiki edits, issues, and other contributions -+Project leaders have the right and responsibility to remove, edit, or -+reject messages, comments, commits, code, issues, and other contributions - that are not aligned to this Code of Conduct, or to ban temporarily or --permanently any contributor for other behaviors that they deem inappropriate, --threatening, offensive, or harmful. -+permanently any community member for other behaviors that they deem -+inappropriate, threatening, offensive, or harmful. - --## Scope -+## Moderation - --This Code of Conduct applies both within project spaces and in public spaces --when an individual is representing the project or its community. Examples of --representing a project or community include using an official project e-mail --address, posting via an official social media account, or acting as an appointed --representative at an online or offline event. Representation of a project may be --further defined and clarified by project maintainers. -+Instances of behaviors that violate the Adafruit Community Code of Conduct -+may be reported by any member of the community. Community members are -+encouraged to report these situations, including situations they witness -+involving other community members. -+ -+You may report in the following ways: -+ -+In any situation, you may send an email to . - --## Enforcement -+On the Adafruit Discord, you may send an open message from any channel -+to all Community Helpers by tagging @community helpers. You may also send an -+open message from any channel, or a direct message to @kattni#1507, -+@tannewt#4653, @Dan Halbert#1614, @cater#2442, @sommersoft#0222, or -+@Andon#8175. - --Instances of abusive, harassing, or otherwise unacceptable behavior may be --reported by contacting the project team at support@adafruit.com. All --complaints will be reviewed and investigated and will result in a response that --is deemed necessary and appropriate to the circumstances. The project team is --obligated to maintain confidentiality with regard to the reporter of an incident. --Further details of specific enforcement policies may be posted separately. -+Email and direct message reports will be kept confidential. - --Project maintainers who do not follow or enforce the Code of Conduct in good --faith may face temporary or permanent repercussions as determined by other --members of the project's leadership. -+In situations on Discord where the issue is particularly egregious, possibly -+illegal, requires immediate action, or violates the Discord terms of service, -+you should also report the message directly to Discord. -+ -+These are the steps for upholding our community’s standards of conduct. -+ -+1. Any member of the community may report any situation that violates the -+Adafruit Community Code of Conduct. All reports will be reviewed and -+investigated. -+2. If the behavior is an egregious violation, the community member who -+committed the violation may be banned immediately, without warning. -+3. Otherwise, moderators will first respond to such behavior with a warning. -+4. Moderators follow a soft "three strikes" policy - the community member may -+be given another chance, if they are receptive to the warning and change their -+behavior. -+5. If the community member is unreceptive or unreasonable when warned by a -+moderator, or the warning goes unheeded, they may be banned for a first or -+second offense. Repeated offenses will result in the community member being -+banned. -+ -+## Scope -+ -+This Code of Conduct and the enforcement policies listed above apply to all -+Adafruit Community venues. This includes but is not limited to any community -+spaces (both public and private), the entire Adafruit Discord server, and -+Adafruit GitHub repositories. Examples of Adafruit Community spaces include -+but are not limited to meet-ups, audio chats on the Adafruit Discord, or -+interaction at a conference. -+ -+This Code of Conduct applies both within project spaces and in public spaces -+when an individual is representing the project or its community. As a community -+member, you are representing our community, and are expected to behave -+accordingly. - - ## Attribution - --This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, --available at [http://contributor-covenant.org/version/1/4][version] -+This Code of Conduct is adapted from the [Contributor Covenant][homepage], -+version 1.4, available at -+, -+and the [Rust Code of Conduct](https://www.rust-lang.org/en-US/conduct.html). - --[homepage]: http://contributor-covenant.org --[version]: http://contributor-covenant.org/version/1/4/ -+For other projects adopting the Adafruit Community Code of -+Conduct, please contact the maintainers of those projects for enforcement. -+If you wish to use this code of conduct for your own project, consider -+explicitly mentioning your moderation policy or making a copy with your -+own moderation policy so as to avoid confusion. -\ No newline at end of file --- -2.15.1.windows.2 - diff --git a/patches/ignore-the-board-module-imports-in-.pylintrc.patch b/patches/ignore-the-board-module-imports-in-.pylintrc.patch deleted file mode 100644 index a10d514..0000000 --- a/patches/ignore-the-board-module-imports-in-.pylintrc.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b5290f3869789fbf8a57004003c94131cdad82c5 Mon Sep 17 00:00:00 2001 -From: sommersoft -Date: Tue, 14 Aug 2018 20:01:03 -0500 -Subject: [PATCH] ignore the board module imports in .pylintrc - ---- - .pylintrc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/.pylintrc b/.pylintrc -index 946d694..cb8d23d 100644 ---- a/.pylintrc -+++ b/.pylintrc -@@ -155,7 +155,7 @@ ignored-classes=optparse.Values,thread._local,_thread._local - # (useful for modules/projects where namespaces are manipulated during runtime - # and thus existing member attributes cannot be deduced by static analysis. It - # supports qualified module names, as well as Unix pattern matching. --ignored-modules= -+ignored-modules=board - - # Show a hint with possible names when a member name was not found. The aspect - # of finding the hint is based on edit distance. --- -2.15.1.windows.2 -