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

Use sphinx.ext.linkcode for more precise source code links #11851

Merged

Commits on Feb 20, 2024

  1. Configuration menu
    Copy the full SHA
    099636d View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2024

  1. removed extra line

    melechlapson committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    00b05e7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a20ad5c View commit details
    Browse the repository at this point in the history
  3. Add section header for source code links

    Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
    melechlapson and Eric-Arellano committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    2f94288 View commit details
    Browse the repository at this point in the history
  4. removed docstring

    Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
    melechlapson and Eric-Arellano committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    1d5c34d View commit details
    Browse the repository at this point in the history
  5. update return string

    Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
    melechlapson and Eric-Arellano committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    1849ce1 View commit details
    Browse the repository at this point in the history
  6. added back blank line

    melechlapson committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    cca9b04 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5bd18cd View commit details
    Browse the repository at this point in the history
  8. Added a method to determine the GitHub branch

    Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
    melechlapson and Eric-Arellano committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    b985ba6 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    914d2cd View commit details
    Browse the repository at this point in the history
  10. add blank line

    Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
    melechlapson and Eric-Arellano committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    1deb939 View commit details
    Browse the repository at this point in the history
  11. remove print statement

    Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
    melechlapson and Eric-Arellano committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    b84b399 View commit details
    Browse the repository at this point in the history
  12. Try to fix error for contextlib file

    We got this stacktrace:
    
    Traceback (most recent call last):
      File "/home/vsts/work/1/s/.tox/docs/lib/python3.8/site-packages/sphinx/events.py", line 96, in emit
        results.append(listener.handler(self.app, *args))
      File "/home/vsts/work/1/s/.tox/docs/lib/python3.8/site-packages/sphinx/ext/linkcode.py", line 55, in doctree_read
        uri = resolve_target(domain, info)
      File "/home/vsts/work/1/s/docs/conf.py", line 216, in linkcode_resolve
        file_name = PurePath(full_file_name).relative_to(repo_root)
      File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/pathlib.py", line 908, in relative_to
        raise ValueError("{!r} does not start with {!r}"
    ValueError: '/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/contextlib.py' does not start with '/home/vsts/work/1/s'
    
    We shouldn't even attempt to generate a link for the file contextlib.py
    Eric-Arellano committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    01e4ca6 View commit details
    Browse the repository at this point in the history
  13. Try to fix error for Jenkins run #20240221.52

    New build failed with this stacktrace:
    Traceback (most recent call last):
      File "/home/vsts/work/1/s/.tox/docs/lib/python3.8/site-packages/sphinx/events.py", line 96, in emit
        results.append(listener.handler(self.app, *args))
      File "/home/vsts/work/1/s/.tox/docs/lib/python3.8/site-packages/sphinx/ext/linkcode.py", line 55, in doctree_read
        uri = resolve_target(domain, info)
      File "/home/vsts/work/1/s/docs/conf.py", line 215, in linkcode_resolve
        full_file_name = inspect.getsourcefile(obj)
      File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/inspect.py", line 696, in getsourcefile
        filename = getfile(object)
      File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/inspect.py", line 665, in getfile
        raise TypeError('{!r} is a built-in class'.format(object))
    TypeError: <class 'builtins.CustomClassical'> is a built-in class
    
    So I added a condition that the obj should not be a built-in
    melechlapson committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    25ff4df View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    ace069b View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2024

  1. Configuration menu
    Copy the full SHA
    5420982 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d60bbf4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    17881d4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9330e45 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ab8dad0 View commit details
    Browse the repository at this point in the history
  6. removed unused import

    melechlapson committed Feb 27, 2024
    Configuration menu
    Copy the full SHA
    6ef1f68 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b45113b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a3e5297 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    e3382e7 View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2024

  1. Configuration menu
    Copy the full SHA
    825e02a View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2024

  1. Merge branch 'main' of github.com:Qiskit/qiskit-terra into mlapson/sw…

    …itch-to-sphinx-ext-linkcode
    Eric-Arellano committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    51f4bcb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ab7f411 View commit details
    Browse the repository at this point in the history
  3. Merge branch 'mlapson/switch-to-sphinx-ext-linkcode' of github.com:me…

    …lechlapson/qiskit into mlapson/switch-to-sphinx-ext-linkcode
    Eric-Arellano committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    2a28edb View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2024

  1. Configuration menu
    Copy the full SHA
    cde30ef View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2024

  1. Apply suggestions from code review

    Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com>
    melechlapson and Eric-Arellano committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    5545bc8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7c95384 View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2024

  1. added back spaces

    melechlapson committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    5b74a03 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'main' of github.com:Qiskit/qiskit-terra into mlapson/sw…

    …itch-to-sphinx-ext-linkcode
    Eric-Arellano committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    8a805da View commit details
    Browse the repository at this point in the history
  3. Clarify docs_deploy GitHub logic

    1. Remove misleading PR conditional. This worfklow doesn't even run in PRs. It was bad copy-pasta from the runtime repo
    2. Clarify why we point tag builds to their stable branch name
    Eric-Arellano committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    abf4871 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3386c4c View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2024

  1. Fix relative_to() path

    Eric-Arellano committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    614e8f8 View commit details
    Browse the repository at this point in the history
  2. Remove tox prefix

    Eric-Arellano committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    19d052d View commit details
    Browse the repository at this point in the history