Skip to content

Commit 10a62af

Browse files
committed
2 parents 5668d4e + 43c90b3 commit 10a62af

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ jobs:
3030
- uses: actions/checkout@v1
3131
with:
3232
submodules: true
33+
- name: Set up Python 3.x
34+
uses: actions/setup-python@v2
35+
with:
36+
python-version: 3.x
3337
- uses: ruby/setup-ruby@v1
3438
with:
3539
ruby-version: 3.0
@@ -38,6 +42,9 @@ jobs:
3842
run: |
3943
gem install bundler:1.17.3
4044
bundle install --full-index
45+
pip install python-frontmatter
46+
- name: Check feature names
47+
run: python3 check-features.py
4148
- name: Build site with jekyll
4249
run: |
4350
bundle exec jekyll build -d build

_board/diodes_delight_piunora.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ download_instructions:
1010
date_added: 2021-2-14
1111
features:
1212
- Wi-Fi
13-
- Bluetooth/BLE
13+
- Bluetooth/BTLE
1414
- STEMMA QT/QWIIC
1515
- Arduino Shield Compatible
1616
- USB-C

_board/raspberrypi_zero.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ board_url: "https://www.raspberrypi.com/products/raspberry-pi-zero/"
88
board_image: "raspberry_pi_zero.jpg"
99
date_added: 2022-2-14
1010
features:
11-
- 40-pin GPIO
1211
---
1312

1413
**NOTE**: Not all features are supported in CircuitPython.

check-features.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/python3
2+
from pathlib import Path
3+
import frontmatter
4+
5+
with open('template.md', "rt") as f:
6+
metadata, content = frontmatter.parse(f.read())
7+
acceptable_features = set(metadata['features'])
8+
9+
failed = False
10+
for filename in Path('_board').glob("*.md"):
11+
with open(filename, "rt") as f:
12+
metadata, content = frontmatter.parse(f.read())
13+
features = metadata.get('features') or ()
14+
for feature in sorted(set(features) - acceptable_features):
15+
print(f"{filename}:0: Non-standard feature: {feature}")
16+
failed = True
17+
18+
raise SystemExit(failed)

0 commit comments

Comments
 (0)