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

Add a show_docs function that lets the user see the docs for a specific property of a wrapped struct #108

Open
4 of 5 tasks
JamieMair opened this issue Jun 21, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@JamieMair
Copy link
Owner

JamieMair commented Jun 21, 2024

Some structs like Model or Data have a lot of properties and it can be inconvenient to find the right documentation. The show_docs function will let the user see the documentation in the REPL:

julia> show_docs(Model, :nq)
Model.nq: number of generalized coordinates = dim(qpos)

or if you have an object:

julia> model, data = MuJoCo.sample_model_and_data();
julia> show_docs(model, :nq)
Model.nq: number of generalized coordinates = dim(qpos)

It would be nice to use a macro like @showdoc model.nq, but both approaches are essentially the same and the function is easier to implement.

This feature should be implemented for:

  • mjData
  • mjModel
  • mjStatistics
  • mjOption
  • Possibly for named access structs, these could always be forwarded to the appropriate parent struct.
@JamieMair JamieMair self-assigned this Jun 21, 2024
@JamieMair JamieMair added the enhancement New feature or request label Jun 21, 2024
@JamieMair JamieMair added this to the Port to v3 milestone Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant