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

DOCS-2488: Add param, return override support #3019

Merged
merged 9 commits into from
Jun 17, 2024

Conversation

andf-viam
Copy link
Contributor

@andf-viam andf-viam commented Jun 13, 2024

Add ability to override parameter descriptions and/or return descriptions, using (param|return) override files.

  • Each SDK requires slightly-different override logic, see script comments.
  • Also cleans up override file detection logic for before and after overrides: simpler, shorter, less filesystem traversal.
    • Important: no longer supporting omitting literal string before for before-type overrides, we need this explicitness to support new param|return override filepath detection.

Note:

  • If you are seeking to populate a bunch of param|return override files, see the notes in the script: you can uncomment print statements to get the full expected override path for each param|return to make populating these much easier.
    • Even better, you can now use something like the following to create all necessary param | return override files for you:
       ## Uncomment relevant print(param|return_desc_override_file) line for the SDK you want. Then run:
       for filename in `python3 .github/workflows/update_sdk_methods.py -o go motion`; do touch $filename; done
       ## All Go > Motion override files will be created for you. Copy and paste your content into them.
      
  • Not 100% sure we're matching all possible Go return data types. Will fix during arm, robot, and app re-generation shortly if so.

@viambot viambot added the safe to build This pull request is marked safe to build from a trusted zone label Jun 13, 2024
@viambot
Copy link
Member

viambot commented Jun 14, 2024

You can view a rendered version of the docs from this PR at https://docs-test.viam.dev/3019

@andf-viam andf-viam merged commit d21fed0 into viamrobotics:main Jun 17, 2024
9 of 10 checks passed
@andf-viam andf-viam deleted the DOCS-2488-param-desc-override branch June 17, 2024 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to build This pull request is marked safe to build from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants