doc2dash icon indicating copy to clipboard operation
doc2dash copied to clipboard

Q: how to avoid to generate entries point to not exists file.

Open tshu-w opened this issue 2 years ago • 2 comments

Hi, I'm trying to use doc2dash to generate scikit-learn doc for dash https://github.com/Kapeli/Dash-User-Contributions/pull/3805 https://github.com/Kapeli/Dash-User-Contributions/pull/3812. However, the ci complains about File not found:

Scikit/scikit-learn.tgz: FAIL ❌
File not found at "genindex.html" for entry with row id "3058" of "scikit-learn.docset"
File not found at "py-modindex.html" for entry with row id "3222" of "scikit-learn.docset"
File not found at "py-modindex.html" for entry with row id "3327" of "scikit-learn.docset"
[NOTICE] Some pages loaded online resources, which might mean the docset doesn't work offline.

I am asking for advice on how to solve this problem, here are the commands I tried:

# download scikit-learn docs directly
wget https://scikit-learn.org/stable/_downloads/scikit-learn-docs.zip
unzip -d scikit-learn-docs scikit-learn-docs.zip

# convert to dash
doc2dash --index-page documentation.html --enable-js -n scikit-learn scikit-learn-docs
tar --exclude='.DS_Store' -czvf scikit-learn.tgz scikit-learn.docset

tshu-w avatar Aug 02 '22 03:08 tshu-w

Unfortunately downloading built docs from ReadTheDocs etc doesn't work for the reasons you're saying. For some reason it's missing files.

You have to download the repo and build the docs yourself. :(

hynek avatar Aug 02 '22 04:08 hynek

Yes, so I also tried to build the docs myself in this PR but also facing this issue: https://github.com/tshu-w/Dash-User-Contributions/blob/0efe2f5ef9aa3b05f39e1fc2d474b4df2ea8c880/docsets/Scikit/build.sh#L37-L47

tshu-w avatar Aug 02 '22 07:08 tshu-w

I'm sorry, but I don't see an issue?

hynek avatar Sep 04 '22 12:09 hynek

Hi, my question is that in this PR, even if I build the docs myself, github-actions still complain about file not found. It would be much appreciated if you could help to check where the problem is.

tshu-w avatar Sep 05 '22 01:09 tshu-w

I see!

This is probably related to #115, but I guess I'll have to fix it broader.

I believe I've fixed it in https://github.com/hynek/doc2dash/commit/c3593ac9b9e9e806094dfc89b2bb139dfd79277f – any chance you could try it out? I'm not sure when I'll be able to push out a new release. :-/

hynek avatar Sep 05 '22 07:09 hynek

Hi @hynek, It works now https://github.com/Kapeli/Dash-User-Contributions/pull/3871! Thank you for your efforts.

tshu-w avatar Sep 06 '22 02:09 tshu-w

Great, happy to see scikit-learn docsets!

hynek avatar Sep 06 '22 14:09 hynek

JFTR, I've released doc2dash 3 yesterday, so please use the PyPI version again...I can't guarantee the main branch to remain stable and it could break your builds.

hynek avatar Sep 14 '22 04:09 hynek