librelane 2.4.0.dev12__py3-none-any.whl → 2.4.0.dev13__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of librelane might be problematic. Click here for more details.

librelane/flows/flow.py CHANGED
@@ -375,7 +375,7 @@ class Flow(ABC):
375
375
  self.progress_bar = FlowProgressBar(self.name)
376
376
 
377
377
  @classmethod
378
- def get_help_md(Self, myst_anchors: bool = True) -> str: # pragma: no cover
378
+ def get_help_md(Self, myst_anchors: bool = False) -> str: # pragma: no cover
379
379
  """
380
380
  :returns: rendered Markdown help for this Flow
381
381
  """
@@ -415,10 +415,10 @@ class Flow(ABC):
415
415
  flow_config_vars = Self.config_vars
416
416
 
417
417
  if len(flow_config_vars):
418
+ config_var_anchors = f"({slugify(Self.__name__, lower=True)}-config-vars)="
418
419
  result += textwrap.dedent(
419
420
  f"""
420
- ({slugify(Self.__name__, lower=True)}-config-vars)=
421
-
421
+ {config_var_anchors * myst_anchors}
422
422
  #### Flow-specific Configuration Variables
423
423
 
424
424
  | Variable Name | Type | Description | Default | Units |
@@ -435,18 +435,14 @@ class Flow(ABC):
435
435
  if len(Self.Steps):
436
436
  result += "#### Included Steps\n"
437
437
  for step in Self.Steps:
438
- if hasattr(step, "long_name"):
439
- name = step.long_name
440
- elif hasattr(step, "name"):
441
- name = step.name
442
- else:
443
- name = step.id
438
+ imp_id = step.get_implementation_id()
444
439
  if myst_anchors:
445
- result += (
446
- f"* [`{step.id}`](./step_config_vars.md#{slugify(name)})\n"
447
- )
440
+ result += f"* [`{step.id}`](./step_config_vars.md#step-{slugify(imp_id, lower=True)})\n"
448
441
  else:
449
- result += f"* {step.id}"
442
+ variant_str = ""
443
+ if imp_id != step.id:
444
+ variant_str = f" (implementation: `{imp_id}`)"
445
+ result += f"* `{step.id}`{variant_str}\n"
450
446
 
451
447
  return result
452
448
 
@@ -0,0 +1,39 @@
1
+ # Copyright 2025 LibreLane Contributors
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ from ..common.cli import formatter_settings
15
+ from ..flows import Flow
16
+ from ..steps import Step
17
+ from ..logging import console
18
+
19
+ import cloup
20
+
21
+
22
+ @cloup.command(formatter_settings=formatter_settings)
23
+ @cloup.argument("step_or_flow")
24
+ @cloup.pass_context
25
+ def cli(ctx, step_or_flow):
26
+ """
27
+ Displays rich help for the step or flow in question.
28
+ """
29
+ if TargetFlow := Flow.factory.get(step_or_flow):
30
+ TargetFlow.display_help()
31
+ elif TargetStep := Step.factory.get(step_or_flow):
32
+ TargetStep.display_help()
33
+ else:
34
+ console.log(f"Unknown Flow or Step '{step_or_flow}'.")
35
+ ctx.exit(-1)
36
+
37
+
38
+ if __name__ == "__main__":
39
+ cli()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: librelane
3
- Version: 2.4.0.dev12
3
+ Version: 2.4.0.dev13
4
4
  Summary: An infrastructure for implementing chip design flows
5
5
  Home-page: https://github.com/librelane/librelane
6
6
  License: Apache-2.0
@@ -43,11 +43,12 @@ librelane/flows/__init__.py,sha256=ghtmUG-taVpHJ3CKJRYZGn3dU0r93araT1EIGlBEsxg,8
43
43
  librelane/flows/builtins.py,sha256=tR14Qc1ZUey2w-Ar4DWOvxuP7LGPtMecCJq8WgcYJpk,773
44
44
  librelane/flows/classic.py,sha256=fI-LNhrvi7lzfsHRyJv_yjgFbpbWBVxN-9QpsgDxpTQ,10940
45
45
  librelane/flows/cli.py,sha256=P2LCFn5_RQ88yB0WuetpLAuWeKQXd-DrpCOMgnVh9Mg,16705
46
- librelane/flows/flow.py,sha256=0dck9SsAlHulamvmFvxx2LPoRdQGJ9gUG9fiJ_6LAGc,37095
46
+ librelane/flows/flow.py,sha256=LkG9B-kes37IqqLS3MDjD97c9YbHV3WP-m8Kh5fuv9Q,37132
47
47
  librelane/flows/misc.py,sha256=32Om3isexesfKKiJZCajNmINc-xdv7eVx_tgoh9SR6U,2015
48
48
  librelane/flows/optimizing.py,sha256=OwZz6WGmXpliwO8vtmhjKHD-kzDyNv-zoCECZIigXsI,6076
49
49
  librelane/flows/sequential.py,sha256=DLzgvHKq0cO-U-eLO98zIFRnhGLfRv80_ozSX973TlI,13350
50
50
  librelane/flows/synth_explore.py,sha256=8mpeuG6oxeEXVQi4NwS4I415eCu7Ak6DN4oK30h1eCQ,7418
51
+ librelane/help/__main__.py,sha256=gnm0yi-Ih8YoyY2cMiHONV2ZzR-tvHfdEHCb28YQJZ0,1243
51
52
  librelane/logging/__init__.py,sha256=mrTnzjpH6AOu2CiDZYfOMCVByAS2Xeg9HS4FJyXsJOE,1043
52
53
  librelane/logging/logger.py,sha256=kA61TGsR00Fi6kQSxgTC1pHpS_-zqC1PdQnYqnk2TWY,8632
53
54
  librelane/open_pdks_rev,sha256=_q6FiO0UljepWU99r9IgkbLrKLDIPbO-80--OFWrZxA,41
@@ -163,7 +164,7 @@ librelane/steps/step.py,sha256=M0Jqvr8sQaYmvXApZ-tfa4SFVOb-l_2ZfR31QaoRUf0,55742
163
164
  librelane/steps/tclstep.py,sha256=0PMWJ6C3dKnlQf9mA9rZntgxUBCiByE9csHcEcM1iq0,10027
164
165
  librelane/steps/verilator.py,sha256=MWx2TpLqYyea9_jSeLG9c2S5ujvYERQZRFNaMhfHxZE,7916
165
166
  librelane/steps/yosys.py,sha256=GX6rTiQG-ZhDxfB9SxrPQ9Sab3WC84p0OUtqiL1Nubk,12533
166
- librelane-2.4.0.dev12.dist-info/METADATA,sha256=uB2QcYmogJ-ChrdE7S5esrt_iHQIJce5tqVLOM5Rrno,6561
167
- librelane-2.4.0.dev12.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
168
- librelane-2.4.0.dev12.dist-info/entry_points.txt,sha256=GTBvXykNMMFsNKiJFgtEw7P1wb_VZIqVM35EFSpyZQE,263
169
- librelane-2.4.0.dev12.dist-info/RECORD,,
167
+ librelane-2.4.0.dev13.dist-info/METADATA,sha256=SBW1XEfWa8xpvWZ3BT4jHw92eIqmU-PAE9ys0G4Ka2E,6561
168
+ librelane-2.4.0.dev13.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
169
+ librelane-2.4.0.dev13.dist-info/entry_points.txt,sha256=0eZs2NOH-w-W_GVRCs-ualst26XplkPpJkOnGWMaFw0,306
170
+ librelane-2.4.0.dev13.dist-info/RECORD,,
@@ -2,6 +2,7 @@
2
2
  librelane=librelane.__main__:cli
3
3
  librelane.config=librelane.config.__main__:cli
4
4
  librelane.env_info=librelane:env_info_cli
5
+ librelane.help=librelane.help.__main__:cli
5
6
  librelane.state=librelane.state.__main__:cli
6
7
  librelane.steps=librelane.steps.__main__:cli
7
8
  openlane=librelane.__main__:cli