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

Update documentation #357

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

tyler-yankee
Copy link
Collaborator

@tyler-yankee tyler-yankee commented Jan 17, 2025

Updates to the docs for each example include the following:

  • remove top-level README reference to old scripts/ directory
  • make consistent calls to install_prereqs using sudo, and fix 'install_prereqs.sh' -> 'install_prereqs'
  • make consistent CMake build directories inside their respective example source tree, rather than some at the top level
  • sync with [drake_cmake_installed] Replace broken particles example #355 to remove broken example and any reference to it
  • remove unnecessary gtest local install/build in drake_cmake_external as it is included in the repo

This addresses #353.


This change is Reviewable

Copy link
Collaborator Author

@tyler-yankee tyler-yankee left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 unresolved discussion, LGTM missing from assignee betsymcphail, platform LGTM missing (waiting on @BetsyMcPhail)


a discussion (no related file):
+@BetsyMcPhail for feature review, please!

Copy link
Contributor

@BetsyMcPhail BetsyMcPhail left a comment

Choose a reason for hiding this comment

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

Reviewed 6 of 6 files at r1, all commit messages.
Reviewable status: 5 unresolved discussions, LGTM missing from assignee betsymcphail, platform LGTM missing (waiting on @tyler-yankee)


drake_bazel_external/README.md line 14 at r1 (raw file):

sudo setup/install_prereqs

See discussion in #359. @tyler-yankee what are your thoughts on how to proceed here?


drake_cmake_external/CMakeLists.txt line 101 at r1 (raw file):

  # Or from a commit (download and use "shasum -a 256 'xxx.tar.gz'" on it to
  # get the URL_HASH.
  # URL https://github.com/RobotLocomotion/drake/archive/962483669d015ee2618585ace2c884598fbadbb5.tar.gz

It's not clear to me why these were updated?


drake_cmake_installed/README.md line 21 at r1 (raw file):

# 1) A specific version (date-stamped)
# curl -O https://drake-packages.csail.mit.edu/drake/nightly/drake-20240214-jammy.tar.gz

BTW Some of the example lines begin with # and some don't. It seems like it would be more clear for the commands to not start with #?


README.md line 16 at r1 (raw file):

Scripts are provided for various CI instances in each example's respective subdirectory under `.github/`. The intended purpose of each is described below:

* `github_actions`:  exemplifies how to put a project depending on a Drake installation on GitHub Actions

Previously, github_actions and jenkins were subdirectories under scripts/continuous_integration. Please update this section to more accurately describe the current setup.

Copy link
Collaborator Author

@tyler-yankee tyler-yankee left a comment

Choose a reason for hiding this comment

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

Reviewable status: 5 unresolved discussions, LGTM missing from assignee betsymcphail, platform LGTM missing (waiting on @BetsyMcPhail)


README.md line 16 at r1 (raw file):

Previously, BetsyMcPhail (Betsy McPhail) wrote…

Previously, github_actions and jenkins were subdirectories under scripts/continuous_integration. Please update this section to more accurately describe the current setup.

Updated for clarity.


drake_cmake_external/CMakeLists.txt line 101 at r1 (raw file):

Previously, BetsyMcPhail (Betsy McPhail) wrote…

It's not clear to me why these were updated?

The hashes left there were arbitrary, and I happened to leave the ones I was working with; I can revert those.

The main purpose of this change was to fix the typo in shasum.


drake_cmake_installed/README.md line 21 at r1 (raw file):

Previously, BetsyMcPhail (Betsy McPhail) wrote…

BTW Some of the example lines begin with # and some don't. It seems like it would be more clear for the commands to not start with #?

Fair enough. I hadn't thought about this but it makes sense since this is a code block within a README, not an actual script.

@tyler-yankee
Copy link
Collaborator Author

drake_bazel_external/README.md line 14 at r1 (raw file):

Previously, BetsyMcPhail (Betsy McPhail) wrote…

See discussion in #359. @tyler-yankee what are your thoughts on how to proceed here?

Since this PR is intended to update documentation, and that issue involves updating scripts, I say we go ahead with the current version (be consistent in docs, even if technically wrong). Then I'll make a new branch with a PR to update the scripts with the new logic given by @jwnimmer-tri.

With that said, I'm open to also fixing it here.

Copy link
Contributor

@BetsyMcPhail BetsyMcPhail left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 3 of 3 files at r2, all commit messages.
Reviewable status: 2 unresolved discussions, platform LGTM from [betsymcphail] (waiting on @jwnimmer-tri)


drake_bazel_external/README.md line 14 at r1 (raw file):

Previously, tyler-yankee wrote…

