question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docs Builder creates SpellingError for Sphinx error unrelated to spelling issues

See original GitHub issue

Apache Airflow version: 2.0.0

Kubernetes version (if you are using kubernetes) (use kubectl version): n/a

Environment:

  • Cloud provider or hardware configuration: n/a
  • OS (e.g. from /etc/os-release): n/a
  • Kernel (e.g. uname -a): n/a
  • Install tools: n/a
  • Others: n/a

What happened: A sphinx warning unrelated to spelling issues running sphinx-build resulted in an instance of SpellingError to cause a docs build failure.

SpellingError(
    file_path=None,
    line_no=None,
    spelling=None,
    suggestion=None,
    context_line=None,
    message=(
        f"Sphinx spellcheck returned non-zero exit status: {completed_proc.returncode}."
    )
)

# sphinx.errors.SphinxWarning: /opt/airflow/docs/apache-airflow-providers-google/_api/drive/index.rst:document isn't included in any toctree

The actual issue was that I failed to include an __init__.py file in a directory that I created.

What you expected to happen: I think an exception should be raised unrelated to a spelling error. Preferably one that would indicate that there’s a directory that’s missing an init file, but at least a generic error unrelated to spelling

How to reproduce it: Create a new plugin directory (e.g. airflow/providers/google/suite/sensors) and don’t include an __init__.py file, and run ./breeze build-docs -- --docs-only -v

Anything else we need to know: I’m specifically referring to lines 139 to 150 in docs/exts/docs_build/docs_builder.py

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ashbcommented, Feb 10, 2021

A quick fix might be just to reverse the order we build – and run docs first then spelling check second.

https://github.com/apache/airflow/blob/master/docs/build_docs.py#L142-L152

0reactions
RNHTTRcommented, Feb 11, 2021

Yep, you’re right. Ok, I’ll update the spelling error message and reverse the build order – docs first then spelling.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Release History — sphinxcontrib.spelling 1.4 documentation
Fix a problem that occurred when the extra word list is empty and an IndexError is thrown. Prevent the error by checking the...
Read more >
[Django] #33753: documentation build failing with "ValueError
suspect it's a backwards-incompatible change in Sphinx's behavior. This failure is blocking changes in `sphinxcontrib-spelling` (see https:// ...
Read more >
Survey of Automatic Spelling Correction - MDPI
A spelling error makes the text harder to read and, worse, harder to process. Natural language processing requires normalized forms of a word...
Read more >
For Peer Review Only - ResearchGate
Spelling deficiencies are not only an educational issue but also an economic problem: Employees' insufficient mastery of spelling skills generates ...
Read more >
Configuration - Sphinx documentation
Builder " means the Builder class in the sphinx.builders module. ... This can follow some make html with no problem, in contrast to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found