Skip to content

Fix #2485: autosummary with multiple source_suffix values#2841

Merged
tk0miya merged 1 commit intosphinx-doc:masterfrom
kdebrab:fix-autosummary-with-multiple-source_suffix
Aug 30, 2016
Merged

Fix #2485: autosummary with multiple source_suffix values#2841
tk0miya merged 1 commit intosphinx-doc:masterfrom
kdebrab:fix-autosummary-with-multiple-source_suffix

Conversation

@kdebrab
Copy link
Copy Markdown
Contributor

@kdebrab kdebrab commented Aug 9, 2016

check all source_suffix extensions before adding the first so that autosummary doesn't fail for multiple source_suffix values, fix #2485

…tosummary doesn't fail for multiple source_suffix values, fix sphinx-doc#2485
@kdebrab
Copy link
Copy Markdown
Contributor Author

kdebrab commented Aug 9, 2016

Lines 599&600 are not deleted (as suggested in #2485) as I guess there are use cases where some gen_files require a suffix to be appended? Instead, now all source_suffix values are checked (not just the first one) before appending the suffix. This solution seems robust to me.

@tk0miya
Copy link
Copy Markdown
Member

tk0miya commented Aug 13, 2016

LGTM.

Note: I will investigate later what is happened when the first element of source_suffix is not .rst (ex. .md).

@tk0miya
Copy link
Copy Markdown
Member

tk0miya commented Aug 23, 2016

Note: I will investigate later what is happened when the first element of source_suffix is not .rst (ex. .md).

It does not work. autosummary generates files formatted by reStructredText. So it should be an extension of other formats.

I think suffix=ext[0] is not good. It should be '.rst' always.
And, it would be better to ensure .rst is included in source_suffix before calling generate_autosummary_docs() like following::

if '.rst' not in app.config.source_suffix:
    app.warn('.rst should be added to source_suffix!')
    return

@tk0miya tk0miya added this to the 1.5 milestone Aug 23, 2016
@tk0miya tk0miya merged commit 809bf86 into sphinx-doc:master Aug 30, 2016
@tk0miya
Copy link
Copy Markdown
Member

tk0miya commented Aug 30, 2016

Merged. I added 6b7df0c to check parsers.
Thank you for contribution

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FileNotFoundError with ext/autosummary when using multiple source_suffix values

2 participants