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

Bad GitHub source code link in API docs when decorator used #2060

Open
Shivansh20128 opened this issue Sep 27, 2024 · 8 comments · May be fixed by Qiskit/qiskit#13281
Open

Bad GitHub source code link in API docs when decorator used #2060

Shivansh20128 opened this issue Sep 27, 2024 · 8 comments · May be fixed by Qiskit/qiskit#13281
Assignees

Comments

@Shivansh20128
Copy link

Environment

  • Qiskit version: NA
  • Python version: NA
  • Operating system: NA

What is happening?

The link for the GitHub source code redirects to the wrong file. See here.
The Github link should redirect to the source code got dag_drawer function, but it is taking us to this link instead.

How can we reproduce the issue?

See the API Docs.

What should happen?

The GitHub link in the API docs should take us to the source code of dag_drawer, which is here.

Any suggestions?

Update the link to the source code.

@Shivansh20128
Copy link
Author

Can you assign this to me if its okay? I can resolve this...

@jakelishman
Copy link
Member

@Shivansh20128: sure, though roughly how are you planning to do that? It seems on the surface to me that the bug will be related to how the public-documentation scraper (in Qiskit/documentation) determines the source code for an object, rather than something in this repository.

@Shivansh20128
Copy link
Author

Shivansh20128 commented Sep 30, 2024

Hi @jakelishman
Can't I make the required changes here directly?
If I change "github="https://github.com/Qiskit/qiskit/tree/main/qiskit/utils/lazy_tester.py#L74-L316"" to "github=https://github.com/Qiskit/qiskit/blob/8ccbc8d28f34e3f2e1e0e8cbb66c4da95754b341/qiskit/visualization/dag_visualization.py#L76", it should solve our problem. Or is it not the case?
Thank You

@jakelishman
Copy link
Member

Two points:

  1. that file is in a different repository to this one (Qiskit/documentation, not Qiskit/qiskit)
  2. that file is a generated file, not handwritten - solving the problem would involve fixing the generation script.

It's still super worthwhile to get it fixed, and thanks for pointing it out.

@Shivansh20128
Copy link
Author

Ohh. In that case, you can remove me from this issue for someone else to do it. I don't think I can make the required changes to the script at this stage. I have just started contributing here.
Thank you

@Eric-Arellano
Copy link
Collaborator

Thanks @Shivansh20128 for warning us about this! I'll look into it.

@Eric-Arellano Eric-Arellano self-assigned this Oct 1, 2024
@Eric-Arellano Eric-Arellano transferred this issue from Qiskit/qiskit Oct 1, 2024
@Eric-Arellano Eric-Arellano changed the title Error in API Docs of dag_drawer Bad GitHub source code link in API Docs of dag_drawer Oct 1, 2024
@Eric-Arellano
Copy link
Collaborator

https://docs.quantum.ibm.com/api/qiskit/dev/qiskit.circuit.BreakLoopOp#assemble is also broken, which has a deprecated decorator. The issue seems to be when you use a decorator.

@Eric-Arellano Eric-Arellano changed the title Bad GitHub source code link in API Docs of dag_drawer Bad GitHub source code link in API docs when decorator used Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Review
Development

Successfully merging a pull request may close this issue.

5 participants