Since this PR is intended to update documentation, and that issue involves updating scripts, I say we go ahead with the current version (be consistent in docs, even if technically wrong). Then I'll make a new branch with a PR to update the scripts with the new logic given by @jwnimmer-tri.

With that said, I'm open to also fixing it here.

That sounds fine to me.

Copy link
Contributor

@BetsyMcPhail BetsyMcPhail left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 unresolved discussion, platform LGTM from [betsymcphail]

Copy link
Contributor

@BetsyMcPhail BetsyMcPhail left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all discussions resolved, platform LGTM from [betsymcphail] (waiting on @tyler-yankee)

Copy link
Contributor

@jwnimmer-tri jwnimmer-tri left a comment

Choose a reason for hiding this comment

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

Big picture this is on the right track (LGTM), but I'm probably not the right platform reviewer to be assigned, since I'm overly familiar with this content. Having a fresh set of platform eyes here is probably worthwhile.

Reviewed 3 of 6 files at r1, 3 of 3 files at r2, all commit messages.
Reviewable status: 1 unresolved discussion, platform LGTM from [betsymcphail] (waiting on @tyler-yankee)


README.md line 14 at r2 (raw file):

## Continuous Integration

Scripts are provided for Jenkins or GitHub Actions, depending on the example, 

nit Remove trailing whitespace and ends of lines.

@jwnimmer-tri
Copy link
Contributor

I guess I'd suggest +@rpoyner-tri for platform review, to help avoid overloading Grant tomorrow after the holiday.

Copy link
Contributor

@BetsyMcPhail BetsyMcPhail left a comment

Choose a reason for hiding this comment

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

Reviewable status: 3 unresolved discussions, LGTM missing from assignee rpoyner-tri, platform LGTM from [betsymcphail] (waiting on @rpoyner-tri and @tyler-yankee)


a discussion (no related file):
On a second look, the instructions in drake_bazel_download could be clarified a bit. The setup/install_prereqs script both downloads the latest binary package of drake and runs drake's setup scripts. This is not clear as written.


drake_cmake_installed/README.md line 15 at r2 (raw file):

# Various system dependencies
sudo setup/install_prereqs

I had another look at the install_prereqs script. It installs drake, specifically https://drake-packages.csail.mit.edu/drake/nightly/drake-latest-[jammy|mac-arm64].tar.gz, to /opt and then runs drake's setup scripts. Therefore, both the section title and comment are not-quite-accurate.

The instructions below also install drake, but to $HOME/drake and don't mention the setup script.

Can you please look at how to make all of these instructions more clear/accurate?

Copy link
Contributor

@jwnimmer-tri jwnimmer-tri left a comment

Choose a reason for hiding this comment

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

Reviewable status: 3 unresolved discussions, LGTM missing from assignee rpoyner-tri, platform LGTM from [betsymcphail] (waiting on @BetsyMcPhail, @rpoyner-tri, and @tyler-yankee)


drake_cmake_installed/README.md line 15 at r2 (raw file):

Previously, BetsyMcPhail (Betsy McPhail) wrote…

I had another look at the install_prereqs script. It installs drake, specifically https://drake-packages.csail.mit.edu/drake/nightly/drake-latest-[jammy|mac-arm64].tar.gz, to /opt and then runs drake's setup scripts. Therefore, both the section title and comment are not-quite-accurate.

The instructions below also install drake, but to $HOME/drake and don't mention the setup script.

Can you please look at how to make all of these instructions more clear/accurate?

In case it helps, the long-term direction we want to aim for is to stop using /opt in this particular example. (Of all the examples, the only only one that should use /opt is the drake_cmake_installed_apt.)

I thought we'd fixed the mis-use of /opt in #258 already, but it sounds like maybe we missed something.

Or course (as with the sudo thing), it's okay to make the docs consistent first and then change the logic in a follow-up, if that's easier.

Copy link
Contributor

@BetsyMcPhail BetsyMcPhail left a comment

Choose a reason for hiding this comment

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

Reviewable status: 3 unresolved discussions, LGTM missing from assignee rpoyner-tri, platform LGTM from [betsymcphail] (waiting on @jwnimmer-tri, @rpoyner-tri, and @tyler-yankee)


drake_cmake_installed/README.md line 15 at r2 (raw file):

Previously, jwnimmer-tri (Jeremy Nimmer) wrote…

In case it helps, the long-term direction we want to aim for is to stop using /opt in this particular example. (Of all the examples, the only only one that should use /opt is the drake_cmake_installed_apt.)

I thought we'd fixed the mis-use of /opt in #258 already, but it sounds like maybe we missed something.

Or course (as with the sudo thing), it's okay to make the docs consistent first and then change the logic in a follow-up, if that's easier.

