Merge pull request #947 from jepler/check-features-at-build-time
Check features at build time
This commit is contained in:
commit
43c90b3458
5 changed files with 27 additions and 3 deletions
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
|
|
@ -30,6 +30,10 @@ jobs:
|
|||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: true
|
||||
- name: Set up Python 3.x
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.x
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 3.0
|
||||
|
|
@ -38,6 +42,9 @@ jobs:
|
|||
run: |
|
||||
gem install bundler:1.17.3
|
||||
bundle install --full-index
|
||||
pip install python-frontmatter
|
||||
- name: Check feature names
|
||||
run: python3 check-features.py
|
||||
- name: Build site with jekyll
|
||||
run: |
|
||||
bundle exec jekyll build -d build
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ features:
|
|||
- STEMMA QT/QWIIC
|
||||
- USB-C
|
||||
- Breadboard-Friendly
|
||||
- Wi-Fi (two version, onboard antenna or uFL connector)
|
||||
- Wi-Fi
|
||||
---
|
||||
|
||||
What has your favorite Espressif WiFi microcontroller, comes with [our favorite connector - the STEMMA QT](http://adafruit.com/stemma), a chainable I2C port, and has lots of Flash and RAM memory for your next IoT project? What will make your next IoT project flyyyyy? What a cutie pie! Or is it... a **QT Py**? This diminutive dev board comes with one of our new favorite lil chips, the **ESP32-S2**!
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ download_instructions:
|
|||
date_added: 2021-2-14
|
||||
features:
|
||||
- Wi-Fi
|
||||
- Bluetooth/BLE
|
||||
- Bluetooth/BTLE
|
||||
- STEMMA QT/QWIIC
|
||||
- Arduino Shield Compatible
|
||||
- USB-C
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ board_url: "https://www.raspberrypi.com/products/raspberry-pi-zero/"
|
|||
board_image: "raspberry_pi_zero.jpg"
|
||||
date_added: 2022-2-14
|
||||
features:
|
||||
- 40-pin GPIO
|
||||
---
|
||||
|
||||
**NOTE**: Not all features are supported in CircuitPython.
|
||||
|
|
|
|||
18
check-features.py
Executable file
18
check-features.py
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/python3
|
||||
from pathlib import Path
|
||||
import frontmatter
|
||||
|
||||
with open('template.md', "rt") as f:
|
||||
metadata, content = frontmatter.parse(f.read())
|
||||
acceptable_features = set(metadata['features'])
|
||||
|
||||
failed = False
|
||||
for filename in Path('_board').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) - acceptable_features):
|
||||
print(f"{filename}:0: Non-standard feature: {feature}")
|
||||
failed = True
|
||||
|
||||
raise SystemExit(failed)
|
||||
Loading…
Reference in a new issue