mirror of
https://github.com/TinyTapeout/tt-support-tools.git
synced 2026-11-03 04:36:09 +01:00
fix(tt_tool): project tile configuration always checked against SKY130 tile sizes
This commit is contained in:
@@ -34,4 +34,4 @@ jobs:
|
|||||||
|
|
||||||
- name: Run mypy
|
- name: Run mypy
|
||||||
run: |
|
run: |
|
||||||
mypy cells.py config.py configure.py documentation.py git_utils.py markdown_utils.py project.py rom.py shuttle.py --check-untyped-defs
|
mypy cells.py config.py configure.py documentation.py git_utils.py markdown_utils.py project.py project_info.py rom.py shuttle.py --check-untyped-defs
|
||||||
|
|||||||
+1
-1
@@ -105,7 +105,7 @@ class Project:
|
|||||||
yaml_path = os.path.join(self.local_dir, "info.yaml")
|
yaml_path = os.path.join(self.local_dir, "info.yaml")
|
||||||
try:
|
try:
|
||||||
with open(yaml_path) as fh:
|
with open(yaml_path) as fh:
|
||||||
self.info = ProjectInfo(yaml.safe_load(fh))
|
self.info = ProjectInfo(yaml.safe_load(fh), self.get_tile_sizes())
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
logging.error(
|
logging.error(
|
||||||
f"yaml file not found for {self} - do you need to --clone the project repos?"
|
f"yaml file not found for {self} - do you need to --clone the project repos?"
|
||||||
|
|||||||
+1
-3
@@ -1,7 +1,5 @@
|
|||||||
from typing import Any, Dict, List, Optional
|
from typing import Any, Dict, List, Optional
|
||||||
|
|
||||||
from tile_sizes import tile_sizes
|
|
||||||
|
|
||||||
YAML_VERSION = 6
|
YAML_VERSION = 6
|
||||||
|
|
||||||
|
|
||||||
@@ -46,7 +44,7 @@ class ProjectInfo:
|
|||||||
top_module: str
|
top_module: str
|
||||||
source_files: List[str]
|
source_files: List[str]
|
||||||
|
|
||||||
def __init__(self, yaml_data: Dict[str, Any]):
|
def __init__(self, yaml_data: Dict[str, Any], tile_sizes: Dict[str, str]):
|
||||||
# Validate Version
|
# Validate Version
|
||||||
yaml_version = yaml_data.get("yaml_version")
|
yaml_version = yaml_data.get("yaml_version")
|
||||||
if yaml_version is None:
|
if yaml_version is None:
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
from os.path import dirname, join, realpath
|
|
||||||
from typing import Dict
|
|
||||||
|
|
||||||
import yaml
|
|
||||||
|
|
||||||
with open(join(dirname(realpath(__file__)), "tile_sizes.yaml")) as fh:
|
|
||||||
tile_sizes: Dict[str, str] = yaml.safe_load(fh)
|
|
||||||
Reference in New Issue
Block a user