diff --git a/ipm/common.py b/ipm/common.py index bb88ba1..a1e814c 100644 --- a/ipm/common.py +++ b/ipm/common.py @@ -1218,11 +1218,14 @@ def update_ips(ipm_root, ip_root=None, ip_to_update=None): else: logger.print_warn("No IPs in your project to be updated.") -def check_ip(ip_root): +def check_ip(ip_root, ip_name=None): logger = Logger() # Step 1: check Yaml file - yaml_info_file = os.path.join(ip_root, f"{os.path.basename(ip_root)}.yaml") + if not ip_name: + yaml_info_file = os.path.join(ip_root, f"{os.path.basename(ip_root)}.yaml") + else: + yaml_info_file = os.path.join(ip_root, f"{ip_name}.yaml") logger.print_step("[STEP 1]: Check if Yaml file exists") if os.path.exists(yaml_info_file): logger.print_success(f"Yaml file exists at {yaml_info_file}") @@ -1232,7 +1235,7 @@ def check_ip(ip_root): # Step 2: Check content of Yaml file logger.print_step("[STEP 2]: Check content of Yaml file") - checker = Checks(ip_root, os.path.basename(ip_root)) + checker = Checks(ip_root, ip_name) if checker.check_yaml(): logger.print_success("Yaml content check passed") else: diff --git a/ipm/manage.py b/ipm/manage.py index 8927a97..b108ace 100644 --- a/ipm/manage.py +++ b/ipm/manage.py @@ -202,6 +202,9 @@ def update_cmd(ipm_root, ip_root, ip): default=os.getcwd(), help="IP path", ) -def check_ip_cmd(ip_root): +@click.option( + "--ip-name", required=False, help="IP name" +) +def check_ip_cmd(ip_root, ip_name): """Checks IPs for usability with IPM.""" - check_ip(ip_root) + check_ip(ip_root, ip_name) diff --git a/pyproject.toml b/pyproject.toml index 2eac4f0..eb98f84 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "ipmgr" -version = "1.0.8" +version = "1.0.9" description = "Package manager for Open Source ASIC IPs" authors = ["Efabless Corporation "] readme = "README.md"