mirror of
https://github.com/TinyTapeout/tt-support-tools.git
synced 2026-11-03 04:36:09 +01:00
add --print-wokwi-id flag for use in testbench
This commit is contained in:
@@ -10,6 +10,10 @@ def load_yaml(args):
|
|||||||
return (yaml.safe_load(stream))
|
return (yaml.safe_load(stream))
|
||||||
|
|
||||||
|
|
||||||
|
def print_wokwi_id(yaml):
|
||||||
|
print(yaml['project']['wokwi_id'])
|
||||||
|
|
||||||
|
|
||||||
def create_user_config(yaml):
|
def create_user_config(yaml):
|
||||||
logging.info("creating include file")
|
logging.info("creating include file")
|
||||||
sources = get_project_source(yaml)
|
sources = get_project_source(yaml)
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ if __name__ == '__main__':
|
|||||||
parser.add_argument('--print-cell-category', help="print category", action="store_const", const=True, default=False)
|
parser.add_argument('--print-cell-category', help="print category", action="store_const", const=True, default=False)
|
||||||
parser.add_argument('--print-stats', help="print some stats from the run", action="store_const", const=True)
|
parser.add_argument('--print-stats', help="print some stats from the run", action="store_const", const=True)
|
||||||
parser.add_argument('--print-warnings', help="print any warnings", action="store_const", const=True)
|
parser.add_argument('--print-warnings', help="print any warnings", action="store_const", const=True)
|
||||||
|
parser.add_argument('--print-wokwi-id', help="prints the Wokwi project id", action="store_const", const=True)
|
||||||
|
|
||||||
# documentation
|
# documentation
|
||||||
parser.add_argument('--check-docs', help="check the documentation part of the yaml", action="store_const", const=True)
|
parser.add_argument('--check-docs', help="check the documentation part of the yaml", action="store_const", const=True)
|
||||||
@@ -62,6 +63,9 @@ if __name__ == '__main__':
|
|||||||
if args.print_warnings:
|
if args.print_warnings:
|
||||||
reports.print_warnings(args)
|
reports.print_warnings(args)
|
||||||
|
|
||||||
|
elif args.print_wokwi_id:
|
||||||
|
project.print_wokwi_id(project_yaml)
|
||||||
|
|
||||||
if args.create_user_config:
|
if args.create_user_config:
|
||||||
project.create_user_config(project_yaml)
|
project.create_user_config(project_yaml)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user