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

Add GitHub links for Provider API docs #624

Merged
merged 4 commits into from
Jan 12, 2024
Merged

Conversation

Eric-Arellano
Copy link
Collaborator

@Eric-Arellano Eric-Arellano commented Jan 11, 2024

I didn't realize that Provider already is using the viewcode Sphinx extension for current docs, so we didn't need to make any change to that repository to get GitHub source links working.

Note that this required adding a new mechanism to special-case certain files because they don't map 1:1 between GitHub and sphinx.ext.viewcode.

Other than that change, this PR was generated automatically by running npm run gen-api -- -p qiskit-ibm-provider -v 0.7.3 -a https://github.com/Qiskit/qiskit-ibm-provider/actions/runs/7330787504/artifacts/1135354934.

@Eric-Arellano
Copy link
Collaborator Author

Hm, this has a legit broken link! Let's wait to merge this. Good job link checker :)

@Eric-Arellano Eric-Arellano changed the title Add GitHub links for Provider API docs [wip] Add GitHub links for Provider API docs Jan 11, 2024
@Eric-Arellano Eric-Arellano changed the title [wip] Add GitHub links for Provider API docs Add GitHub links for Provider API docs Jan 12, 2024
Copy link
Member

@frankharkins frankharkins left a comment

Choose a reason for hiding this comment

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

Thanks Eric! I tried a few links and they all pointed to the correct files

Copy link
Member

Choose a reason for hiding this comment

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

Neat solution, thanks

Copy link
Collaborator

@arnaucasau arnaucasau left a comment

Choose a reason for hiding this comment

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

Awesome, good find! Thank you Eric!

scripts/lib/api/processHtml.ts Outdated Show resolved Hide resolved
Comment on lines +175 to +176
// Certain files do not map 1:1 between sphinx.ext.viewcode and GitHub.
// When adding new entries, add a dedicated test case!
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good idea adding this comment here 👍

@Eric-Arellano Eric-Arellano added this pull request to the merge queue Jan 12, 2024
Merged via the queue into main with commit 98c3168 Jan 12, 2024
5 checks passed
@Eric-Arellano Eric-Arellano deleted the EA/provider-github-links branch January 12, 2024 21:02
frankharkins pushed a commit to frankharkins/documentation that referenced this pull request Jul 22, 2024
I didn't realize that Provider already is using the `viewcode` Sphinx
extension for current docs, so we didn't need to make any change to that
repository to get GitHub source links working.

Note that this required adding a new mechanism to special-case certain
files because they don't map 1:1 between GitHub and sphinx.ext.viewcode.

Other than that change, this PR was generated automatically by running
`npm run gen-api -- -p qiskit-ibm-provider -v 0.7.3 -a
https://github.com/Qiskit/qiskit-ibm-provider/actions/runs/7330787504/artifacts/1135354934`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants