Update Check Features to check Blinka boards too
This commit is contained in:
parent
10a62afa97
commit
f0775ec65a
3 changed files with 31 additions and 2 deletions
|
|
@ -9,7 +9,6 @@ board_image: "adafruit_feather_rp2040.jpg"
|
|||
download_instructions: "https://learn.adafruit.com/circuitpython-libraries-on-any-computer-with-raspberry-pi-pico"
|
||||
date_added: 2021-12-6
|
||||
features:
|
||||
- USB-C
|
||||
- Feather-Compatible
|
||||
- STEMMA QT/QWIIC
|
||||
---
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ download_instructions: "https://learn.adafruit.com/circuitpython-libraries-on-an
|
|||
date_added: 2021-12-6
|
||||
features:
|
||||
- STEMMA QT/QWIIC
|
||||
- USB-C
|
||||
---
|
||||
|
||||
What a cutie pie! Or is it... a QT Py? This diminutive dev board comes with one of our new favorite chip, the RP2040. It's been made famous in the new [Raspberry Pi Pico](https://www.adafruit.com/pico) *and* our [Feather RP2040](http://www.adafruit.com/product/4884) and [ItsyBitsy RP2040](http://www.adafruit.com/product/4888), but what if we wanted something really *smol?*
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
from pathlib import Path
|
||||
import frontmatter
|
||||
|
||||
# Check CircuitPython Download Features
|
||||
with open('template.md', "rt") as f:
|
||||
metadata, content = frontmatter.parse(f.read())
|
||||
acceptable_features = set(metadata['features'])
|
||||
|
|
@ -15,4 +16,34 @@ for filename in Path('_board').glob("*.md"):
|
|||
print(f"{filename}:0: Non-standard feature: {feature}")
|
||||
failed = True
|
||||
|
||||
if failed:
|
||||
print("Non-standard features found. See https://learn.adafruit.com/how-to-add-a-new-board-to-the-circuitpython-org-website/adding-to-downloads for acceptable features")
|
||||
raise SystemExit(failed)
|
||||
|
||||
# Check Blinka Download Features
|
||||
blinka_features = {
|
||||
"Ethernet",
|
||||
"HDMI",
|
||||
"Wi-Fi",
|
||||
"40-pin GPIO",
|
||||
"GPS",
|
||||
"Feather-Compatible",
|
||||
"Bluetooth/BLE",
|
||||
"STEMMA QT/QWIIC",
|
||||
"USB 3.0",
|
||||
"Infrared Receiver",
|
||||
}
|
||||
|
||||
failed = False
|
||||
for filename in Path('_blinka').glob("*.md"):
|
||||
with open(filename, "rt") as f:
|
||||
metadata, content = frontmatter.parse(f.read())
|
||||
features = metadata.get('features') or ()
|
||||
for feature in sorted(set(features) - blinka_features):
|
||||
print(f"{filename}:0: Non-standard feature: {feature}")
|
||||
failed = True
|
||||
|
||||
if failed:
|
||||
print("Non-standard features found. See https://learn.adafruit.com/how-to-add-a-new-board-to-the-circuitpython-org-website/adding-to-blinka for acceptable features")
|
||||
|
||||
raise SystemExit(failed)
|
||||
|
|
|
|||
Loading…
Reference in a new issue