Skip to content

DOC-5517 TCE local_examples subfolders and named params for clients-examples #1898

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

Merged
merged 3 commits into from
Jul 30, 2025

Conversation

andy-stark-redis
Copy link
Contributor

@andy-stark-redis andy-stark-redis commented Jul 30, 2025

DOC-5517

Does exactly what it says on the tin :-) There's a test file at the top of the Develop section to demonstrate the shortcode changes; I'll remove it before merging.

Some things to consider:

  • We can have any subfolder names we like in local_examples. Just floating a proposal that we have a temp folder for stuff that should eventually get merged into the release branch of a client repo (so we can periodically check for redundant files here). Any other stuff should be permanently local, so we can use whatever structuring is appropriate in each case.
  • The parameter names for the shortcodes are just suggestions. If you think of more helpful names then I'm happy to change them.
  • The shortcode can actually support positional parameters (in the existing order) or named parameters equally well, as long as you don't mix the two in any instance of the shortcode. I'm thinking maybe we could stick with the positional params for most of the current examples that only use the set and step names? Anyway, there's no urgent need to update the existing examples, but we can do that in the future if we decide it's better.

@andy-stark-redis andy-stark-redis requested review from dwdougherty, cmilesb and a team July 30, 2025 12:50
@andy-stark-redis andy-stark-redis self-assigned this Jul 30, 2025
Copy link
Contributor

Copy link
Collaborator

@dwdougherty dwdougherty left a comment

Choose a reason for hiding this comment

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

This looks great, @andy-stark-redis! Just curious: what happens when the same code example is found in both a client repo and the local_examples folder? This should probably be tested, as it's inevitable that one of us (prolly me) will forget to remove an example from local after an example is merged in a client repo.

Also, I agree about the use of a "temp" directory, although this old Unix dog bristles at temp vs tmp. :) Additionally, I think it's okay to leave the existing examples as is, but use the named parameters going forward.

@andy-stark-redis
Copy link
Contributor Author

@dwdougherty Yeah, I did test that situation - the local example gets priority. One the one hand, this means we can make temporary fixes to dodgy examples quickly instead of waiting for them to be approved on client repo. On the other hand, we have to delete the local file to get what's merged to the client repo. I slightly prefer giving priority to the local examples, but we could change this if it turns out to be a problem.

We can use tmp if you like :-) As you say, no hurry with updating the examples, but named params are more self-explanatory (and maybe better for AI to parse?)

@dwdougherty
Copy link
Collaborator

Awesome. Thank you for testing that, and I agree that it's probably better for the local examples to override client examples.

@andy-stark-redis andy-stark-redis merged commit 9dcbd4d into main Jul 30, 2025
5 checks passed
@andy-stark-redis andy-stark-redis deleted the DOC-5517-more-tce-stuff branch July 30, 2025 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clients Client library docs do not merge yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants