File tree Expand file tree Collapse file tree 3 files changed +44
-1
lines changed Expand file tree Collapse file tree 3 files changed +44
-1
lines changed Original file line number Diff line number Diff line change @@ -16,12 +16,25 @@ if [[ $# -eq 0 ]] ; then
16
16
GRAY=' \033[1;30m' ; RED=' \033[0;31m' ; LRED=' \033[1;31m' ; GREEN=' \033[0;32m' ; LGREEN=' \033[1;32m' ; ORANGE=' \033[0;33m' ; YELLOW=' \033[1;33m' ; BLUE=' \033[0;34m' ; LBLUE=' \033[1;34m' ; PURPLE=' \033[0;35m' ; LPURPLE=' \033[1;35m' ; CYAN=' \033[0;36m' ; LCYAN=' \033[1;36m' ; LGRAY=' \033[0;37m' ; WHITE=' \033[1;37m' ;
17
17
fi
18
18
19
- # Install dependencies
19
+ # Install package dependencies
20
20
sudo apt-get update
21
21
sudo apt-get install libudev-dev libusb-1.0
22
22
sudo apt-get install -y gettext
23
+
24
+ # Install dependencies for these scripts
25
+ if test -d " actions-ci" ; then
26
+ pip install -r actions-ci/requirements.txt
27
+ else
28
+ echo " Directory 'actions-ci' does not exist!"
29
+ echo " CI expects the 'actions-ci-circuitpython-libs' tools being checked out to said directory."
30
+ exit 1
31
+ fi
32
+
33
+ # Install dependencies for the library
23
34
pip install -r requirements.txt
24
35
if test -f " optional_requirements.txt" ; then
25
36
pip install -r optional_requirements.txt
26
37
fi
38
+
39
+ # Install build tool
27
40
pip install circuitpython-build-tools
Original file line number Diff line number Diff line change
1
+ # SPDX-FileCopyrightText: 2023 Alec Delaney, for Adafruit Industries
2
+ #
3
+ # SPDX-License-Identifier: MIT
4
+
5
+ """
6
+ Script for printing the versions of the contents of .pre-commit-config.yaml
7
+
8
+ Author(s): Alec Delaney, for Adafruit Industries
9
+ """
10
+
11
+ from typing import TypedDict
12
+ import yaml
13
+
14
+
15
+ class PreCommitRepo (TypedDict ):
16
+ """Typed dictionary structure of a pre-commit hook"""
17
+
18
+ repo : str
19
+ rev : str
20
+ hooks : list [dict [str , str ]]
21
+
22
+
23
+ with open (".pre-commit-config.yaml" , mode = "r" , encoding = "utf-8" ) as yamlfile :
24
+ repos : list [PreCommitRepo ] = yaml .safe_load (yamlfile )["repos" ]
25
+
26
+ print ("Using the following pre-commit hook versions:" )
27
+ for repo in repos :
28
+ print (f' * { repo ["repo" ]} @ { repo ["rev" ]} ' )
Original file line number Diff line number Diff line change 1
1
# SPDX-FileCopyrightText: 2019 Adafruit Industries
2
2
#
3
3
# SPDX-License-Identifier: Unlicense
4
+
5
+ pyyaml ~= 6.0
You can’t perform that action at this time.
0 commit comments