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

Disable warnings for links to non-existing local files #130

Closed
clenk opened this issue Oct 6, 2017 · 8 comments
Closed

Disable warnings for links to non-existing local files #130

clenk opened this issue Oct 6, 2017 · 8 comments

Comments

@clenk
Copy link
Contributor

clenk commented Oct 6, 2017

tldr; Please support links to sub-sections in non-notebook files.

I'm using nbsphinx with autodoc and autosummary and would like to have a link from one of the notebooks to one of the pages that will be generated by autodoc. In a markdown cell in the notebook I use a link like [something](../api/something.html#heading). In the final output the link works fine, but during the build process sphinx complains WARNING file not found: 'api/something.html#heading'.

After reading this page in your docs, I added '.html' to source_suffix in my sphinx configuration. It doesn't throw a warning if I remove the anchor part of the link, but I need to be able to link to a specific section on the page.

The link works fine in the final output, but I want to use a lot of these links and I'm afraid sphinx dumping a ton of these warnings will make it harder to notice more important errors.

@clenk
Copy link
Contributor Author

clenk commented Oct 11, 2017

The fix in #129 works for me. I hope the LaTeX issue can be resolved and the PR merged in soon.

@mgeier
Copy link
Member

mgeier commented Oct 14, 2017

It wouldn't be a problem to add a configuration option for suppressing those warnings.
But I've just seen that Sphinx recently introduced their own system for suppressing warnings:
sphinx-doc/sphinx#2346
http://www.sphinx-doc.org/en/stable/config.html#confval-suppress_warnings

What about just adding type and subtype to all nbsphinx warnings?

BTW, you should not add .html to source_suffix, that doesn't make sense.

@mgeier mgeier changed the title Links to subsections in Sphinx source files Disable warnings for links to non-existing local files Oct 14, 2017
@clenk
Copy link
Contributor Author

clenk commented Oct 16, 2017

Yes, adding type and subtype to nbsphinx warnings seems like a better way to go.

Adding .html felt weird but I was just trying stuff out to see what would work.

@mgeier
Copy link
Member

mgeier commented Oct 17, 2017

@clenk Would you like to make a PR for that?

@clenk
Copy link
Contributor Author

clenk commented Oct 23, 2017

Unfortunately It's unlikely I will have time to, and #135 solved my problem.

@mgeier
Copy link
Member

mgeier commented Oct 23, 2017

@clenk No problem.

I think this feature has been added in Sphinx 1.4 and the documentation says "Now, this option should be considered experimental", so we should probably wait a bit anyway before implementing this.

I'm leaving this issue open for now ...

timstaley added a commit to timstaley/voevent-parse that referenced this issue Jan 7, 2018
This is a workaround for some spurious warnings generated by the latest
sphinx / nbsphinx combination, cf:
    spatialaudio/nbsphinx#130

Prefer warnings to remain by default since they alert the dev to
faulty links in the docs, etc.
@jschueller
Copy link
Contributor

@clenk, does #178 fix your problem ?

@mgeier
Copy link
Member

mgeier commented Dec 11, 2018

I think this can be closed.

If someone still has a problem with those warnings, please leave a comment here!

@mgeier mgeier closed this as completed Dec 11, 2018
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

No branches or pull requests

3 participants