feat: new format for shuttle_index

1. Bump "version" to 3
2. Rename "shuttle" to "name"
2. Rename "mux" to "projects", and turn it from a dict into a list
3. Project entries: add "address" (which was previously the key of the "mux" dict), remove "features" and add optional "analog_pins" with a list of analog pin assignment.
This commit is contained in:
Uri Shaked
2024-03-18 01:16:22 +02:00
parent b1a2a3bb98
commit ef5539b7a0
2 changed files with 23 additions and 15 deletions
+6 -5
View File
@@ -1,22 +1,23 @@
from typing import Dict, TypedDict
from typing import List, NotRequired, TypedDict
class ShuttleIndexMuxEntry(TypedDict):
class ShuttleIndexProject(TypedDict):
macro: str
address: int
x: int
y: int
tiles: str
repo: str
commit: str
features: dict[str, bool]
analog_pins: NotRequired[List[int]]
class ShuttleIndex(TypedDict):
"""TypedDict for Tiny Tapeout's shuttle_index.json file."""
shuttle: str
name: str
repo: str
commit: str
commit_date: int
version: int
mux: Dict[str, ShuttleIndexMuxEntry]
projects: List[ShuttleIndexProject]