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

Intersphinx #28

Merged
merged 13 commits into from
Aug 5, 2014
Merged

Intersphinx #28

merged 13 commits into from
Aug 5, 2014

Conversation

hynek
Copy link
Owner

@hynek hynek commented Jul 27, 2014

Use Sphinx’s own intersphinx files and APIs to get all symbol names. That’s both more robust and gives us a better introspection into the actual types of symbols.

Todos:

Should fix #27 and #25.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.25%) when pulling 041ee5a on intersphinx into 8d524aa on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.25%) when pulling 68e4e21 on intersphinx into 8d524aa on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) when pulling 3e67005 on intersphinx into 8d524aa on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) when pulling 3e67005 on intersphinx into 8d524aa on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) when pulling f6691a7 on intersphinx into 8d524aa on master.

Also re-instantiate the old name as an attribute for backward-compatibility.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) when pulling 3e35f80 on intersphinx into 8d524aa on master.

@winny-
Copy link

winny- commented Jul 28, 2014

Same result as of 3e35f80 — search not working nor index entries in the tree list on the left.

image

I am assuming flag -f is sufficient to install over a docset.

@hynek
Copy link
Owner Author

hynek commented Jul 29, 2014

It is, although sometimes caching does weird stuff. Ideally try with a new name.

  • If that doesn’t help: does it say Converting intersphinx docs or Converting sphinx docs?
  • If the latter: does doc2dash --version say doc2dash 1.3.0?
  • If yes, does the docs directory contain an “objects.inv”?

@winny-
Copy link

winny- commented Jul 29, 2014

Converting intersphinx docs, doc2dash 1.3.0 is correct, and I see an objects.inv.

➜  pandora-apidoc git:(master) doc2dash --version
doc2dash 1.3.0
➜  pandora-apidoc git:(master) find . -name objects.inv
./_build/html/objects.inv
➜  pandora-apidoc git:(master) doc2dash -n Pandora2 -A _build/html/
Converting intersphinx docs from "_build/html" to "/Users/winston/Library/Application Support/doc2dash/DocSets/Pandora2.docset".
Parsing HTML...
Creating database...
Added 0 index entries.
Adding table of contents meta data...
Adding to dash...

@hynek
Copy link
Owner Author

hynek commented Jul 29, 2014

Could you provide me with an archive of your built docs? Thanks!

@winny-
Copy link

winny- commented Jul 29, 2014

https://www.dropbox.com/s/4kkfr2iszvwfz67/pandora-apidoc.tar.gz includes git repository, compiled sphinx doc, and dash docset.

@hynek
Copy link
Owner Author

hynek commented Jul 30, 2014

Thank you for your help!

I looked into the objects.inv and turns out the API functions/methods/symbols aren’t properly defined. They’re all within std:label. A proper one would be for example py:method or something.

FWIW, doc2dash ignores the py: part.

But this is definitely an issue with the documentation and nothing I can fix within doc2dash, sorry!

@winny-
Copy link

winny- commented Aug 1, 2014

Is it possible to extend doc2dash to use a different namespace in objects.inv for non-Python sphinx docsets? Is it the norm to use the py: namespace outside of Python?

Thank you for clarifying the issue with the docset I am using.

@hynek
Copy link
Owner Author

hynek commented Aug 1, 2014

As said, doc2dash (in this branch) explicitly ignores the part before the colon. So c:function And py:function are both just functions. OTOH std:label are semantically nothing. Other docs use it for misc bookmarks for instance.

That said, you can always write own parsers of course. :) But in this case I really think it's the docset that should be fixed.

hynek added a commit that referenced this pull request Aug 5, 2014
Use intersphinx files for symbol mining


Fixes #27
@hynek hynek merged commit 00edea8 into master Aug 5, 2014
@hynek hynek deleted the intersphinx branch September 16, 2014 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot detect Gevent's documentation format
3 participants