RobotLocomotion / drake-external-examples

Examples of how to use Drake in your own project.
https://drake.mit.edu/
MIT No Attribution
105 stars 50 forks source link

Self-contained examples #309

Open jwnimmer-tri opened 2 months ago

jwnimmer-tri commented 2 months ago

The fundamental idea of this repository is that users should always be able to copy just one subdirectory and end up with everything they need. To the extent that we have important files outside of the drake_... subdirectories, the examples will be broken.

307 jump starts the process of fixing one violation of the fundamental idea. The call to action in this issue is to fix 100% of the violations. That means thins like moving more files (CPPLINT, LICENSE). The .gitattributes should not move -- it's a tool for Reviewable, so must live at the root.

The second major prong here will be splitting the .github GHA rules as well. For example, we want drake_cmake_installed/.github/workflows/ci.yml to be a CI recipe that would work correctly in case a user copied it to their own project (under the usual premise that they name their repo my_project top level instead of drake-external-examples/drake_cmake_installed nested -- the "copy one subdir" part). We still need to have our top-level drake-external-examples/.github/workflows/ci.yml to trigger our builds in our own repository, but it needs to be refactored to cite the other subdir yml files by reference, so that it's relatively thin. In the past I've found the GHA syntax for citing other files, but I don't have it handy right now. Or as another approach, possibly there is a way to have yml file in the subdir be copied (with another name?) into our main github workflows, and use the file_sync_test to keep them aligned.

jwnimmer-tri commented 1 month ago

This is getting close to finished! Once you think everything is done, please ping me.

nicolecheetham commented 4 weeks ago

@jwnimmer-tri Here is your reminder since the github ci PR is now merged. I haven't created a PR for the workflow copies yet so I thought here would be apt.

jwnimmer-tri commented 4 weeks ago

See #331 for an outline of one next steep.