Skip to content

Commit 8f81917

Browse files
authored
Merge pull request #325 from lesamouraipourpre/pre-commit
Run pre-commit from build workflow
2 parents 78cd017 + 9673185 commit 8f81917

21 files changed

+521
-88
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
4+
15
name: Build CI
26

37
on: [pull_request, push]
@@ -32,8 +36,12 @@ jobs:
3236
run: |
3337
sudo apt-get install gettext
3438
pip install -r requirements.txt
39+
pip install pre-commit
3540
- name: Library version
3641
run: git describe --dirty --always --tags
42+
- name: Pre-commit hooks
43+
run: |
44+
pre-commit run --all-files
3745
- name: Build assets
3846
run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location libraries --library_depth 2
3947
- name: Build docs

.github/workflows/images.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
4+
15
name: Generate folder images
26

37
on:
@@ -48,4 +52,3 @@ jobs:
4852
git add *.png index.html
4953
git remote add origin https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
5054
if git commit -m"update images"; then git push -f origin HEAD:folder-images; fi
51-

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
4+
15
name: Release Actions
26

37
on:

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
15
build/*
26
*zip
37
.env
@@ -7,3 +11,5 @@ CircuitPython_Library_Screenshot_Maker/
711
generated_images/
812
latest_bundle_data.json
913
latest_bundle_tag.json
14+
docs/_build/
15+
.idea

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2020 ladyada
2+
#
3+
# SPDX-License-Identifier: MIT
4+
15
[submodule "libraries/register"]
26
path = libraries/helpers/register
37
url = https://github.com/adafruit/Adafruit_CircuitPython_Register.git

.readthedocs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: Unlicense
4+
15
python:
26
version: 3
7+
requirements_file: requirements.txt

CODE_OF_CONDUCT.md

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

39
## Our Pledge
@@ -33,6 +39,8 @@ 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
3745
* Promoting or spreading disinformation, lies, or conspiracy theories against
3846
a person, group, organisation, project, or community
@@ -43,7 +51,7 @@ Examples of unacceptable behavior by participants include:
4351

4452
The goal of the standards and moderation guidelines outlined here is to build
4553
and maintain a respectful community. We ask that you don’t just aim to be
46-
"technically unimpeachable", but rather try to be your best self.
54+
"technically unimpeachable", but rather try to be your best self.
4755

4856
We value many things beyond technical expertise, including collaboration and
4957
supporting others within our community. Providing a positive experience for
@@ -71,35 +79,40 @@ involving other community members.
7179

7280
You may report in the following ways:
7381

74-
In any situation, you may send an email to <[email protected]>.
82+
In any situation, you may email <[email protected]>.
7583

7684
On the Adafruit Discord, you may send an open message from any channel
77-
to all Community Moderators by tagging @community moderators. You may
78-
also send an open message from any channel, or a direct message to
79-
@kattni#1507, @tannewt#4653, @Dan Halbert#1614, @cater#2442,
80-
@sommersoft#0222, @Mr. Certainly#0472 or @Andon#8175.
85+
to all Community Moderators by tagging @community moderators. You may
86+
also send an open message from any channel, or a direct message to
87+
any Community Moderator.
8188

8289
Email and direct message reports will be kept confidential.
8390

84-
In situations on Discord where the issue is particularly egregious, possibly
91+
In situations on Discord where the issue is particularly offensive, possibly
8592
illegal, requires immediate action, or violates the Discord terms of service,
86-
you should also report the message directly to Discord.
93+
you should also report the message directly to [Discord](https://discord.com/safety).
8794

8895
These are the steps for upholding our community’s standards of conduct.
8996

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

104117
## Scope
105118

@@ -117,9 +130,8 @@ accordingly.
117130

118131
## Attribution
119132

120-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
121-
version 1.4, available at
122-
<https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>,
133+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/),
134+
version 1.4, available on [contributor-covenant.org](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html),
123135
and the [Rust Code of Conduct](https://www.rust-lang.org/en-US/conduct.html).
124136

125137
For other projects adopting the Adafruit Community Code of

0 commit comments

Comments
 (0)