Git Product home page Git Product logo

Comments (10)

diego-plan9 avatar diego-plan9 commented on May 29, 2024

Thanks @Travis-S - will be looked into as part of #80, as we can take the chance to look into the possibility of linking to the repository directly.

from qiskit-metapackage.

jaygambetta avatar jaygambetta commented on May 29, 2024

i think this is what @Travis-S wants is some way to open the source code. @Travis-S is this correct?

from qiskit-metapackage.

Travis-S avatar Travis-S commented on May 29, 2024

@jaygambetta Yes. Consider this documentation for a pyQuil program in Forest. If a user wants to read the source code itself, they can click the source link (near the declaration of the class) and are taken to a page where they can read it.

from qiskit-metapackage.

jaygambetta avatar jaygambetta commented on May 29, 2024

great, i agree. @derivation can you think about the above.

from qiskit-metapackage.

derivation avatar derivation commented on May 29, 2024

I think this would be much appreciated by users. I'll chat with @diego-plan9 and @lzdanski about how to incorporate this practice. Thanks @Travis-S.

from qiskit-metapackage.

diego-plan9 avatar diego-plan9 commented on May 29, 2024

Thanks for the extended feedback and comments, @Travis-S - yes, the way we had it setup previously was very similar to the example you mention: we were generating .html files for each source file (with syntax highlighting, etc) that were linked from the autodoc files (ie. the ones that contain just a description of the functions, arguments, etc). This should be easy to reintroduce (is mostly toggling a flag in the configuration).

What I was trying to suggest was considering, instead of reintroducing those rendered pages as generated .html files, replacing the source links with links to the actual files and lines in github. This might provide users with more context about that particular function (and be able to explore github features and the feature history for those inclined to do so), and maybe have the side effect of sparkling contributing or taking a more active role (on the technical side, it also helps a bit with the size of the documentation, as in the terra docs the rendered .html source files were the biggest culprit, but not a strong argument for it).

from qiskit-metapackage.

Travis-S avatar Travis-S commented on May 29, 2024

@diego-plan9 Absolutely! That would be a great improvement on the original suggestion.

from qiskit-metapackage.

diego-plan9 avatar diego-plan9 commented on May 29, 2024

I issued #200 for reintroducing the source link using the original approach (ie. include additional rendered .html that contains the source), aiming for the source links being present in the upcoming major release.

For being able to link to github, it would be worth exploring sphinx.ext.linkcode instead, that offers a linkcode_resolve() function that we can tune to return the proper link. The bits that involve more work are being able to deal with multiple versions and repositories, and linking to the specific lines of code (by default, the extension does not provide details about the line numbers) - a source of inspiration can be the numpy conf.py or similar projects.

from qiskit-metapackage.

jaygambetta avatar jaygambetta commented on May 29, 2024

@Travis-S is this done in the api documentation now.

from qiskit-metapackage.

jaygambetta avatar jaygambetta commented on May 29, 2024

image

from qiskit-metapackage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.