Skip to content

Dev docs: tell NVDA to treat source directory as app directory, allowing dev docs build with Sphinx to succeed - #11972

Merged
michaelDCurran merged 3 commits into
nvaccess:masterfrom
josephsl:devDocsAppDir
Jan 11, 2021
Merged

Dev docs: tell NVDA to treat source directory as app directory, allowing dev docs build with Sphinx to succeed#11972
michaelDCurran merged 3 commits into
nvaccess:masterfrom
josephsl:devDocsAppDir

Conversation

@josephsl

Copy link
Copy Markdown
Contributor

Hi,
Foundation to allow building source code docs locally and through services suc has Read The Docs:

Link to issue number:

Fixes #11971

Summary of the issue:

When building source code documentation, Python will notice that globalvars.appDir is not found, causing Sphinx to give up when building docs.

Description of how this pull request fixes the issue:

In Sphinx config file, Sphinx will be told to "define" source code directory as app directory, allowing dev docs build to succeed.

Testing performed:

Tested with Sphinx 2.2.2 and 3.4.1 with dev docs builds succeeding.

Known issues with pull request:

None, although Sphinx raises warnings, which can be handled in subsequent pull requests.

Change log entry:

Changes for developers:

You can now build source code documentation locally using Sphinx. (#11971)

Thanks.

…lding source code dev docs. re nvaccess#11971.

Before building dev docs with Sphinx, config module is imported without NVDA knowing where the app dir is i.e. globalVars.appDir is undefined. Therefore tell Sphinx that globalVars.appDir is source directory so Sphinx can build source code documentation.
@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 86435b0add

@josephsl

Copy link
Copy Markdown
Contributor Author

Hi,

NOt related to the PR, but I'm beginning to suspect that ARIA treegrid test is going to give an impression that the PR's didn't pass wen they are actually working as expected.

Thanks.

Comment thread devDocs/conf.py Outdated

# #11971: NVDA is not running, therefore app dir is undefined.
# Therefore tell NVDA that apt source directory is app dir.
import globalVars # noqa: E402

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GlobalVars is already imported above when setting appArgs. Also it makes sense to set appdir just below the line which sets appArgs to group tweaks to globalVars` in one place.

@josephsl

josephsl commented Dec 27, 2020 via email

Copy link
Copy Markdown
Contributor Author

Reviewed by Lukasz Golonka: move globalvars.appDir definition, along with removing duplicate globalVars import statement.
@michaelDCurran
michaelDCurran merged commit e34ec59 into nvaccess:master Jan 11, 2021
@nvaccessAuto nvaccessAuto added this to the 2021.1 milestone Jan 11, 2021
@josephsl
josephsl deleted the devDocsAppDir branch January 11, 2021 15:08
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.

Dev docs: globalVars.appDir is not defined when attempting to build docs with Sphinx

5 participants