At the moment, both drake_bazel_download and drake_cmake_installed install to /opt within their setup/install_prereqs scripts.

Copy link
Collaborator Author

@tyler-yankee tyler-yankee left a comment

Choose a reason for hiding this comment

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

Reviewable status: 3 unresolved discussions, LGTM missing from assignee rpoyner-tri, platform LGTM from [betsymcphail] (waiting on @BetsyMcPhail and @rpoyner-tri)


drake_cmake_installed/README.md line 15 at r2 (raw file):

Previously, BetsyMcPhail (Betsy McPhail) wrote…

At the moment, both drake_bazel_download and drake_cmake_installed install to /opt within their setup/install_prereqs scripts.

Okay, to follow the logic of the discussion above regarding sudo use, I'll update the docs for consistency here and then address this issue in a follow-up change by unpacking to $HOME instead.

consistent spaces between code blocks,
use bash syntax highlighting,
update description in drake_bazel_download
Copy link
Collaborator Author

@tyler-yankee tyler-yankee left a comment

Choose a reason for hiding this comment

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

Reviewable status: 4 unresolved discussions, LGTM missing from assignee rpoyner-tri, platform LGTM from [betsymcphail] (waiting on @BetsyMcPhail, @jwnimmer-tri, and @rpoyner-tri)


a discussion (no related file):

Previously, BetsyMcPhail (Betsy McPhail) wrote…

On a second look, the instructions in drake_bazel_download could be clarified a bit. The setup/install_prereqs script both downloads the latest binary package of drake and runs drake's setup scripts. This is not clear as written.

Fixed to match the statement made in the other READMEs: "First, run the `install_prereqs` script to download the Drake source to [location]. This also runs Drake's setup script to install the required Ubuntu packages:"


README.md line 14 at r2 (raw file):

Previously, jwnimmer-tri (Jeremy Nimmer) wrote…

nit Remove trailing whitespace and ends of lines.

Fixed.


drake_cmake_installed/README.md line 15 at r2 (raw file):

Previously, tyler-yankee wrote…

Okay, to follow the logic of the discussion above regarding sudo use, I'll update the docs for consistency here and then address this issue in a follow-up change by unpacking to $HOME instead.

Notably, drake_cmake_installed downloads to /opt/drake to run the setup script, but in the next step the README indicates to download to $HOME/drake for cmake. Seems like this can be cleaned up moving forward.


a discussion (no related file):
I also updated the markdown in the READMEs to use bash for code block syntax highlighting. Most had none before, while some had shell and some had bash.

Copy link
Contributor

@BetsyMcPhail BetsyMcPhail left a comment

Choose a reason for hiding this comment

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

Reviewed 7 of 7 files at r3, all commit messages.
Reviewable status: 2 unresolved discussions, LGTM missing from assignee rpoyner-tri, platform LGTM from [betsymcphail] (waiting on @jwnimmer-tri and @rpoyner-tri)


drake_cmake_installed/README.md line 15 at r2 (raw file):

Previously, tyler-yankee wrote…

Notably, drake_cmake_installed downloads to /opt/drake to run the setup script, but in the next step the README indicates to download to $HOME/drake for cmake. Seems like this can be cleaned up moving forward.

Sounds reasonable to me

Copy link
Contributor

@BetsyMcPhail BetsyMcPhail left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 unresolved discussion, LGTM missing from assignee rpoyner-tri, platform LGTM from [betsymcphail] (waiting on @jwnimmer-tri and @rpoyner-tri)

Copy link
Contributor

@rpoyner-tri rpoyner-tri left a comment

Choose a reason for hiding this comment

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

:lgtm: The sudo situation is inconsistent across examples. I've recommended that some of them be removed.

Reviewed 1 of 3 files at r2, 7 of 7 files at r3, all commit messages.
Reviewable status: 3 unresolved discussions, platform LGTM from [betsymcphail, rpoyner-tri] (waiting on @jwnimmer-tri and @tyler-yankee)


drake_bazel_external/README.md line 14 at r1 (raw file):

Previously, BetsyMcPhail (Betsy McPhail) wrote…

That sounds fine to me.

Having tried this one, I think think sudo should be removed here. I get that there may be problems with Docker etc., but I'm guessing the 80-90% use case is just naively following the instructions here as written. For that use of this README, sudo is strictly worse.


drake_cmake_external/README.md line 12 at r3 (raw file):

```bash
sudo setup/install_prereqs

nit ditto above; sudo here is strictly worse.


drake_bazel_external_legacy/README.md line 20 at r3 (raw file):

```bash
sudo setup/install_prereqs

nit ditto above; sudo here is strictly worse.

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.

4 participants