Coder Social home page Coder Social logo

Intersphinx from local folder about pydoctor HOT 6 OPEN

miloth avatar miloth commented on July 4, 2024
Intersphinx from local folder

from pydoctor.

Comments (6)

tristanlatr avatar tristanlatr commented on July 4, 2024

Hello @miloth,

There is currently no way to include local objects.inv file. But support for this could be relatively easy to add. Maybe adding an new option —intersphinx-file.

Looking at the file sphinx.py would be a good starting point.

from pydoctor.

tristanlatr avatar tristanlatr commented on July 4, 2024

Better, we could simply add support for the file:// scheme.

from pydoctor.

miloth avatar miloth commented on July 4, 2024

Hi @tristanlatr, thanks for the response and the suggestions. I don't have hours available to allocate to this, but I will get back to it if I find some.

I don't know if the url file:// scheme will work, because the links in the compiled docs should point to the private URL where the dependency is hosted, not where the local objects.inv files are fetched for the intershpinx at docs compile.

from pydoctor.

tristanlatr avatar tristanlatr commented on July 4, 2024

I don't know if the url file:// scheme will work, because the links in the compiled docs should point to the private URL where the dependency is hosted, not where the local objects.inv files are fetched for the intershpinx at docs compile.

I think the is a misunderstanding, I’m not proposing to generate links with the file:// scheme, but to use the file:// scheme in the intersphinx list configuration to differentiate local and remote objects.inv. But, thinking about it twice: it’s probably misguided because the file:// scheme theoretically also support providing a remote host to fetch the file from…

Any opinion about this @glyph ?

from pydoctor.

glyph avatar glyph commented on July 4, 2024

But, thinking about it twice: it’s probably misguided because the file:// scheme theoretically also support providing a remote host to fetch the file from…

Any opinion about this @glyph ?

technically speaking, file://host/.../ is valid, but the only practical way to interpret this is a UNC pathname, which is local…enough, I guess. I think using this URI scheme is a good way to disambiguate, and if you want to be careful to not open up an esoteric minor vulnerability that could cause a user's machine to reach out to a surprising UNC host, you can just enforce that the host of the file URI is '' before passing it on.

from pydoctor.

tristanlatr avatar tristanlatr commented on July 4, 2024

Easier: if the string doesn’t contain  :// then it’s treated like a file. This is how Sphinx handles it.

from pydoctor.

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.