Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add Deprecated names of variables #574

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

kareefardi
Copy link
Collaborator

@kareefardi kareefardi commented Oct 8, 2024

Variables

  • Fix unhashable Variable

Docs

  • Add deprecated names to Variable
  • Avoid duplicate entries for a Variable for a specific Step

resolves #526

remove FP_DEF_TEMPLATE for OpenROADStep config_vars

Signed-off-by: Kareem Farid <[email protected]>
@openlane-bot
Copy link
Collaborator

openlane-bot commented Oct 8, 2024

Metric comparisons are in beta. Please report bugs under the issues tab.

To create this report yourself, grab the metrics artifact from the CI run, extract them, and invoke python3 -m openlane.common.metrics compare-remote current --branch dev --table-verbosity ALL --table-out ./tables_all.md.

  • No changes to critical metrics were detected in analyzed designs.

Full tables ► https://gist.github.com/openlane-bot/50c91a8a5570f600f996a53bfa539557

Iterate on set of unique Variables when generating docs for a step
Update __hash__ for Variable to avoid unhashable list

Signed-off-by: Kareem Farid <[email protected]>
@kareefardi kareefardi changed the title docs: Add Deprecated Names to Variable table docs: Add Deprecated names of variables Oct 8, 2024
@kareefardi kareefardi marked this pull request as ready for review October 8, 2024 12:43
Copy link
Member

@donn donn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To implement this properly, you have to create HTML tables in place of the Markdown tables. There's almost no way around it.

Additionally while you're doing that, I think the best approach would be to have a collapsible below the current name- another column occupies precious horizontal real estate

%for var in pdk_variables:
| `${var.name}`{#${var._get_docs_identifier()}} | ${var.type_repr_md(for_document=True)} | ${var.desc_repr_md()} | ${var.units or ""} |
| `${var.name}`{#${var._get_docs_identifier()}} | ${var.type_repr_md(for_document=True)} | ${var.desc_repr_md()} | ${var.units or ""} | ${var.get_deprecated_names_md()|join("<br>")} |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This BR appears to be breaking everything

Screenshot 2024-10-09 at 13 51 05

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is that? The table renders fine in readthedocs.

%for var in scl_variables:
| `${var.name}`{#${var._get_docs_identifier()}} | ${var.type_repr_md(for_document=True)} | ${var.desc_repr_md()} | ${var.units or ""} |
| `${var.name}`{#${var._get_docs_identifier()}} | ${var.type_repr_md(for_document=True)} | ${var.desc_repr_md()} | ${var.units or ""} | ${var.get_deprecated_names_md()|join("<br>")} |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

%for var in option_variables:
| [`${var.name}`]{#${var._get_docs_identifier()}} | ${var.type_repr_md(for_document=True)} | ${var.desc_repr_md()} | `${var.default}` | ${var.units or ""} |
| [`${var.name}`]{#${var._get_docs_identifier()}} | ${var.type_repr_md(for_document=True)} | ${var.desc_repr_md()} | `${var.default}` | ${var.units or ""} | ${var.get_deprecated_names_md()|join("<br>")} |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

"""
)
for var in flow_config_vars:
units = var.units or ""
pdk_superscript = "<sup>PDK</sup>" if var.pdk else ""
result += f"| `{var.name}`{{#{var._get_docs_identifier(Self.__name__)}}}{pdk_superscript} | {var.type_repr_md()} | {var.desc_repr_md()} | `{var.default}` | {units} |\n"
result += f"| `{var.name}`{{#{var._get_docs_identifier(Self.__name__)}}}{pdk_superscript} | {var.type_repr_md()} | {var.desc_repr_md()} | `{var.default}` | {units} | {'<br>'.join(var.get_deprecated_names_md())} |\n"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

units = var.units or ""
pdk_superscript = "<sup>PDK</sup>" if var.pdk else ""
result += f"| `{var.name}`{{#{var._get_docs_identifier(Self.id)}}}{pdk_superscript} | {var.type_repr_md(for_document=True)} | {var.desc_repr_md()} | `{var.default}` | {units} |\n"
result += f"| `{var.name}`{{#{var._get_docs_identifier(Self.id)}}}{pdk_superscript} | {var.type_repr_md(for_document=True)} | {var.desc_repr_md()} | `{var.default}` | {units} | {'<br>'.join(var.get_deprecated_names_md())} |\n"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@kareefardi kareefardi requested a review from donn October 10, 2024 13:59
@kareefardi
Copy link
Collaborator Author

To implement this properly, you have to create HTML tables in place of the Markdown tables. There's almost no way around it.

Additionally while you're doing that, I think the best approach would be to have a collapsible below the current name- another column occupies precious horizontal real estate

There was an issue in forming the markdown table which is now fixed.

As for the collapsable, I don't think it is necessary. Deprecated names are added so that they are viewable when search the docs - or using Ctrl+f. The PR accomplishes that.

@donn
Copy link
Member

donn commented Oct 10, 2024

Ctrl + F works with collapsible though, no?

@kareefardi
Copy link
Collaborator Author

kareefardi commented Oct 10, 2024

Ctrl + F works with collapsible though, no?

Apparently not. The importing part is not matched by Ctrl + F in the current docs

Edit:
I am open to other suggestions thou.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants