Skip to content
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

Merged
merged 3 commits into from
Mar 29, 2019

Conversation

mbolivar
Copy link
Contributor

@mbolivar mbolivar commented Mar 28, 2019

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

@mbolivar mbolivar added priority: high High impact/importance bug area: Documentation labels Mar 28, 2019
@mbolivar mbolivar added this to the v1.14.0 milestone Mar 28, 2019
@mbolivar mbolivar requested a review from marc-hb March 28, 2019 14:05
Copy link
Contributor

@dbkinder dbkinder left a 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,
Copy link
Contributor

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...

Copy link
Collaborator

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

@mbolivar
Copy link
Contributor Author

Lots of reading... but LGTM, thanks!

Thanks! The force push just contains a couple of trivial typo fixes.

Thanks for evaluating these Sphinx extensions.

No problem -- I parallel build here at home and then just ignore the extra errors, so this is a speedup for me.

@aescolar aescolar removed the priority: high High impact/importance bug label Mar 28, 2019
@mbolivar
Copy link
Contributor Author

aescolar removed the priority: high label 37 minutes ago

@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 mbolivar added the priority: high High impact/importance bug label Mar 28, 2019
@aescolar
Copy link
Member

aescolar commented Mar 28, 2019

@mbolivar : "priority:high" was (to the best of my understanding) meant as a label for bugs, not for PRs.
The target milestone indicates when it should be merged

@aescolar
Copy link
Member

aescolar commented Mar 28, 2019

@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

@mbolivar
Copy link
Contributor Author

mbolivar commented Mar 28, 2019

@mbolivar : If the lack of documentation is a bug, then you can tag this PR as bug, and link it to a issue (also labelled as bug) which you can tag as priority:high

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?

@mbolivar mbolivar removed the priority: high High impact/importance bug label Mar 28, 2019
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)
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, thanks for review!

Copy link
Member

@carlescufi carlescufi left a 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.

@carlescufi
Copy link
Member

@mbolivar thanks for this, it ticks all the checkboxes on the missing parts of west doc!

Copy link
Collaborator

@marc-hb marc-hb left a 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,
Copy link
Collaborator

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

@mbolivar
Copy link
Contributor Author

Thanks @marc-hb!

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

Sorry, I don't follow how this is "smarter": it's still the absolute path to the zephyr repository. Can you clarify?

Copy link
Collaborator

@marc-hb marc-hb left a 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.

doc/guides/west/manifest.rst Show resolved Hide resolved
doc/guides/west/manifest.rst Show resolved Hide resolved
doc/guides/west/why.rst Outdated Show resolved Hide resolved
doc/guides/west/why.rst Show resolved Hide resolved
@marc-hb
Copy link
Collaborator

marc-hb commented Mar 28, 2019

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.

@mbolivar
Copy link
Contributor Author

recheck

@mbolivar
Copy link
Contributor Author

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.

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 west build work without the zephyr-env scripts.

I'll just drop it from this PR since it's not critical to adding the missing west documentation.

@zephyrbot
Copy link
Collaborator

zephyrbot commented Mar 28, 2019

Found the following issues, please fix and resubmit:

License issues

In most cases you do not need to do anything here, especially if the files
reported below are going into ext/ and if license was approved for inclusion
into ext/ already. Fix any missing license/copyright issues. The license
exception if a JFYI for the maintainers and can be overriden when merging the
pull request.

  • doc/guides/west/extensions.rst missing license.
  • doc/guides/west/extensions.rst missing copyright.

@mbolivar
Copy link
Contributor Author

You should "divide and conquer" reviewers by not bundling independent commits in a single PR but scattering them across separate PRs instead.

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.

@mbolivar mbolivar force-pushed the west-docs-v1.14 branch 3 times, most recently from eeb04b8 to 8dd2517 Compare March 28, 2019 20:16
Marti Bolivar added 2 commits March 28, 2019 14:16
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]>
@mbolivar mbolivar requested a review from marc-hb March 28, 2019 20:29
- 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]>
Copy link
Collaborator

@marc-hb marc-hb left a 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!

@mbolivar
Copy link
Contributor Author

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-io
Copy link

Codecov Report

Merging #14983 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bd24b31...95a12a9. Read the comment docs.

@marc-hb marc-hb self-requested a review March 28, 2019 21:23
@marc-hb
Copy link
Collaborator

marc-hb commented Mar 28, 2019

Does that mean there's still more to do there?

No, I thought the -1 was gone. Sorry for the confusion.

@@ -0,0 +1,244 @@
.. _west-extensions:
Copy link
Contributor

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?

Copy link
Member

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.

@carlescufi
Copy link
Member

Merging, ignoring the License issue which is a false positive.

@carlescufi carlescufi merged commit d3bb3cf into zephyrproject-rtos:master Mar 29, 2019
@mbolivar mbolivar deleted the west-docs-v1.14 branch June 13, 2019 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

West documentation is largely missing
8 participants