Dev docs: tell NVDA to treat source directory as app directory, allowing dev docs build with Sphinx to succeed - #11972
Merged
Conversation
…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.
See test results for failed build of commit 86435b0add |
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. |
lukaszgo1
reviewed
Dec 27, 2020
|
|
||
| # #11971: NVDA is not running, therefore app dir is undefined. | ||
| # Therefore tell NVDA that apt source directory is app dir. | ||
| import globalVars # noqa: E402 |
Contributor
There was a problem hiding this comment.
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.
Contributor
Author
|
Hi, oops, should have read the conf file thoroughly. Thanks.
|
Reviewed by Lukasz Golonka: move globalvars.appDir definition, along with removing duplicate globalVars import statement.
michaelDCurran
approved these changes
Jan 11, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.