-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
West documentation for v1.14 #14983
West documentation for v1.14 #14983
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of reading... but LGTM, thanks!
# safe both for read and writes (all other operations are local to | ||
# the local nodes variable). | ||
return { | ||
'parallel_read_safe': True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for evaluating these Sphinx extensions. We're not running Sphinx with the -j
option (yet) because we noticed some differences in the output and error messages, but marking these extensions as thread-safe will help the cause as we evaluate new versions of Sphinx/Breathe...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're not running Sphinx with the -j option (yet) because we noticed some differences in the output and error messages,
Scary! Here's how I automated the testing of similar issues, this can hopefully provide some "inspiration" for thoroughly testing -j before enabling it: PR #14593
90b1216
to
702689a
Compare
Thanks! The force push just contains a couple of trivial typo fixes.
No problem -- I parallel build here at home and then just ignore the extra errors, so this is a speedup for me. |
@aescolar can you explain this? Missing documentation for a significant new feature seems high priority to me. I'm putting it back. Please add an explanation if you want to remove again. |
@mbolivar : "priority:high" was (to the best of my understanding) meant as a label for bugs, not for PRs. |
@mbolivar : If the lack of documentation is a high priority bug, then you can tag this PR as bug, and link it to an issue which you can tag as bug & priority:high |
702689a
to
dafc996
Compare
OK, I've done that and will remove the tag from this PR. Thanks for the explanation. I didn't see priority being only for issues mentioned in the contribution guidelines (or anywhere else in the documentation) though; where did you get this understanding? |
Makefile
Outdated
$(error The ZEPHYR_BASE environment variable must be set) | ||
WEST := $(shell sh -c "command -v west") | ||
ifeq ($(strip $(WEST)),) | ||
$(error The ZEPHYR_BASE environment variable is not set, and west was not found) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check duplicates the one in doc/CMakeLists.txt
, let's get rid of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks for review!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a staggering amount of new documentation. I admit I have only read it briefly without going into all details due to time constraints, but I have made sure that the sections align with my expectations of the west doc.
@mbolivar thanks for this, it ticks all the checkboxes on the missing parts of west doc! |
dafc996
to
2931067
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cmake variable ZEPHYR_BASE used to be an exact copy of the environment variable ZEPHYR_BASE. This commit turns the cmake variable into something much smarter so I think it should change the name to avoid missing this new smartness and the resulting confusion. I suggest ZEPHYR_TOP
but any other (and better) name different from ZEPHYR_BASE would do.
if(DEFINED ENV{ZEPHYR_BASE})
set(ZEPHYR_TOP $ENV{ZEPHYR_BASE})
elseif(WEST)
execute_process(
COMMAND ${WEST} list -f {abspath} zephyr
OUTPUT_VARIABLE ZEPHYR_TOP)
# safe both for read and writes (all other operations are local to | ||
# the local nodes variable). | ||
return { | ||
'parallel_read_safe': True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're not running Sphinx with the -j option (yet) because we noticed some differences in the output and error messages,
Scary! Here's how I automated the testing of similar issues, this can hopefully provide some "inspiration" for thoroughly testing -j before enabling it: PR #14593
Thanks @marc-hb!
Sorry, I don't follow how this is "smarter": it's still the absolute path to the zephyr repository. Can you clarify? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's "smarter" because it's defined even when the user hasn't defined ZEPHYR_BASE which can be confusing when trying to troubleshoot some issue. Alternative to ZEPHYR_TOP: ZEPHYR_INSTALL.
You should "divide and conquer" reviewers by not bundling independent commits in a single PR but scattering them across separate PRs instead. I use a "rebase rotation" to do this. Let's say you have 4 commits to submit: git show HEAD~3
git push mygithub HEAD~3:fix-parallel-doc-build
git rebase -i HEAD~3 # rotate commits to submit
git show HEAD~3
git push mygithub HEAD~3:build-docs-without-zephyr-base
git rebase -i HEAD~3 # rotate commits to submit
etc. Of course you can still submit more than one commit in one PR this way, just git push HEAD~2 instead after some rotation. |
recheck |
I added this patch because I thought it was a trivial improvement that would make people's lives easier, and it's no different than how west itself sets ZEPHYR_BASE for the duration of the call to make commands like I'll just drop it from this PR since it's not critical to adding the missing west documentation. |
2931067
to
c8ded14
Compare
Found the following issues, please fix and resubmit: License issuesIn most cases you do not need to do anything here, especially if the files
|
But then I wouldn't be able to get some of the smaller patches in for v1.14, riding hot on the tails of the commit which really needs merging ;). More seriously, this series is a gray area for me on the usual "don't mix unrelated commits" hygiene. The main reviewers for all four (now three) patches are David and Carles. |
eeb04b8
to
8dd2517
Compare
This fixes some high priority issues, including syntax errors in docstrings which prevent us from including API docs in our Sphinx tree. Signed-off-by: Marti Bolivar <[email protected]>
Several of our extensions don't declare they are parallel read or write safe. Upon inspection, they are. Not declaring parallel read safety defeats a lot of the speed ups that are possible when using SPHINXOPTS="-j=auto", so mark the extensions safe and get the performance back. Signed-off-by: Marti Bolivar <[email protected]>
8dd2517
to
95a12a9
Compare
- add glossary terms for important concepts we have to explain often, like "west installation" - add autodoc directives for pulling in west API docs - add missing documentation for built-in features like west's configuration, extension commands, etc. - add missing documentation for "west sign" extension - describe the manifest in a self-contained way rather than linking to the relevant pykwalify schema, also adding a missing reference to "west manifest" in the miscellaneous multi-repo commands list - move various details regarding history and motivation to why.rst among other changes to repo-tool.rst, leaving it closer to a "tell me what I really need to know" style overview - update planned features Fixes: zephyrproject-rtos#14992 Signed-off-by: Marti Bolivar <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the recent updates, appreciated!
Sure thing. I see you have resolved all but one of the line comments (#14983 (comment)) and still have a -1 on the PR. Does that mean there's still more to do there? |
Codecov Report
@@ Coverage Diff @@
## master #14983 +/- ##
=======================================
Coverage 52.92% 52.92%
=======================================
Files 309 309
Lines 45266 45266
Branches 10451 10451
=======================================
Hits 23955 23955
Misses 16543 16543
Partials 4768 4768 Continue to review full report at Codecov.
|
No, I thought the -1 was gone. Sorry for the confusion. |
@@ -0,0 +1,244 @@ | |||
.. _west-extensions: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've got no idea why this .rst file is flagged as missing a license and copyright, unless the python code block on line 77 is somehow noticed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's scancode doing that. We can safely ignore it.
Merging, ignoring the License issue which is a false positive. |
This PR adds missing documentation for west. I've also made some fixes and enhancements to the documentation build system which I can take out if that helps.
Fixes: #14992